diff --git a/Gopkg.lock b/Gopkg.lock
index b7a633da..859091fe 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -10,10 +10,11 @@
version = "v0.4.0"
[[projects]]
- digest = "1:805fadb53b6a19286fb1f540cf27b261e52f66fce10b86a8d6064de232bcab7e"
+ digest = "1:2b6ab70f8b430604a680cd487944a4ed288a282d902f2921f9a2c4e094363cb3"
name = "github.com/aws/aws-sdk-go"
packages = [
"aws",
+ "aws/arn",
"aws/awserr",
"aws/awsutil",
"aws/client",
@@ -33,6 +34,7 @@
"aws/session",
"aws/signer/v4",
"awstesting/mock",
+ "internal/context",
"internal/ini",
"internal/s3err",
"internal/sdkio",
@@ -40,6 +42,9 @@
"internal/sdkrand",
"internal/sdkuri",
"internal/shareddefaults",
+ "internal/strings",
+ "internal/sync/singleflight",
+ "private/checksum",
"private/protocol",
"private/protocol/eventstream",
"private/protocol/eventstream/eventstreamapi",
@@ -58,6 +63,7 @@
"service/iam",
"service/iam/iamiface",
"service/s3",
+ "service/s3/internal/arn",
"service/s3/s3iface",
"service/ssm",
"service/ssm/ssmiface",
@@ -65,32 +71,32 @@
"service/sts/stsiface",
]
pruneopts = "NUT"
- revision = "15cbab53359072d0801eb32d16d0a406207e8716"
- version = "v1.25.14"
+ revision = "9e52c7bbf58d1f0910d05b24f4ce5728b2fd7c52"
+ version = "v1.32.7"
[[projects]]
- branch = "master"
digest = "1:707ebe952a8b3d00b343c01536c79c73771d100f63ec6babeaed5c79e2b8a8dd"
name = "github.com/beorn7/perks"
packages = ["quantile"]
pruneopts = "NUT"
- revision = "3a771d992973f24aa725d07868b467d1ddfceafb"
+ revision = "37c8de3658fcb183f997c4e13e8337516ab753e6"
+ version = "v1.0.1"
[[projects]]
- digest = "1:a2c1d0e43bd3baaa071d1b9ed72c27d78169b2b269f71c105ac4ba34b1be4a39"
+ digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec"
name = "github.com/davecgh/go-spew"
packages = ["spew"]
pruneopts = "NUT"
- revision = "346938d642f2ec3594ed81d874461961cd0faa76"
- version = "v1.1.0"
+ revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73"
+ version = "v1.1.1"
[[projects]]
- digest = "1:ea1d5bfdb4ec5c2ee48c97865e6de1a28fa8c4849a3f56b27d521aa619038e06"
+ digest = "1:0a5970c0d492097dc0054fbc8afd6dc15b6fea12c812a16aa24d2bffc8a39692"
name = "github.com/go-errors/errors"
packages = ["."]
pruneopts = "NUT"
- revision = "a6af135bd4e28680facf08a3d206b454abc877a4"
- version = "v1.0.1"
+ revision = "7c023725d0115f2e05423b2b43a8f85c42f7a6af"
+ version = "v1.1.1"
[[projects]]
branch = "master"
@@ -101,28 +107,26 @@
revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998"
[[projects]]
- digest = "1:15042ad3498153684d09f393bbaec6b216c8eec6d61f63dff711de7d64ed8861"
+ digest = "1:4a32eb57407190eced21a21abee9ce4d4ab6f0bf113ca61cb1cb2d549a65c985"
name = "github.com/golang/protobuf"
- packages = ["proto"]
- pruneopts = "NUT"
- revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265"
- version = "v1.1.0"
-
-[[projects]]
- digest = "1:c01767916c59f084bb7c41a7d5877c0f3099b1595cfa066e84ec6ad6b084dd89"
- name = "github.com/gorilla/context"
- packages = ["."]
+ packages = [
+ "proto",
+ "ptypes",
+ "ptypes/any",
+ "ptypes/duration",
+ "ptypes/timestamp",
+ ]
pruneopts = "NUT"
- revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42"
- version = "v1.1.1"
+ revision = "d04d7b157bb510b1e0c10132224b616ac0e26b17"
+ version = "v1.4.2"
[[projects]]
- digest = "1:bf5cf1d53d703332e9bd8984c69784645b73a938317bf5ace9aadf20ac49379a"
+ digest = "1:d54244e92e91f46e0cfd6ea3cf9e99d403c97eba929c19153da1474dcc5989fa"
name = "github.com/gorilla/mux"
packages = ["."]
pruneopts = "NUT"
- revision = "e3702bed27f0d39777b0b37b664b6280e8ef8fbf"
- version = "v1.6.2"
+ revision = "75dcda0896e109a2a22c9315bca3bb21b87b2ba5"
+ version = "v1.7.4"
[[projects]]
branch = "basic_auth"
@@ -164,12 +168,12 @@
version = "v1.0.0"
[[projects]]
- digest = "1:8658f775ba5edb37ede96d8ec9eaecdfe06bc4aef1776152070185e6513dc0cc"
+ digest = "1:e848ce7c0b0d50ca35291ac8cfd9ed444f8151c39683cbe23b50c82940e7877f"
name = "github.com/pmorie/go-open-service-broker-client"
packages = ["v2"]
pruneopts = "NUT"
- revision = "dca737037ce636eb282e84e3a1c7479c9692e884"
- version = "0.0.10"
+ revision = "79b374a2302fe4a2c05c6f469262d195b765152f"
+ version = "0.0.12"
[[projects]]
branch = "master"
@@ -195,16 +199,15 @@
version = "v0.8.0"
[[projects]]
- branch = "master"
- digest = "1:32d10bdfa8f09ecf13598324dba86ab891f11db3c538b6a34d1c3b5b99d7c36b"
+ digest = "1:0db23933b8052702d980a3f029149b3f175f7c0eea0cff85b175017d0f2722c0"
name = "github.com/prometheus/client_model"
packages = ["go"]
pruneopts = "NUT"
- revision = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"
+ revision = "7bc5445566f0fe75b15de23e6b93886e982d7bf9"
+ version = "v0.2.0"
[[projects]]
- branch = "master"
- digest = "1:768b555b86742de2f28beb37f1dedce9a75f91f871d75b5717c96399c1a78c08"
+ digest = "1:5dfc688108b77e0793e2d035ddf75c6adcb4735e8994193e621118ad10e285e2"
name = "github.com/prometheus/common"
packages = [
"expfmt",
@@ -212,20 +215,20 @@
"model",
]
pruneopts = "NUT"
- revision = "7600349dcfe1abd18d72d3a1770870d9800a7801"
+ revision = "6162074431988128c0a63a91ed22b11685777868"
+ version = "v0.10.0"
[[projects]]
- branch = "master"
- digest = "1:c4a213a8d73fbb0b13f717ba7996116602ef18ecb42b91d77405877914cb0349"
+ digest = "1:81515c09577f593364fa7ccc4df5d917165e45bf80f543ce2ebb1cbd598e9e57"
name = "github.com/prometheus/procfs"
packages = [
".",
+ "internal/fs",
"internal/util",
- "nfs",
- "xfs",
]
pruneopts = "NUT"
- revision = "61aaa706c6d4fda9365b6273c96839eb7e27f6e4"
+ revision = "3a900613711866765af641f387dad41b639dbdc4"
+ version = "v0.1.3"
[[projects]]
digest = "1:6bc0652ea6e39e22ccd522458b8bdd8665bf23bdc5a20eec90056e4dc7e273ca"
@@ -236,23 +239,23 @@
version = "v1.2.0"
[[projects]]
- digest = "1:bacb8b590716ab7c33f2277240972c9582d389593ee8d66fc10074e0508b8126"
+ digest = "1:c59bbf7751c26b0fd98789cc8a8bdedc8377a61506537f62874902e597b20fa3"
name = "github.com/stretchr/testify"
packages = ["assert"]
pruneopts = "NUT"
- revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
- version = "v1.2.2"
+ revision = "f654a9112bbeac49ca2cd45bfbe11533c4666cf8"
+ version = "v1.6.1"
[[projects]]
branch = "master"
- digest = "1:1ecf2a49df33be51e757d0033d5d51d5f784f35f68e5a38f797b2d3f03357d71"
+ digest = "1:9d5b5d543996dd584da1db1e0de1926f3e4c3a8dba0fa2f8db70f3ebee2342e0"
name = "golang.org/x/crypto"
packages = [
"bcrypt",
"blowfish",
]
pruneopts = "NUT"
- revision = "de0752318171da717af4ce24d0a2e8626afaeb11"
+ revision = "70a84ac30bf957c7df57edd1935d2081871515e1"
[[projects]]
branch = "master"
@@ -260,11 +263,61 @@
name = "golang.org/x/net"
packages = ["context"]
pruneopts = "NUT"
- revision = "c39426892332e1bb5ec0a434a079bf82f5d30c54"
+ revision = "627f9648deb96c27737b83199d44bb5c1010cbcf"
+
+[[projects]]
+ branch = "master"
+ digest = "1:f72a8b4bfbfe9e132c85e170fe1efebd7abc2c165936b52a01b33d4d6c201b87"
+ name = "golang.org/x/sys"
+ packages = [
+ "internal/unsafeheader",
+ "unix",
+ ]
+ pruneopts = "NUT"
+ revision = "4b0db7f3f76bf41ab7a24511c25e99583f5c0927"
+
+[[projects]]
+ digest = "1:310da5159baf5e46ce8d11a0cbcfe4c32cfdcb759e4fb284a71d094304e94be1"
+ name = "google.golang.org/protobuf"
+ packages = [
+ "encoding/prototext",
+ "encoding/protowire",
+ "internal/descfmt",
+ "internal/descopts",
+ "internal/detrand",
+ "internal/encoding/defval",
+ "internal/encoding/messageset",
+ "internal/encoding/tag",
+ "internal/encoding/text",
+ "internal/errors",
+ "internal/fieldnum",
+ "internal/fieldsort",
+ "internal/filedesc",
+ "internal/filetype",
+ "internal/flags",
+ "internal/genname",
+ "internal/impl",
+ "internal/mapsort",
+ "internal/pragma",
+ "internal/set",
+ "internal/strs",
+ "internal/version",
+ "proto",
+ "reflect/protoreflect",
+ "reflect/protoregistry",
+ "runtime/protoiface",
+ "runtime/protoimpl",
+ "types/known/anypb",
+ "types/known/durationpb",
+ "types/known/timestamppb",
+ ]
+ pruneopts = "NUT"
+ revision = "5c3dd7024aed895adfe053f26b5a479e991cbca9"
+ version = "v1.24.0"
[[projects]]
branch = "v2"
- digest = "1:d9da6023ef4c1c8630db15fedcf8e71d4e18e21a83f81c53dfd8ba664509a63e"
+ digest = "1:ea57d204e1049286ac958c1b0ea64f36e923adc10162e842fcd29483ccedb38c"
name = "gopkg.in/mgo.v2"
packages = [
".",
@@ -274,15 +327,23 @@
"internal/scram",
]
pruneopts = "NUT"
- revision = "3f83fa5005286a7fe593b055f0d7771a7dce4655"
+ revision = "a6b53ec6cb22a3699387a57a161566f9402ee85b"
[[projects]]
- digest = "1:7c95b35057a0ff2e19f707173cc1a947fa43a6eb5c4d300d196ece0334046082"
+ digest = "1:62a89978829993fb84e755bff5ae0e3d84837228898fd55b1a88a885036e1e51"
name = "gopkg.in/yaml.v2"
packages = ["."]
pruneopts = "NUT"
- revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
- version = "v2.2.1"
+ revision = "0b1645d91e851e735d3e23330303ce81f70adbe3"
+ version = "v2.3.0"
+
+[[projects]]
+ branch = "v3"
+ digest = "1:c9a53b5be2654e3d1d466419bb389371ff3755220ec3cafd43dd8742fb7aebdd"
+ name = "gopkg.in/yaml.v3"
+ packages = ["."]
+ pruneopts = "NUT"
+ revision = "eeeca48fe7764f320e4870d231902bf9c1be2c08"
[solve-meta]
analyzer-name = "dep"
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
index 285e54d6..a4eb6a7f 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
@@ -70,7 +70,7 @@ func rValuesAtPath(v interface{}, path string, createPath, caseSensitive, nilTer
value = value.FieldByNameFunc(func(name string) bool {
if c == name {
return true
- } else if !caseSensitive && strings.ToLower(name) == strings.ToLower(c) {
+ } else if !caseSensitive && strings.EqualFold(name, c) {
return true
}
return false
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
index c022407f..03334d69 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
@@ -12,6 +12,7 @@ import (
type Config struct {
Config *aws.Config
Handlers request.Handlers
+ PartitionID string
Endpoint string
SigningRegion string
SigningName string
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 0fda4251..9f6af19d 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
@@ -16,11 +16,11 @@ import (
type DefaultRetryer struct {
// Num max Retries is the number of max retries that will be performed.
// By default, this is zero.
- NumMaxRetries int
+ NumMaxRetries int
// MinRetryDelay is the minimum retry delay after which retry will be performed.
// If not set, the value is 0ns.
- MinRetryDelay time.Duration
+ MinRetryDelay time.Duration
// MinThrottleRetryDelay is the minimum retry delay when throttled.
// If not set, the value is 0ns.
@@ -28,7 +28,7 @@ type DefaultRetryer struct {
// MaxRetryDelay is the maximum retry delay before which retry must be performed.
// If not set, the value is 0ns.
- MaxRetryDelay time.Duration
+ MaxRetryDelay time.Duration
// MaxThrottleDelay is the maximum retry delay when throttled.
// If not set, the value is 0ns.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
index 920e9fdd..0c48f72e 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
@@ -5,6 +5,7 @@ type ClientInfo struct {
ServiceName string
ServiceID string
APIVersion string
+ PartitionID string
Endpoint string
SigningName string
SigningRegion string
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go
index fd1e240f..2c002e15 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go
@@ -43,7 +43,7 @@ type Config struct {
// An optional endpoint URL (hostname only or fully qualified URI)
// that overrides the default generated endpoint for a client. Set this
- // to `""` to use the default generated endpoint.
+ // to `nil` to use the default generated endpoint.
//
// Note: You must still provide a `Region` value when specifying an
// endpoint for a client.
@@ -161,6 +161,17 @@ type Config struct {
// on GetObject API calls.
S3DisableContentMD5Validation *bool
+ // Set this to `true` to have the S3 service client to use the region specified
+ // in the ARN, when an ARN is provided as an argument to a bucket parameter.
+ S3UseARNRegion *bool
+
+ // Set this to `true` to enable the SDK to unmarshal API response header maps to
+ // normalized lower case map keys.
+ //
+ // For example S3's X-Amz-Meta prefixed header will be unmarshaled to lower case
+ // Metadata member's map keys. The value of the header in the map is unaffected.
+ LowerCaseHeaderMaps *bool
+
// Set this to `true` to disable the EC2Metadata client from overriding the
// default http.Client's Timeout. This is helpful if you do not want the
// EC2Metadata client to create a new http.Client. This options is only
@@ -227,6 +238,7 @@ type Config struct {
// EnableEndpointDiscovery will allow for endpoint discovery on operations that
// have the definition in its model. By default, endpoint discovery is off.
+ // To use EndpointDiscovery, Endpoint should be unset or set to an empty string.
//
// Example:
// sess := session.Must(session.NewSession(&aws.Config{
@@ -246,6 +258,12 @@ type Config struct {
// Disabling this feature is useful when you want to use local endpoints
// for testing that do not support the modeled host prefix pattern.
DisableEndpointHostPrefix *bool
+
+ // STSRegionalEndpoint will enable regional or legacy endpoint resolving
+ STSRegionalEndpoint endpoints.STSRegionalEndpoint
+
+ // S3UsEast1RegionalEndpoint will enable regional or legacy endpoint resolving
+ S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint
}
// NewConfig returns a new Config pointer that can be chained with builder
@@ -379,6 +397,13 @@ func (c *Config) WithS3DisableContentMD5Validation(enable bool) *Config {
}
+// WithS3UseARNRegion sets a config S3UseARNRegion value and
+// returning a Config pointer for chaining
+func (c *Config) WithS3UseARNRegion(enable bool) *Config {
+ c.S3UseARNRegion = &enable
+ return c
+}
+
// WithUseDualStack sets a config UseDualStack value returning a Config
// pointer for chaining.
func (c *Config) WithUseDualStack(enable bool) *Config {
@@ -420,6 +445,20 @@ func (c *Config) MergeIn(cfgs ...*Config) {
}
}
+// WithSTSRegionalEndpoint will set whether or not to use regional endpoint flag
+// when resolving the endpoint for a service
+func (c *Config) WithSTSRegionalEndpoint(sre endpoints.STSRegionalEndpoint) *Config {
+ c.STSRegionalEndpoint = sre
+ return c
+}
+
+// WithS3UsEast1RegionalEndpoint will set whether or not to use regional endpoint flag
+// when resolving the endpoint for a service
+func (c *Config) WithS3UsEast1RegionalEndpoint(sre endpoints.S3UsEast1RegionalEndpoint) *Config {
+ c.S3UsEast1RegionalEndpoint = sre
+ return c
+}
+
func mergeInConfig(dst *Config, other *Config) {
if other == nil {
return
@@ -493,6 +532,10 @@ func mergeInConfig(dst *Config, other *Config) {
dst.S3DisableContentMD5Validation = other.S3DisableContentMD5Validation
}
+ if other.S3UseARNRegion != nil {
+ dst.S3UseARNRegion = other.S3UseARNRegion
+ }
+
if other.UseDualStack != nil {
dst.UseDualStack = other.UseDualStack
}
@@ -520,6 +563,14 @@ func mergeInConfig(dst *Config, other *Config) {
if other.DisableEndpointHostPrefix != nil {
dst.DisableEndpointHostPrefix = other.DisableEndpointHostPrefix
}
+
+ if other.STSRegionalEndpoint != endpoints.UnsetSTSEndpoint {
+ dst.STSRegionalEndpoint = other.STSRegionalEndpoint
+ }
+
+ if other.S3UsEast1RegionalEndpoint != endpoints.UnsetS3UsEast1Endpoint {
+ dst.S3UsEast1RegionalEndpoint = other.S3UsEast1RegionalEndpoint
+ }
}
// Copy will return a shallow copy of the Config object. If any additional
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go b/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go
index 66c5945d..2f944633 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go
@@ -2,42 +2,8 @@
package aws
-import "time"
-
-// An emptyCtx is a copy of the Go 1.7 context.emptyCtx type. This is copied to
-// provide a 1.6 and 1.5 safe version of context that is compatible with Go
-// 1.7's Context.
-//
-// An emptyCtx is never canceled, has no values, and has no deadline. It is not
-// struct{}, since vars of this type must have distinct addresses.
-type emptyCtx int
-
-func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
- return
-}
-
-func (*emptyCtx) Done() <-chan struct{} {
- return nil
-}
-
-func (*emptyCtx) Err() error {
- return nil
-}
-
-func (*emptyCtx) Value(key interface{}) interface{} {
- return nil
-}
-
-func (e *emptyCtx) String() string {
- switch e {
- case backgroundCtx:
- return "aws.BackgroundContext"
- }
- return "unknown empty Context"
-}
-
-var (
- backgroundCtx = new(emptyCtx)
+import (
+ "github.com/aws/aws-sdk-go/internal/context"
)
// BackgroundContext returns a context that will never be canceled, has no
@@ -52,5 +18,5 @@ var (
//
// See https://golang.org/pkg/context for more information on Contexts.
func BackgroundContext() Context {
- return backgroundCtx
+ return context.BackgroundCtx
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
index 0c60e612..aa902d70 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
@@ -161,7 +161,7 @@ func handleSendError(r *request.Request, err error) {
}
// Catch all request errors, and let the default retrier determine
// if the error is retryable.
- r.Error = awserr.New("RequestError", "send request failed", err)
+ r.Error = awserr.New(request.ErrCodeRequestError, "send request failed", err)
// Override the error with a context canceled error, if that was canceled.
ctx := r.Context()
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
index 4af59215..9f8fd92a 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
@@ -50,10 +50,11 @@ package credentials
import (
"fmt"
- "sync"
+ "sync/atomic"
"time"
"github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/internal/sync/singleflight"
)
// AnonymousCredentials is an empty Credential object that can be used as
@@ -106,6 +107,13 @@ type Provider interface {
IsExpired() bool
}
+// ProviderWithContext is a Provider that can retrieve credentials with a Context
+type ProviderWithContext interface {
+ Provider
+
+ RetrieveWithContext(Context) (Value, error)
+}
+
// An Expirer is an interface that Providers can implement to expose the expiration
// time, if known. If the Provider cannot accurately provide this info,
// it should not implement this interface.
@@ -197,24 +205,24 @@ func (e *Expiry) ExpiresAt() time.Time {
// first instance of the credentials Value. All calls to Get() after that
// will return the cached credentials Value until IsExpired() returns true.
type Credentials struct {
- creds Value
- forceRefresh bool
-
- m sync.RWMutex
+ creds atomic.Value
+ sf singleflight.Group
provider Provider
}
// NewCredentials returns a pointer to a new Credentials with the provider set.
func NewCredentials(provider Provider) *Credentials {
- return &Credentials{
- provider: provider,
- forceRefresh: true,
+ c := &Credentials{
+ provider: provider,
}
+ c.creds.Store(Value{})
+ return c
}
-// Get returns the credentials value, or error if the credentials Value failed
-// to be retrieved.
+// GetWithContext returns the credentials value, or error if the credentials
+// Value failed to be retrieved. Will return early if the passed in context is
+// canceled.
//
// Will return the cached credentials Value if it has not expired. If the
// credentials Value has expired the Provider's Retrieve() will be called
@@ -222,31 +230,56 @@ func NewCredentials(provider Provider) *Credentials {
//
// If Credentials.Expire() was called the credentials Value will be force
// expired, and the next call to Get() will cause them to be refreshed.
-func (c *Credentials) Get() (Value, error) {
- // Check the cached credentials first with just the read lock.
- c.m.RLock()
- if !c.isExpired() {
- creds := c.creds
- c.m.RUnlock()
- return creds, nil
+//
+// Passed in Context is equivalent to aws.Context, and context.Context.
+func (c *Credentials) GetWithContext(ctx Context) (Value, error) {
+ if curCreds := c.creds.Load(); !c.isExpired(curCreds) {
+ return curCreds.(Value), nil
}
- c.m.RUnlock()
-
- // Credentials are expired need to retrieve the credentials taking the full
- // lock.
- c.m.Lock()
- defer c.m.Unlock()
-
- if c.isExpired() {
- creds, err := c.provider.Retrieve()
- if err != nil {
- return Value{}, err
- }
- c.creds = creds
- c.forceRefresh = false
+
+ // Cannot pass context down to the actual retrieve, because the first
+ // context would cancel the whole group when there is not direct
+ // association of items in the group.
+ resCh := c.sf.DoChan("", func() (interface{}, error) {
+ return c.singleRetrieve(&suppressedContext{ctx})
+ })
+ select {
+ case res := <-resCh:
+ return res.Val.(Value), res.Err
+ case <-ctx.Done():
+ return Value{}, awserr.New("RequestCanceled",
+ "request context canceled", ctx.Err())
}
+}
- return c.creds, nil
+func (c *Credentials) singleRetrieve(ctx Context) (creds interface{}, err error) {
+ if curCreds := c.creds.Load(); !c.isExpired(curCreds) {
+ return curCreds.(Value), nil
+ }
+
+ if p, ok := c.provider.(ProviderWithContext); ok {
+ creds, err = p.RetrieveWithContext(ctx)
+ } else {
+ creds, err = c.provider.Retrieve()
+ }
+ if err == nil {
+ c.creds.Store(creds)
+ }
+
+ return creds, err
+}
+
+// Get returns the credentials value, or error if the credentials Value failed
+// to be retrieved.
+//
+// Will return the cached credentials Value if it has not expired. If the
+// credentials Value has expired the Provider's Retrieve() will be called
+// to refresh the credentials.
+//
+// If Credentials.Expire() was called the credentials Value will be force
+// expired, and the next call to Get() will cause them to be refreshed.
+func (c *Credentials) Get() (Value, error) {
+ return c.GetWithContext(backgroundContext())
}
// Expire expires the credentials and forces them to be retrieved on the
@@ -255,10 +288,7 @@ func (c *Credentials) Get() (Value, error) {
// This will override the Provider's expired state, and force Credentials
// to call the Provider's Retrieve().
func (c *Credentials) Expire() {
- c.m.Lock()
- defer c.m.Unlock()
-
- c.forceRefresh = true
+ c.creds.Store(Value{})
}
// IsExpired returns if the credentials are no longer valid, and need
@@ -267,33 +297,43 @@ func (c *Credentials) Expire() {
// If the Credentials were forced to be expired with Expire() this will
// reflect that override.
func (c *Credentials) IsExpired() bool {
- c.m.RLock()
- defer c.m.RUnlock()
-
- return c.isExpired()
+ return c.isExpired(c.creds.Load())
}
// isExpired helper method wrapping the definition of expired credentials.
-func (c *Credentials) isExpired() bool {
- return c.forceRefresh || c.provider.IsExpired()
+func (c *Credentials) isExpired(creds interface{}) bool {
+ return creds == nil || creds.(Value) == Value{} || c.provider.IsExpired()
}
// ExpiresAt provides access to the functionality of the Expirer interface of
// the underlying Provider, if it supports that interface. Otherwise, it returns
// an error.
func (c *Credentials) ExpiresAt() (time.Time, error) {
- c.m.RLock()
- defer c.m.RUnlock()
-
expirer, ok := c.provider.(Expirer)
if !ok {
return time.Time{}, awserr.New("ProviderNotExpirer",
- fmt.Sprintf("provider %s does not support ExpiresAt()", c.creds.ProviderName),
+ fmt.Sprintf("provider %s does not support ExpiresAt()", c.creds.Load().(Value).ProviderName),
nil)
}
- if c.forceRefresh {
+ if c.creds.Load().(Value) == (Value{}) {
// set expiration time to the distant past
return time.Time{}, nil
}
return expirer.ExpiresAt(), nil
}
+
+type suppressedContext struct {
+ Context
+}
+
+func (s *suppressedContext) Deadline() (deadline time.Time, ok bool) {
+ return time.Time{}, false
+}
+
+func (s *suppressedContext) Done() <-chan struct{} {
+ return nil
+}
+
+func (s *suppressedContext) Err() error {
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
index 43d4ed38..92af5b72 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
@@ -7,6 +7,7 @@ import (
"strings"
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/credentials"
@@ -87,7 +88,14 @@ func NewCredentialsWithClient(client *ec2metadata.EC2Metadata, options ...func(*
// Error will be returned if the request fails, or unable to extract
// the desired credentials.
func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) {
- credsList, err := requestCredList(m.Client)
+ return m.RetrieveWithContext(aws.BackgroundContext())
+}
+
+// RetrieveWithContext retrieves credentials from the EC2 service.
+// Error will be returned if the request fails, or unable to extract
+// the desired credentials.
+func (m *EC2RoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) {
+ credsList, err := requestCredList(ctx, m.Client)
if err != nil {
return credentials.Value{ProviderName: ProviderName}, err
}
@@ -97,7 +105,7 @@ func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) {
}
credsName := credsList[0]
- roleCreds, err := requestCred(m.Client, credsName)
+ roleCreds, err := requestCred(ctx, m.Client, credsName)
if err != nil {
return credentials.Value{ProviderName: ProviderName}, err
}
@@ -130,8 +138,8 @@ const iamSecurityCredsPath = "iam/security-credentials/"
// requestCredList requests a list of credentials from the EC2 service.
// If there are no credentials, or there is an error making or receiving the request
-func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) {
- resp, err := client.GetMetadata(iamSecurityCredsPath)
+func requestCredList(ctx aws.Context, client *ec2metadata.EC2Metadata) ([]string, error) {
+ resp, err := client.GetMetadataWithContext(ctx, iamSecurityCredsPath)
if err != nil {
return nil, awserr.New("EC2RoleRequestError", "no EC2 instance role found", err)
}
@@ -154,8 +162,8 @@ func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) {
//
// If the credentials cannot be found, or there is an error reading the response
// and error will be returned.
-func requestCred(client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCredRespBody, error) {
- resp, err := client.GetMetadata(sdkuri.PathJoin(iamSecurityCredsPath, credsName))
+func requestCred(ctx aws.Context, client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCredRespBody, error) {
+ resp, err := client.GetMetadataWithContext(ctx, sdkuri.PathJoin(iamSecurityCredsPath, credsName))
if err != nil {
return ec2RoleCredRespBody{},
awserr.New("EC2RoleRequestError",
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go
index 1a7af53a..785f30d8 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go
@@ -116,7 +116,13 @@ func (p *Provider) IsExpired() bool {
// Retrieve will attempt to request the credentials from the endpoint the Provider
// was configured for. And error will be returned if the retrieval fails.
func (p *Provider) Retrieve() (credentials.Value, error) {
- resp, err := p.getCredentials()
+ return p.RetrieveWithContext(aws.BackgroundContext())
+}
+
+// RetrieveWithContext will attempt to request the credentials from the endpoint the Provider
+// was configured for. And error will be returned if the retrieval fails.
+func (p *Provider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) {
+ resp, err := p.getCredentials(ctx)
if err != nil {
return credentials.Value{ProviderName: ProviderName},
awserr.New("CredentialsEndpointError", "failed to load credentials", err)
@@ -148,7 +154,7 @@ type errorOutput struct {
Message string `json:"message"`
}
-func (p *Provider) getCredentials() (*getCredentialsOutput, error) {
+func (p *Provider) getCredentials(ctx aws.Context) (*getCredentialsOutput, error) {
op := &request.Operation{
Name: "GetCredentials",
HTTPMethod: "GET",
@@ -156,6 +162,7 @@ func (p *Provider) getCredentials() (*getCredentialsOutput, error) {
out := &getCredentialsOutput{}
req := p.Client.NewRequest(op, nil, out)
+ req.SetContext(ctx)
req.HTTPRequest.Header.Set("Accept", "application/json")
if authToken := p.AuthorizationToken; len(authToken) != 0 {
req.HTTPRequest.Header.Set("Authorization", authToken)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go
index 1980c8c1..e6248360 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go
@@ -90,6 +90,7 @@ import (
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/internal/sdkio"
)
const (
@@ -142,7 +143,7 @@ const (
// DefaultBufSize limits buffer size from growing to an enormous
// amount due to a faulty process.
- DefaultBufSize = 1024
+ DefaultBufSize = int(8 * sdkio.KibiByte)
// DefaultTimeout default limit on time a process can run.
DefaultTimeout = time.Duration(1) * time.Minute
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
index e1551495..22b5c5d9 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
@@ -17,8 +17,9 @@ var (
ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil)
)
-// A SharedCredentialsProvider retrieves credentials from the current user's home
-// directory, and keeps track if those credentials are expired.
+// A SharedCredentialsProvider retrieves access key pair (access key ID,
+// secret access key, and session token if present) credentials from the current
+// user's home directory, and keeps track if those credentials are expired.
//
// Profile ini file example: $HOME/.aws/credentials
type SharedCredentialsProvider struct {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go
index 531139e3..cbba1e3d 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go
@@ -19,7 +19,9 @@ type StaticProvider struct {
}
// NewStaticCredentials returns a pointer to a new Credentials object
-// wrapping a static credentials value provider.
+// wrapping a static credentials value provider. Token is only required
+// for temporary security credentials retrieved via STS, otherwise an empty
+// string can be passed for this parameter.
func NewStaticCredentials(id, secret, token string) *Credentials {
return NewCredentials(&StaticProvider{Value: Value{
AccessKeyID: id,
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
index 2e528d13..6846ef6f 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
@@ -87,6 +87,7 @@ import (
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/internal/sdkrand"
"github.com/aws/aws-sdk-go/service/sts"
)
@@ -118,6 +119,10 @@ type AssumeRoler interface {
AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error)
}
+type assumeRolerWithContext interface {
+ AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error)
+}
+
// DefaultDuration is the default amount of time in minutes that the credentials
// will be valid for.
var DefaultDuration = time.Duration(15) * time.Minute
@@ -144,6 +149,13 @@ type AssumeRoleProvider struct {
// Session name, if you wish to reuse the credentials elsewhere.
RoleSessionName string
+ // Optional, you can pass tag key-value pairs to your session. These tags are called session tags.
+ Tags []*sts.Tag
+
+ // A list of keys for session tags that you want to set as transitive.
+ // If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain.
+ TransitiveTagKeys []*string
+
// Expiry duration of the STS credentials. Defaults to 15 minutes if not set.
Duration time.Duration
@@ -157,6 +169,29 @@ type AssumeRoleProvider struct {
// size.
Policy *string
+ // The ARNs of IAM managed policies you want to use as managed session policies.
+ // The policies must exist in the same account as the role.
+ //
+ // This parameter is optional. You can provide up to 10 managed policy ARNs.
+ // However, the plain text that you use for both inline and managed session
+ // policies can't exceed 2,048 characters.
+ //
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
+ //
+ // Passing policies to this operation returns new temporary credentials. The
+ // resulting session's permissions are the intersection of the role's identity-based
+ // policy and the session policies. You can use the role's temporary credentials
+ // in subsequent AWS API calls to access resources in the account that owns
+ // the role. You cannot use session policies to grant more permissions than
+ // those allowed by the identity-based policy of the role that is being assumed.
+ // For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // in the IAM User Guide.
+ PolicyArns []*sts.PolicyDescriptorType
+
// The identification number of the MFA device that is associated with the user
// who is making the AssumeRole call. Specify this value if the trust policy
// of the role being assumed includes a condition that requires MFA authentication.
@@ -258,6 +293,11 @@ func NewCredentialsWithClient(svc AssumeRoler, roleARN string, options ...func(*
// Retrieve generates a new set of temporary credentials using STS.
func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) {
+ return p.RetrieveWithContext(aws.BackgroundContext())
+}
+
+// RetrieveWithContext generates a new set of temporary credentials using STS.
+func (p *AssumeRoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) {
// Apply defaults where parameters are not set.
if p.RoleSessionName == "" {
// Try to work out a role name that will hopefully end up unique.
@@ -269,10 +309,13 @@ func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) {
}
jitter := time.Duration(sdkrand.SeededRand.Float64() * p.MaxJitterFrac * float64(p.Duration))
input := &sts.AssumeRoleInput{
- DurationSeconds: aws.Int64(int64((p.Duration - jitter) / time.Second)),
- RoleArn: aws.String(p.RoleARN),
- RoleSessionName: aws.String(p.RoleSessionName),
- ExternalId: p.ExternalID,
+ DurationSeconds: aws.Int64(int64((p.Duration - jitter) / time.Second)),
+ RoleArn: aws.String(p.RoleARN),
+ RoleSessionName: aws.String(p.RoleSessionName),
+ ExternalId: p.ExternalID,
+ Tags: p.Tags,
+ PolicyArns: p.PolicyArns,
+ TransitiveTagKeys: p.TransitiveTagKeys,
}
if p.Policy != nil {
input.Policy = p.Policy
@@ -295,7 +338,15 @@ func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) {
}
}
- roleOutput, err := p.Client.AssumeRole(input)
+ var roleOutput *sts.AssumeRoleOutput
+ var err error
+
+ if c, ok := p.Client.(assumeRolerWithContext); ok {
+ roleOutput, err = c.AssumeRoleWithContext(ctx, input)
+ } else {
+ roleOutput, err = p.Client.AssumeRole(input)
+ }
+
if err != nil {
return credentials.Value{ProviderName: ProviderName}, err
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go
index b20b6339..6feb262b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go
@@ -28,15 +28,34 @@ const (
// compare test values.
var now = time.Now
+// TokenFetcher shuold return WebIdentity token bytes or an error
+type TokenFetcher interface {
+ FetchToken(credentials.Context) ([]byte, error)
+}
+
+// FetchTokenPath is a path to a WebIdentity token file
+type FetchTokenPath string
+
+// FetchToken returns a token by reading from the filesystem
+func (f FetchTokenPath) FetchToken(ctx credentials.Context) ([]byte, error) {
+ data, err := ioutil.ReadFile(string(f))
+ if err != nil {
+ errMsg := fmt.Sprintf("unable to read file at %s", f)
+ return nil, awserr.New(ErrCodeWebIdentity, errMsg, err)
+ }
+ return data, nil
+}
+
// WebIdentityRoleProvider is used to retrieve credentials using
// an OIDC token.
type WebIdentityRoleProvider struct {
credentials.Expiry
+ PolicyArns []*sts.PolicyDescriptorType
client stsiface.STSAPI
ExpiryWindow time.Duration
- tokenFilePath string
+ tokenFetcher TokenFetcher
roleARN string
roleSessionName string
}
@@ -52,9 +71,15 @@ func NewWebIdentityCredentials(c client.ConfigProvider, roleARN, roleSessionName
// NewWebIdentityRoleProvider will return a new WebIdentityRoleProvider with the
// provided stsiface.STSAPI
func NewWebIdentityRoleProvider(svc stsiface.STSAPI, roleARN, roleSessionName, path string) *WebIdentityRoleProvider {
+ return NewWebIdentityRoleProviderWithToken(svc, roleARN, roleSessionName, FetchTokenPath(path))
+}
+
+// NewWebIdentityRoleProviderWithToken will return a new WebIdentityRoleProvider with the
+// provided stsiface.STSAPI and a TokenFetcher
+func NewWebIdentityRoleProviderWithToken(svc stsiface.STSAPI, roleARN, roleSessionName string, tokenFetcher TokenFetcher) *WebIdentityRoleProvider {
return &WebIdentityRoleProvider{
client: svc,
- tokenFilePath: path,
+ tokenFetcher: tokenFetcher,
roleARN: roleARN,
roleSessionName: roleSessionName,
}
@@ -64,10 +89,16 @@ func NewWebIdentityRoleProvider(svc stsiface.STSAPI, roleARN, roleSessionName, p
// 'WebIdentityTokenFilePath' specified destination and if that is empty an
// error will be returned.
func (p *WebIdentityRoleProvider) Retrieve() (credentials.Value, error) {
- b, err := ioutil.ReadFile(p.tokenFilePath)
+ return p.RetrieveWithContext(aws.BackgroundContext())
+}
+
+// RetrieveWithContext will attempt to assume a role from a token which is located at
+// 'WebIdentityTokenFilePath' specified destination and if that is empty an
+// error will be returned.
+func (p *WebIdentityRoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) {
+ b, err := p.tokenFetcher.FetchToken(ctx)
if err != nil {
- errMsg := fmt.Sprintf("unable to read file at %s", p.tokenFilePath)
- return credentials.Value{}, awserr.New(ErrCodeWebIdentity, errMsg, err)
+ return credentials.Value{}, awserr.New(ErrCodeWebIdentity, "failed fetching WebIdentity token: ", err)
}
sessionName := p.roleSessionName
@@ -77,10 +108,14 @@ func (p *WebIdentityRoleProvider) Retrieve() (credentials.Value, error) {
sessionName = strconv.FormatInt(now().UnixNano(), 10)
}
req, resp := p.client.AssumeRoleWithWebIdentityRequest(&sts.AssumeRoleWithWebIdentityInput{
+ PolicyArns: p.PolicyArns,
RoleArn: &p.roleARN,
RoleSessionName: &sessionName,
WebIdentityToken: aws.String(string(b)),
})
+
+ req.SetContext(ctx)
+
// InvalidIdentityToken error is a temporary error that can occur
// when assuming an Role with a JWT web identity token.
req.RetryErrorCodes = append(req.RetryErrorCodes, sts.ErrCodeInvalidIdentityTokenException)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go
index c7008d8c..835bcd49 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go
@@ -66,7 +66,6 @@ func (rep *Reporter) sendAPICallAttemptMetric(r *request.Request) {
XAmzRequestID: aws.String(r.RequestID),
- AttemptCount: aws.Int(r.RetryCount + 1),
AttemptLatency: aws.Int(int(now.Sub(r.AttemptTime).Nanoseconds() / int64(time.Millisecond))),
AccessKey: aws.String(creds.AccessKeyID),
}
@@ -90,7 +89,7 @@ func getMetricException(err awserr.Error) metricException {
code := err.Code()
switch code {
- case "RequestError",
+ case request.ErrCodeRequestError,
request.ErrCodeSerialization,
request.CanceledErrorCode:
return sdkException{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go
index d126764c..a716c021 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go
@@ -4,28 +4,73 @@ import (
"encoding/json"
"fmt"
"net/http"
+ "strconv"
"strings"
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/internal/sdkuri"
)
+// getToken uses the duration to return a token for EC2 metadata service,
+// or an error if the request failed.
+func (c *EC2Metadata) getToken(ctx aws.Context, duration time.Duration) (tokenOutput, error) {
+ op := &request.Operation{
+ Name: "GetToken",
+ HTTPMethod: "PUT",
+ HTTPPath: "/api/token",
+ }
+
+ var output tokenOutput
+ req := c.NewRequest(op, nil, &output)
+ req.SetContext(ctx)
+
+ // remove the fetch token handler from the request handlers to avoid infinite recursion
+ req.Handlers.Sign.RemoveByName(fetchTokenHandlerName)
+
+ // Swap the unmarshalMetadataHandler with unmarshalTokenHandler on this request.
+ req.Handlers.Unmarshal.Swap(unmarshalMetadataHandlerName, unmarshalTokenHandler)
+
+ ttl := strconv.FormatInt(int64(duration/time.Second), 10)
+ req.HTTPRequest.Header.Set(ttlHeader, ttl)
+
+ err := req.Send()
+
+ // Errors with bad request status should be returned.
+ if err != nil {
+ err = awserr.NewRequestFailure(
+ awserr.New(req.HTTPResponse.Status, http.StatusText(req.HTTPResponse.StatusCode), err),
+ req.HTTPResponse.StatusCode, req.RequestID)
+ }
+
+ return output, err
+}
+
// GetMetadata uses the path provided to request information from the EC2
-// instance metdata service. The content will be returned as a string, or
+// instance metadata service. The content will be returned as a string, or
// error if the request failed.
func (c *EC2Metadata) GetMetadata(p string) (string, error) {
+ return c.GetMetadataWithContext(aws.BackgroundContext(), p)
+}
+
+// GetMetadataWithContext uses the path provided to request information from the EC2
+// instance metadata service. The content will be returned as a string, or
+// error if the request failed.
+func (c *EC2Metadata) GetMetadataWithContext(ctx aws.Context, p string) (string, error) {
op := &request.Operation{
Name: "GetMetadata",
HTTPMethod: "GET",
HTTPPath: sdkuri.PathJoin("/meta-data", p),
}
-
output := &metadataOutput{}
+
req := c.NewRequest(op, nil, output)
- err := req.Send()
+ req.SetContext(ctx)
+
+ err := req.Send()
return output.Content, err
}
@@ -33,6 +78,13 @@ func (c *EC2Metadata) GetMetadata(p string) (string, error) {
// there is no user-data setup for the EC2 instance a "NotFoundError" error
// code will be returned.
func (c *EC2Metadata) GetUserData() (string, error) {
+ return c.GetUserDataWithContext(aws.BackgroundContext())
+}
+
+// GetUserDataWithContext returns the userdata that was configured for the service. If
+// there is no user-data setup for the EC2 instance a "NotFoundError" error
+// code will be returned.
+func (c *EC2Metadata) GetUserDataWithContext(ctx aws.Context) (string, error) {
op := &request.Operation{
Name: "GetUserData",
HTTPMethod: "GET",
@@ -41,13 +93,9 @@ func (c *EC2Metadata) GetUserData() (string, error) {
output := &metadataOutput{}
req := c.NewRequest(op, nil, output)
- req.Handlers.UnmarshalError.PushBack(func(r *request.Request) {
- if r.HTTPResponse.StatusCode == http.StatusNotFound {
- r.Error = awserr.New("NotFoundError", "user-data not found", r.Error)
- }
- })
- err := req.Send()
+ req.SetContext(ctx)
+ err := req.Send()
return output.Content, err
}
@@ -55,6 +103,13 @@ func (c *EC2Metadata) GetUserData() (string, error) {
// instance metadata service for dynamic data. The content will be returned
// as a string, or error if the request failed.
func (c *EC2Metadata) GetDynamicData(p string) (string, error) {
+ return c.GetDynamicDataWithContext(aws.BackgroundContext(), p)
+}
+
+// GetDynamicDataWithContext uses the path provided to request information from the EC2
+// instance metadata service for dynamic data. The content will be returned
+// as a string, or error if the request failed.
+func (c *EC2Metadata) GetDynamicDataWithContext(ctx aws.Context, p string) (string, error) {
op := &request.Operation{
Name: "GetDynamicData",
HTTPMethod: "GET",
@@ -63,8 +118,9 @@ func (c *EC2Metadata) GetDynamicData(p string) (string, error) {
output := &metadataOutput{}
req := c.NewRequest(op, nil, output)
- err := req.Send()
+ req.SetContext(ctx)
+ err := req.Send()
return output.Content, err
}
@@ -72,7 +128,14 @@ func (c *EC2Metadata) GetDynamicData(p string) (string, error) {
// instance. Error is returned if the request fails or is unable to parse
// the response.
func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentityDocument, error) {
- resp, err := c.GetDynamicData("instance-identity/document")
+ return c.GetInstanceIdentityDocumentWithContext(aws.BackgroundContext())
+}
+
+// GetInstanceIdentityDocumentWithContext retrieves an identity document describing an
+// instance. Error is returned if the request fails or is unable to parse
+// the response.
+func (c *EC2Metadata) GetInstanceIdentityDocumentWithContext(ctx aws.Context) (EC2InstanceIdentityDocument, error) {
+ resp, err := c.GetDynamicDataWithContext(ctx, "instance-identity/document")
if err != nil {
return EC2InstanceIdentityDocument{},
awserr.New("EC2MetadataRequestError",
@@ -91,7 +154,12 @@ func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentityDocument
// IAMInfo retrieves IAM info from the metadata API
func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) {
- resp, err := c.GetMetadata("iam/info")
+ return c.IAMInfoWithContext(aws.BackgroundContext())
+}
+
+// IAMInfoWithContext retrieves IAM info from the metadata API
+func (c *EC2Metadata) IAMInfoWithContext(ctx aws.Context) (EC2IAMInfo, error) {
+ resp, err := c.GetMetadataWithContext(ctx, "iam/info")
if err != nil {
return EC2IAMInfo{},
awserr.New("EC2MetadataRequestError",
@@ -116,24 +184,36 @@ func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) {
// Region returns the region the instance is running in.
func (c *EC2Metadata) Region() (string, error) {
- resp, err := c.GetMetadata("placement/availability-zone")
+ return c.RegionWithContext(aws.BackgroundContext())
+}
+
+// RegionWithContext returns the region the instance is running in.
+func (c *EC2Metadata) RegionWithContext(ctx aws.Context) (string, error) {
+ ec2InstanceIdentityDocument, err := c.GetInstanceIdentityDocumentWithContext(ctx)
if err != nil {
return "", err
}
-
- if len(resp) == 0 {
- return "", awserr.New("EC2MetadataError", "invalid Region response", nil)
+ // extract region from the ec2InstanceIdentityDocument
+ region := ec2InstanceIdentityDocument.Region
+ if len(region) == 0 {
+ return "", awserr.New("EC2MetadataError", "invalid region received for ec2metadata instance", nil)
}
-
- // returns region without the suffix. Eg: us-west-2a becomes us-west-2
- return resp[:len(resp)-1], nil
+ // returns region
+ return region, nil
}
// Available returns if the application has access to the EC2 Metadata service.
// Can be used to determine if application is running within an EC2 Instance and
// the metadata service is available.
func (c *EC2Metadata) Available() bool {
- if _, err := c.GetMetadata("instance-id"); err != nil {
+ return c.AvailableWithContext(aws.BackgroundContext())
+}
+
+// AvailableWithContext returns if the application has access to the EC2 Metadata service.
+// Can be used to determine if application is running within an EC2 Instance and
+// the metadata service is available.
+func (c *EC2Metadata) AvailableWithContext(ctx aws.Context) bool {
+ if _, err := c.GetMetadataWithContext(ctx, "instance-id"); err != nil {
return false
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go
index 4c5636e3..b8b2940d 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go
@@ -13,6 +13,7 @@ import (
"io"
"net/http"
"os"
+ "strconv"
"strings"
"time"
@@ -24,9 +25,25 @@ import (
"github.com/aws/aws-sdk-go/aws/request"
)
-// ServiceName is the name of the service.
-const ServiceName = "ec2metadata"
-const disableServiceEnvVar = "AWS_EC2_METADATA_DISABLED"
+const (
+ // ServiceName is the name of the service.
+ ServiceName = "ec2metadata"
+ disableServiceEnvVar = "AWS_EC2_METADATA_DISABLED"
+
+ // Headers for Token and TTL
+ ttlHeader = "x-aws-ec2-metadata-token-ttl-seconds"
+ tokenHeader = "x-aws-ec2-metadata-token"
+
+ // Named Handler constants
+ fetchTokenHandlerName = "FetchTokenHandler"
+ unmarshalMetadataHandlerName = "unmarshalMetadataHandler"
+ unmarshalTokenHandlerName = "unmarshalTokenHandler"
+ enableTokenProviderHandlerName = "enableTokenProviderHandler"
+
+ // TTL constants
+ defaultTTL = 21600 * time.Second
+ ttlExpirationWindow = 30 * time.Second
+)
// A EC2Metadata is an EC2 Metadata service Client.
type EC2Metadata struct {
@@ -63,8 +80,10 @@ func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
// use a shorter timeout than default because the metadata
// service is local if it is running, and to fail faster
// if not running on an ec2 instance.
- Timeout: 5 * time.Second,
+ Timeout: 1 * time.Second,
}
+ // max number of retries on the client operation
+ cfg.MaxRetries = aws.Int(2)
}
svc := &EC2Metadata{
@@ -80,13 +99,27 @@ func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
),
}
- svc.Handlers.Unmarshal.PushBack(unmarshalHandler)
+ // token provider instance
+ tp := newTokenProvider(svc, defaultTTL)
+
+ // NamedHandler for fetching token
+ svc.Handlers.Sign.PushBackNamed(request.NamedHandler{
+ Name: fetchTokenHandlerName,
+ Fn: tp.fetchTokenHandler,
+ })
+ // NamedHandler for enabling token provider
+ svc.Handlers.Complete.PushBackNamed(request.NamedHandler{
+ Name: enableTokenProviderHandlerName,
+ Fn: tp.enableTokenProviderHandler,
+ })
+
+ svc.Handlers.Unmarshal.PushBackNamed(unmarshalHandler)
svc.Handlers.UnmarshalError.PushBack(unmarshalError)
svc.Handlers.Validate.Clear()
svc.Handlers.Validate.PushBack(validateEndpointHandler)
// Disable the EC2 Metadata service if the environment variable is set.
- // This shortcirctes the service's functionality to always fail to send
+ // This short-circuits the service's functionality to always fail to send
// requests.
if strings.ToLower(os.Getenv(disableServiceEnvVar)) == "true" {
svc.Handlers.Send.SwapNamed(request.NamedHandler{
@@ -107,7 +140,6 @@ func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
for _, option := range opts {
option(svc.Client)
}
-
return svc
}
@@ -119,30 +151,74 @@ type metadataOutput struct {
Content string
}
-func unmarshalHandler(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
- b := &bytes.Buffer{}
- if _, err := io.Copy(b, r.HTTPResponse.Body); err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata response", err)
- return
- }
+type tokenOutput struct {
+ Token string
+ TTL time.Duration
+}
- if data, ok := r.Data.(*metadataOutput); ok {
- data.Content = b.String()
- }
+// unmarshal token handler is used to parse the response of a getToken operation
+var unmarshalTokenHandler = request.NamedHandler{
+ Name: unmarshalTokenHandlerName,
+ Fn: func(r *request.Request) {
+ defer r.HTTPResponse.Body.Close()
+ var b bytes.Buffer
+ if _, err := io.Copy(&b, r.HTTPResponse.Body); err != nil {
+ r.Error = awserr.NewRequestFailure(awserr.New(request.ErrCodeSerialization,
+ "unable to unmarshal EC2 metadata response", err), r.HTTPResponse.StatusCode, r.RequestID)
+ return
+ }
+
+ v := r.HTTPResponse.Header.Get(ttlHeader)
+ data, ok := r.Data.(*tokenOutput)
+ if !ok {
+ return
+ }
+
+ data.Token = b.String()
+ // TTL is in seconds
+ i, err := strconv.ParseInt(v, 10, 64)
+ if err != nil {
+ r.Error = awserr.NewRequestFailure(awserr.New(request.ParamFormatErrCode,
+ "unable to parse EC2 token TTL response", err), r.HTTPResponse.StatusCode, r.RequestID)
+ return
+ }
+ t := time.Duration(i) * time.Second
+ data.TTL = t
+ },
+}
+
+var unmarshalHandler = request.NamedHandler{
+ Name: unmarshalMetadataHandlerName,
+ Fn: func(r *request.Request) {
+ defer r.HTTPResponse.Body.Close()
+ var b bytes.Buffer
+ if _, err := io.Copy(&b, r.HTTPResponse.Body); err != nil {
+ r.Error = awserr.NewRequestFailure(awserr.New(request.ErrCodeSerialization,
+ "unable to unmarshal EC2 metadata response", err), r.HTTPResponse.StatusCode, r.RequestID)
+ return
+ }
+
+ if data, ok := r.Data.(*metadataOutput); ok {
+ data.Content = b.String()
+ }
+ },
}
func unmarshalError(r *request.Request) {
defer r.HTTPResponse.Body.Close()
- b := &bytes.Buffer{}
- if _, err := io.Copy(b, r.HTTPResponse.Body); err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata error response", err)
+ var b bytes.Buffer
+
+ if _, err := io.Copy(&b, r.HTTPResponse.Body); err != nil {
+ r.Error = awserr.NewRequestFailure(
+ awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata error response", err),
+ r.HTTPResponse.StatusCode, r.RequestID)
return
}
// Response body format is not consistent between metadata endpoints.
// Grab the error message as a string and include that as the source error
- r.Error = awserr.New("EC2MetadataError", "failed to make EC2Metadata request", errors.New(b.String()))
+ r.Error = awserr.NewRequestFailure(awserr.New("EC2MetadataError", "failed to make EC2Metadata request", errors.New(b.String())),
+ r.HTTPResponse.StatusCode, r.RequestID)
}
func validateEndpointHandler(r *request.Request) {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
index 87b9ff3f..654fb1ad 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
@@ -83,6 +83,7 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol
p := &ps[i]
custAddEC2Metadata(p)
custAddS3DualStack(p)
+ custRegionalS3(p)
custRmIotDataService(p)
custFixAppAutoscalingChina(p)
custFixAppAutoscalingUsGov(p)
@@ -92,7 +93,7 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol
}
func custAddS3DualStack(p *partition) {
- if p.ID != "aws" {
+ if !(p.ID == "aws" || p.ID == "aws-cn" || p.ID == "aws-us-gov") {
return
}
@@ -100,6 +101,33 @@ func custAddS3DualStack(p *partition) {
custAddDualstack(p, "s3-control")
}
+func custRegionalS3(p *partition) {
+ if p.ID != "aws" {
+ return
+ }
+
+ service, ok := p.Services["s3"]
+ if !ok {
+ return
+ }
+
+ // If global endpoint already exists no customization needed.
+ if _, ok := service.Endpoints["aws-global"]; ok {
+ return
+ }
+
+ service.PartitionEndpoint = "aws-global"
+ service.Endpoints["us-east-1"] = endpoint{}
+ service.Endpoints["aws-global"] = endpoint{
+ Hostname: "s3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ }
+
+ p.Services["s3"] = service
+}
+
func custAddDualstack(p *partition, svcName string) {
s, ok := p.Services[svcName]
if !ok {
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 d79b68f9..710d551c 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
@@ -17,6 +17,7 @@ const (
// AWS Standard partition's regions.
const (
+ AfSouth1RegionID = "af-south-1" // Africa (Cape Town).
ApEast1RegionID = "ap-east-1" // Asia Pacific (Hong Kong).
ApNortheast1RegionID = "ap-northeast-1" // Asia Pacific (Tokyo).
ApNortheast2RegionID = "ap-northeast-2" // Asia Pacific (Seoul).
@@ -24,11 +25,12 @@ const (
ApSoutheast1RegionID = "ap-southeast-1" // Asia Pacific (Singapore).
ApSoutheast2RegionID = "ap-southeast-2" // Asia Pacific (Sydney).
CaCentral1RegionID = "ca-central-1" // Canada (Central).
- EuCentral1RegionID = "eu-central-1" // EU (Frankfurt).
- EuNorth1RegionID = "eu-north-1" // EU (Stockholm).
- EuWest1RegionID = "eu-west-1" // EU (Ireland).
- EuWest2RegionID = "eu-west-2" // EU (London).
- EuWest3RegionID = "eu-west-3" // EU (Paris).
+ EuCentral1RegionID = "eu-central-1" // Europe (Frankfurt).
+ EuNorth1RegionID = "eu-north-1" // Europe (Stockholm).
+ EuSouth1RegionID = "eu-south-1" // Europe (Milan).
+ EuWest1RegionID = "eu-west-1" // Europe (Ireland).
+ EuWest2RegionID = "eu-west-2" // Europe (London).
+ EuWest3RegionID = "eu-west-3" // Europe (Paris).
MeSouth1RegionID = "me-south-1" // Middle East (Bahrain).
SaEast1RegionID = "sa-east-1" // South America (Sao Paulo).
UsEast1RegionID = "us-east-1" // US East (N. Virginia).
@@ -46,7 +48,7 @@ const (
// AWS GovCloud (US) partition's regions.
const (
UsGovEast1RegionID = "us-gov-east-1" // AWS GovCloud (US-East).
- UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US).
+ UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US-West).
)
// AWS ISO (US) partition's regions.
@@ -97,7 +99,7 @@ var awsPartition = partition{
DNSSuffix: "amazonaws.com",
RegionRegex: regionRegex{
Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$")
+ reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$")
return reg
}(),
},
@@ -107,6 +109,9 @@ var awsPartition = partition{
SignatureVersions: []string{"v4"},
},
Regions: regions{
+ "af-south-1": region{
+ Description: "Africa (Cape Town)",
+ },
"ap-east-1": region{
Description: "Asia Pacific (Hong Kong)",
},
@@ -129,19 +134,22 @@ var awsPartition = partition{
Description: "Canada (Central)",
},
"eu-central-1": region{
- Description: "EU (Frankfurt)",
+ Description: "Europe (Frankfurt)",
},
"eu-north-1": region{
- Description: "EU (Stockholm)",
+ Description: "Europe (Stockholm)",
+ },
+ "eu-south-1": region{
+ Description: "Europe (Milan)",
},
"eu-west-1": region{
- Description: "EU (Ireland)",
+ Description: "Europe (Ireland)",
},
"eu-west-2": region{
- Description: "EU (London)",
+ Description: "Europe (London)",
},
"eu-west-3": region{
- Description: "EU (Paris)",
+ Description: "Europe (Paris)",
},
"me-south-1": region{
Description: "Middle East (Bahrain)",
@@ -169,9 +177,10 @@ var awsPartition = partition{
"us-east-1": endpoint{},
},
},
- "acm": service{
+ "access-analyzer": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -181,6 +190,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -192,6 +202,61 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "acm": service{
+
+ Endpoints: endpoints{
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "ca-central-1-fips": endpoint{
+ Hostname: "acm-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-1-fips": endpoint{
+ Hostname: "acm-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-east-2": endpoint{},
+ "us-east-2-fips": endpoint{
+ Hostname: "acm-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-1": endpoint{},
+ "us-west-1-fips": endpoint{
+ Hostname: "acm-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "us-west-2": endpoint{},
+ "us-west-2-fips": endpoint{
+ Hostname: "acm-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
"acm-pca": service{
Defaults: endpoint{
Protocols: []string{"https"},
@@ -209,6 +274,61 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "fips-ca-central-1": endpoint{
+ Hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "acm-pca-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "acm-pca-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "acm-pca-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "acm-pca-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "api.detective": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ 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-north-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -218,6 +338,12 @@ var awsPartition = partition{
"api.ecr": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{
+ Hostname: "api.ecr.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ },
"ap-east-1": endpoint{
Hostname: "api.ecr.ap-east-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -272,6 +398,12 @@ var awsPartition = partition{
Region: "eu-north-1",
},
},
+ "eu-south-1": endpoint{
+ Hostname: "api.ecr.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ },
"eu-west-1": endpoint{
Hostname: "api.ecr.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -290,6 +422,30 @@ var awsPartition = partition{
Region: "eu-west-3",
},
},
+ "fips-us-east-1": endpoint{
+ Hostname: "ecr-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "ecr-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "ecr-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "ecr-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
"me-south-1": endpoint{
Hostname: "api.ecr.me-south-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -328,6 +484,29 @@ var awsPartition = partition{
},
},
},
+ "api.elastic-inference": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{
+ Hostname: "api.elastic-inference.ap-northeast-1.amazonaws.com",
+ },
+ "ap-northeast-2": endpoint{
+ Hostname: "api.elastic-inference.ap-northeast-2.amazonaws.com",
+ },
+ "eu-west-1": endpoint{
+ Hostname: "api.elastic-inference.eu-west-1.amazonaws.com",
+ },
+ "us-east-1": endpoint{
+ Hostname: "api.elastic-inference.us-east-1.amazonaws.com",
+ },
+ "us-east-2": endpoint{
+ Hostname: "api.elastic-inference.us-east-2.amazonaws.com",
+ },
+ "us-west-2": endpoint{
+ Hostname: "api.elastic-inference.us-west-2.amazonaws.com",
+ },
+ },
+ },
"api.mediatailor": service{
Endpoints: endpoints{
@@ -366,6 +545,7 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-1-fips": endpoint{
@@ -400,6 +580,7 @@ var awsPartition = partition{
"apigateway": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -409,6 +590,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -422,13 +604,10 @@ var awsPartition = partition{
},
"application-autoscaling": service{
Defaults: endpoint{
- Hostname: "autoscaling.{region}.amazonaws.com",
Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "application-autoscaling",
- },
},
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -438,6 +617,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -452,6 +632,7 @@ var awsPartition = partition{
"appmesh": service{
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -459,8 +640,12 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -521,8 +706,12 @@ var awsPartition = partition{
"eu-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -531,6 +720,7 @@ var awsPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -540,6 +730,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -553,13 +744,10 @@ var awsPartition = partition{
},
"autoscaling-plans": service{
Defaults: endpoint{
- Hostname: "autoscaling.{region}.amazonaws.com",
Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "autoscaling-plans",
- },
},
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -567,8 +755,12 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -578,14 +770,20 @@ var awsPartition = partition{
"backup": service{
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"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-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -607,12 +805,36 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "fips.batch.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "fips.batch.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "fips.batch.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "fips.batch.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"budgets": service{
@@ -661,12 +883,23 @@ var awsPartition = partition{
"cloud9": service{
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"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-north-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -687,6 +920,7 @@ var awsPartition = partition{
"cloudformation": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -696,15 +930,40 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
"me-south-1": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "us-east-1-fips": endpoint{
+ Hostname: "cloudformation-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-east-2": endpoint{},
+ "us-east-2-fips": endpoint{
+ Hostname: "cloudformation-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-1": endpoint{},
+ "us-west-1-fips": endpoint{
+ Hostname: "cloudformation-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "us-west-2": endpoint{},
+ "us-west-2-fips": endpoint{
+ Hostname: "cloudformation-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
},
},
"cloudfront": service{
@@ -756,6 +1015,7 @@ var awsPartition = partition{
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
"me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -780,6 +1040,7 @@ var awsPartition = partition{
"cloudtrail": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -789,29 +1050,69 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
- },
- },
- "codebuild": service{
-
- Endpoints: endpoints{
- "ap-east-1": endpoint{},
- "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-north-1": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "cloudtrail-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "cloudtrail-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "cloudtrail-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "cloudtrail-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "codeartifact": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "codebuild": service{
+
+ Endpoints: endpoints{
+ "ap-east-1": endpoint{},
+ "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-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -850,6 +1151,7 @@ var awsPartition = partition{
"codecommit": service{
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -867,16 +1169,18 @@ var awsPartition = partition{
Region: "ca-central-1",
},
},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"codedeploy": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -886,6 +1190,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -935,24 +1240,76 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "sa-east-1": endpoint{},
+ "fips-ca-central-1": endpoint{
+ Hostname: "codepipeline-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "codepipeline-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "codepipeline-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "codepipeline-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "codepipeline-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "codestar": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
- "codestar": service{
+ "codestar-connections": service{
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-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -971,9 +1328,27 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "cognito-identity-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "cognito-identity-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "cognito-identity-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"cognito-idp": service{
@@ -988,9 +1363,27 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "cognito-idp-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "cognito-idp-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "cognito-idp-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"cognito-sync": service{
@@ -1014,15 +1407,36 @@ var awsPartition = partition{
Protocols: []string{"https"},
},
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{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "comprehend-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "comprehend-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "comprehend-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"comprehendmedical": service{
@@ -1032,9 +1446,27 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"config": service{
@@ -1064,8 +1496,10 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-west-2": endpoint{},
},
@@ -1085,7 +1519,24 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "dataexchange": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -1102,15 +1553,26 @@ var awsPartition = partition{
"datasync": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
"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-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "fips-ca-central-1": endpoint{
+ Hostname: "datasync-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
"fips-us-east-1": endpoint{
Hostname: "datasync-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -1136,6 +1598,7 @@ var awsPartition = partition{
},
},
"me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -1151,6 +1614,8 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1167,6 +1632,7 @@ var awsPartition = partition{
"directconnect": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1176,46 +1642,83 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
- },
- },
- "discovery": service{
-
- Endpoints: endpoints{
- "us-west-2": endpoint{},
- },
- },
- "dms": service{
-
- Endpoints: endpoints{
- "ap-east-1": endpoint{},
- "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-north-1": endpoint{},
- "eu-west-1": endpoint{},
- "eu-west-2": endpoint{},
- "eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "directconnect-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "directconnect-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "directconnect-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "directconnect-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "discovery": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
"us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
+ "dms": service{
+
+ Endpoints: endpoints{
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "dms-fips": endpoint{
+ Hostname: "dms-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"docdb": service{
Endpoints: endpoints{
@@ -1231,6 +1734,12 @@ var awsPartition = partition{
Region: "ap-northeast-2",
},
},
+ "ap-south-1": endpoint{
+ Hostname: "rds.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
"ap-southeast-1": endpoint{
Hostname: "rds.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -1243,6 +1752,12 @@ var awsPartition = partition{
Region: "ap-southeast-2",
},
},
+ "ca-central-1": endpoint{
+ Hostname: "rds.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
"eu-central-1": endpoint{
Hostname: "rds.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -1261,6 +1776,12 @@ var awsPartition = partition{
Region: "eu-west-2",
},
},
+ "eu-west-3": endpoint{
+ Hostname: "rds.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
"us-east-1": endpoint{
Hostname: "rds.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -1284,6 +1805,7 @@ var awsPartition = partition{
"ds": service{
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -1294,11 +1816,43 @@ var awsPartition = partition{
"eu-north-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{},
+ "eu-west-3": endpoint{},
+ "fips-ca-central-1": endpoint{
+ Hostname: "ds-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "ds-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "ds-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "ds-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "ds-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"dynamodb": service{
@@ -1306,6 +1860,7 @@ var awsPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1321,6 +1876,7 @@ var awsPartition = partition{
},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -1368,6 +1924,7 @@ var awsPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1377,15 +1934,46 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-ca-central-1": endpoint{
+ Hostname: "ec2-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "ec2-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "ec2-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "ec2-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "ec2-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"ec2metadata": service{
@@ -1402,6 +1990,7 @@ var awsPartition = partition{
"ecs": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1411,20 +2000,88 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "ecs-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "ecs-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "ecs-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "ecs-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "eks": service{
+ Defaults: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ Endpoints: endpoints{
+ "ap-east-1": endpoint{},
+ "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-north-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "fips.eks.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "fips.eks.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "fips.eks.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"elasticache": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1434,6 +2091,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -1454,6 +2112,7 @@ var awsPartition = partition{
"elasticbeanstalk": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1463,20 +2122,47 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"elasticfilesystem": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -1484,13 +2170,137 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-af-south-1": endpoint{
+ Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ },
+ "fips-ap-east-1": endpoint{
+ Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ "fips-ap-northeast-1": endpoint{
+ Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ "fips-ap-northeast-2": endpoint{
+ Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ "fips-ap-south-1": endpoint{
+ Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ "fips-ap-southeast-1": endpoint{
+ Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ "fips-ap-southeast-2": endpoint{
+ Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ "fips-ca-central-1": endpoint{
+ Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-eu-central-1": endpoint{
+ Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ "fips-eu-north-1": endpoint{
+ Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ "fips-eu-south-1": endpoint{
+ Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ "fips-eu-west-1": endpoint{
+ Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ "fips-eu-west-2": endpoint{
+ Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ "fips-eu-west-3": endpoint{
+ Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ "fips-me-south-1": endpoint{
+ Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ "fips-sa-east-1": endpoint{
+ Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"elasticloadbalancing": service{
@@ -1498,6 +2308,7 @@ var awsPartition = partition{
Protocols: []string{"https"},
},
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1507,15 +2318,40 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"elasticmapreduce": service{
@@ -1524,6 +2360,7 @@ var awsPartition = partition{
Protocols: []string{"https"},
},
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1535,9 +2372,40 @@ var awsPartition = partition{
SSLCommonName: "{service}.{region}.{dnsSuffix}",
},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "fips-ca-central-1": endpoint{
+ Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
"me-south-1": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{
@@ -1585,6 +2453,7 @@ var awsPartition = partition{
"es": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1594,6 +2463,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -1614,6 +2484,7 @@ var awsPartition = partition{
"events": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1623,15 +2494,40 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "events-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "events-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "events-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "events-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"firehose": service{
@@ -1649,49 +2545,42 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "firehose-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "firehose-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "firehose-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "firehose-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"fms": service{
Defaults: endpoint{
Protocols: []string{"https"},
},
- Endpoints: endpoints{
- "ap-northeast-1": endpoint{},
- "ap-northeast-2": endpoint{},
- "ap-southeast-1": endpoint{},
- "ap-southeast-2": endpoint{},
- "eu-central-1": endpoint{},
- "eu-west-1": endpoint{},
- "eu-west-2": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
- },
- },
- "fsx": service{
-
- Endpoints: endpoints{
- "ap-northeast-1": endpoint{},
- "ap-southeast-1": endpoint{},
- "ap-southeast-2": endpoint{},
- "eu-central-1": endpoint{},
- "eu-north-1": endpoint{},
- "eu-west-1": endpoint{},
- "eu-west-2": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
- },
- },
- "gamelift": service{
-
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -1700,21 +2589,141 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
+ "eu-north-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{},
- },
- },
- "glacier": service{
- Defaults: endpoint{
- Protocols: []string{"http", "https"},
- },
- Endpoints: endpoints{
- "ap-east-1": endpoint{},
+ "eu-west-3": endpoint{},
+ "fips-ap-northeast-1": endpoint{
+ Hostname: "fms-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ "fips-ap-northeast-2": endpoint{
+ Hostname: "fms-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ "fips-ap-south-1": endpoint{
+ Hostname: "fms-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ "fips-ap-southeast-1": endpoint{
+ Hostname: "fms-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ "fips-ap-southeast-2": endpoint{
+ Hostname: "fms-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ "fips-ca-central-1": endpoint{
+ Hostname: "fms-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-eu-central-1": endpoint{
+ Hostname: "fms-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ "fips-eu-west-1": endpoint{
+ Hostname: "fms-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ "fips-eu-west-2": endpoint{
+ Hostname: "fms-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ "fips-eu-west-3": endpoint{
+ Hostname: "fms-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ "fips-sa-east-1": endpoint{
+ Hostname: "fms-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "fms-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "fms-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "fms-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "fms-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "forecast": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-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{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "forecastquery": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-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{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "fsx": service{
+
+ Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -1725,19 +2734,15 @@ var awsPartition = partition{
"eu-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
- "eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
- "glue": service{
+ "gamelift": service{
Endpoints: endpoints{
- "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -1745,11 +2750,8 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
- "eu-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
- "eu-west-3": endpoint{},
- "me-south-1": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1757,6 +2759,110 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "glacier": service{
+ Defaults: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ Endpoints: endpoints{
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
+ "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-north-1": endpoint{},
+ "eu-south-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "fips-ca-central-1": endpoint{
+ Hostname: "glacier-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "glacier-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "glacier-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "glacier-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "glacier-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "glue": service{
+
+ Endpoints: endpoints{
+ "ap-east-1": endpoint{},
+ "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-north-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "glue-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "glue-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "glue-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "glue-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"greengrass": service{
IsRegionalized: boxedTrue,
Defaults: endpoint{
@@ -1779,8 +2885,12 @@ var awsPartition = partition{
"groundstation": service{
Endpoints: endpoints{
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-north-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "me-south-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"guardduty": service{
@@ -1850,6 +2960,12 @@ var awsPartition = partition{
Region: "us-east-1",
},
},
+ "iam-fips": endpoint{
+ Hostname: "iam-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
},
},
"importexport": service{
@@ -1878,10 +2994,34 @@ var awsPartition = partition{
"eu-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "inspector-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "inspector-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "inspector-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "inspector-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"iot": service{
@@ -2002,17 +3142,40 @@ var awsPartition = partition{
},
},
},
- "iotthingsgraph": service{
- Defaults: endpoint{
- CredentialScope: credentialScope{
- Service: "iotthingsgraph",
- },
- },
+ "iotsecuredtunneling": service{
+
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
- "eu-west-1": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "iotthingsgraph": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "iotthingsgraph",
+ },
+ },
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-west-2": endpoint{},
},
@@ -2032,6 +3195,7 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -2042,6 +3206,7 @@ var awsPartition = partition{
"kinesis": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -2051,30 +3216,59 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "kinesis-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "kinesis-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "kinesis-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "kinesis-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"kinesisanalytics": service{
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"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-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -2083,17 +3277,27 @@ var awsPartition = partition{
"kinesisvideo": service{
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"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{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
"us-west-2": endpoint{},
},
},
"kms": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -2103,6 +3307,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -2118,15 +3323,27 @@ 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-north-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
"lambda": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -2136,20 +3353,46 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "lambda-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "lambda-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "lambda-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "lambda-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"license-manager": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -2159,15 +3402,40 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "license-manager-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "license-manager-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "license-manager-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "license-manager-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"lightsail": service{
@@ -2191,6 +3459,7 @@ var awsPartition = partition{
"logs": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -2200,6 +3469,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -2218,6 +3488,35 @@ var awsPartition = partition{
"us-east-1": endpoint{},
},
},
+ "macie": service{
+
+ Endpoints: endpoints{
+ "fips-us-east-1": endpoint{
+ Hostname: "macie-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "macie-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "managedblockchain": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ },
+ },
"marketplacecommerceanalytics": service{
Endpoints: endpoints{
@@ -2227,6 +3526,7 @@ var awsPartition = partition{
"mediaconnect": service{
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -2254,14 +3554,45 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-ca-central-1": endpoint{
+ Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "mediaconvert-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "mediaconvert-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "mediaconvert-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "mediaconvert-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"medialive": service{
@@ -2292,6 +3623,7 @@ var awsPartition = partition{
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -2310,6 +3642,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-west-2": endpoint{},
},
@@ -2321,6 +3654,7 @@ var awsPartition = partition{
},
},
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -2330,6 +3664,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -2344,7 +3679,11 @@ var awsPartition = partition{
"mgh": service{
Endpoints: endpoints{
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"mobileanalytics": service{
@@ -2360,39 +3699,22 @@ var awsPartition = partition{
},
},
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-west-2": endpoint{},
- },
- },
- "monitoring": service{
- Defaults: endpoint{
- Protocols: []string{"http", "https"},
- },
- Endpoints: endpoints{
- "ap-east-1": endpoint{},
- "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-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
- "eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
"us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
- "mq": service{
-
+ "monitoring": service{
+ Defaults: endpoint{
+ Protocols: []string{"http", "https"},
+ },
Endpoints: endpoints{
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -2400,41 +3722,92 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
"fips-us-east-1": endpoint{
- Hostname: "mq-fips.us-east-1.amazonaws.com",
+ Hostname: "monitoring-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
"fips-us-east-2": endpoint{
- Hostname: "mq-fips.us-east-2.amazonaws.com",
+ Hostname: "monitoring-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
"fips-us-west-1": endpoint{
- Hostname: "mq-fips.us-west-1.amazonaws.com",
+ Hostname: "monitoring-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
"fips-us-west-2": endpoint{
- Hostname: "mq-fips.us-west-2.amazonaws.com",
+ Hostname: "monitoring-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
- },
- },
- "mturk-requester": service{
- IsRegionalized: boxedFalse,
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "mq": service{
+
+ Endpoints: endpoints{
+ "ap-east-1": endpoint{},
+ "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-north-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "mq-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "mq-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "mq-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "mq-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "mturk-requester": service{
+ IsRegionalized: boxedFalse,
Endpoints: endpoints{
"sandbox": endpoint{
@@ -2476,6 +3849,12 @@ var awsPartition = partition{
Region: "ap-southeast-2",
},
},
+ "ca-central-1": endpoint{
+ Hostname: "rds.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
"eu-central-1": endpoint{
Hostname: "rds.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -2500,6 +3879,18 @@ var awsPartition = partition{
Region: "eu-west-2",
},
},
+ "eu-west-3": endpoint{
+ Hostname: "rds.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ "me-south-1": endpoint{
+ Hostname: "rds.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
"us-east-1": endpoint{
Hostname: "rds.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -2520,6 +3911,65 @@ var awsPartition = partition{
},
},
},
+ "oidc": service{
+
+ Endpoints: endpoints{
+ "ap-southeast-1": endpoint{
+ Hostname: "oidc.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ "ap-southeast-2": endpoint{
+ Hostname: "oidc.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ "ca-central-1": endpoint{
+ Hostname: "oidc.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "eu-central-1": endpoint{
+ Hostname: "oidc.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ "eu-west-1": endpoint{
+ Hostname: "oidc.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ "eu-west-2": endpoint{
+ Hostname: "oidc.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ "us-east-1": endpoint{
+ Hostname: "oidc.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-east-2": endpoint{
+ Hostname: "oidc.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-2": endpoint{
+ Hostname: "oidc.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
"opsworks": service{
Endpoints: endpoints{
@@ -2565,29 +4015,20 @@ var awsPartition = partition{
Region: "us-east-1",
},
},
- },
- },
- "pinpoint": service{
- Defaults: endpoint{
- CredentialScope: credentialScope{
- Service: "mobiletargeting",
+ "fips-aws-global": endpoint{
+ Hostname: "organizations-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
},
},
- Endpoints: endpoints{
- "ap-south-1": endpoint{},
- "ap-southeast-2": endpoint{},
- "eu-central-1": endpoint{},
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-west-2": endpoint{},
- },
},
- "polly": service{
+ "outposts": service{
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
- "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
@@ -2596,56 +4037,81 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
- },
- },
- "projects.iot1click": service{
-
- Endpoints: endpoints{
- "ap-northeast-1": endpoint{},
- "eu-central-1": endpoint{},
- "eu-west-1": endpoint{},
- "eu-west-2": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "fips-ca-central-1": endpoint{
+ Hostname: "outposts-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "outposts-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "outposts-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "outposts-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "outposts-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
- "qldb": service{
-
- Endpoints: endpoints{
- "ap-northeast-1": endpoint{},
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "pinpoint": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "mobiletargeting",
+ },
},
- },
- "ram": service{
-
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-north-1": endpoint{},
"eu-west-1": endpoint{},
- "eu-west-2": endpoint{},
- "eu-west-3": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "pinpoint-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "pinpoint-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "us-east-1": endpoint{
+ Hostname: "pinpoint.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-west-2": endpoint{
+ Hostname: "pinpoint.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
},
},
- "rds": service{
+ "polly": service{
Endpoints: endpoints{
"ap-east-1": endpoint{},
@@ -2660,23 +4126,130 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{
- SSLCommonName: "{service}.{dnsSuffix}",
+ "fips-us-east-1": endpoint{
+ Hostname: "polly-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
- },
- },
- "redshift": service{
-
- Endpoints: endpoints{
- "ap-east-1": endpoint{},
- "ap-northeast-1": endpoint{},
- "ap-northeast-2": endpoint{},
- "ap-south-1": endpoint{},
+ "fips-us-east-2": endpoint{
+ Hostname: "polly-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "polly-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "polly-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "portal.sso": service{
+
+ Endpoints: endpoints{
+ "ap-southeast-1": endpoint{
+ Hostname: "portal.sso.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ "ap-southeast-2": endpoint{
+ Hostname: "portal.sso.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ "ca-central-1": endpoint{
+ Hostname: "portal.sso.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "eu-central-1": endpoint{
+ Hostname: "portal.sso.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ "eu-west-1": endpoint{
+ Hostname: "portal.sso.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ "eu-west-2": endpoint{
+ Hostname: "portal.sso.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ "us-east-1": endpoint{
+ Hostname: "portal.sso.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-east-2": endpoint{
+ Hostname: "portal.sso.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-2": endpoint{
+ Hostname: "portal.sso.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "projects.iot1click": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "qldb": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": 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{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "ram": service{
+
+ Endpoints: endpoints{
+ "ap-east-1": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
@@ -2693,6 +4266,118 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "rds": service{
+
+ Endpoints: endpoints{
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
+ "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-north-1": endpoint{},
+ "eu-south-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "rds-fips.ca-central-1": endpoint{
+ Hostname: "rds-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "rds-fips.us-east-1": endpoint{
+ Hostname: "rds-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "rds-fips.us-east-2": endpoint{
+ Hostname: "rds-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "rds-fips.us-west-1": endpoint{
+ Hostname: "rds-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "rds-fips.us-west-2": endpoint{
+ Hostname: "rds-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{
+ SSLCommonName: "{service}.{dnsSuffix}",
+ },
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "redshift": service{
+
+ Endpoints: endpoints{
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
+ "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-north-1": endpoint{},
+ "eu-south-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "fips-ca-central-1": endpoint{
+ Hostname: "redshift-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "redshift-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "redshift-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "redshift-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "redshift-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"rekognition": service{
Endpoints: endpoints{
@@ -2713,6 +4398,7 @@ var awsPartition = partition{
"resource-groups": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -2722,6 +4408,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -2793,6 +4480,7 @@ var awsPartition = partition{
Protocols: []string{"https"},
},
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -2800,9 +4488,12 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -2816,9 +4507,13 @@ var awsPartition = partition{
},
},
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-west-2": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"runtime.sagemaker": service{
@@ -2836,6 +4531,7 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-1-fips": endpoint{
@@ -2868,7 +4564,7 @@ var awsPartition = partition{
},
},
"s3": service{
- PartitionEndpoint: "us-east-1",
+ PartitionEndpoint: "aws-global",
IsRegionalized: boxedTrue,
Defaults: endpoint{
Protocols: []string{"http", "https"},
@@ -2878,7 +4574,8 @@ var awsPartition = partition{
DualStackHostname: "{service}.dualstack.{region}.{dnsSuffix}",
},
Endpoints: endpoints{
- "ap-east-1": endpoint{},
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{
Hostname: "s3.ap-northeast-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
@@ -2893,9 +4590,17 @@ var awsPartition = partition{
Hostname: "s3.ap-southeast-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
+ "aws-global": endpoint{
+ Hostname: "s3.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{
Hostname: "s3.eu-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
@@ -2915,7 +4620,7 @@ var awsPartition = partition{
SignatureVersions: []string{"s3", "s3v4"},
},
"us-east-1": endpoint{
- Hostname: "s3.amazonaws.com",
+ Hostname: "s3.us-east-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"us-east-2": endpoint{},
@@ -3080,6 +4785,41 @@ var awsPartition = partition{
},
},
},
+ "savingsplans": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+
+ Endpoints: endpoints{
+ "aws-global": endpoint{
+ Hostname: "savingsplans.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "schemas": service{
+
+ Endpoints: endpoints{
+ "ap-east-1": endpoint{},
+ "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-north-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"sdb": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
@@ -3101,6 +4841,7 @@ var awsPartition = partition{
"secretsmanager": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -3110,9 +4851,11 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-1-fips": endpoint{
@@ -3147,6 +4890,7 @@ var awsPartition = partition{
"securityhub": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -3156,15 +4900,40 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "securityhub-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "securityhub-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "securityhub-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "securityhub-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"serverlessrepo": service{
@@ -3208,6 +4977,9 @@ var awsPartition = partition{
"eu-west-3": endpoint{
Protocols: []string{"https"},
},
+ "me-south-1": endpoint{
+ Protocols: []string{"https"},
+ },
"sa-east-1": endpoint{
Protocols: []string{"https"},
},
@@ -3228,6 +5000,8 @@ var awsPartition = partition{
"servicecatalog": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
@@ -3236,9 +5010,11 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-1-fips": endpoint{
@@ -3297,6 +5073,10 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": 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{},
@@ -3304,18 +5084,31 @@ var awsPartition = partition{
},
},
"shield": service{
- IsRegionalized: boxedFalse,
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
Defaults: endpoint{
SSLCommonName: "shield.us-east-1.amazonaws.com",
Protocols: []string{"https"},
},
Endpoints: endpoints{
- "us-east-1": endpoint{},
+ "aws-global": endpoint{
+ Hostname: "shield.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-aws-global": endpoint{
+ Hostname: "shield-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
},
},
"sms": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -3325,15 +5118,40 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "sms-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "sms-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "sms-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "sms-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"snowball": service{
@@ -3349,11 +5167,101 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-ap-northeast-1": endpoint{
+ Hostname: "snowball-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ "fips-ap-northeast-2": endpoint{
+ Hostname: "snowball-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ "fips-ap-south-1": endpoint{
+ Hostname: "snowball-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ "fips-ap-southeast-1": endpoint{
+ Hostname: "snowball-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ "fips-ap-southeast-2": endpoint{
+ Hostname: "snowball-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ "fips-ca-central-1": endpoint{
+ Hostname: "snowball-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-eu-central-1": endpoint{
+ Hostname: "snowball-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ "fips-eu-west-1": endpoint{
+ Hostname: "snowball-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ "fips-eu-west-2": endpoint{
+ Hostname: "snowball-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ "fips-eu-west-3": endpoint{
+ Hostname: "snowball-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ "fips-sa-east-1": endpoint{
+ Hostname: "snowball-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "snowball-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "snowball-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "snowball-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "snowball-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"sns": service{
@@ -3361,6 +5269,7 @@ var awsPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -3370,15 +5279,40 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "sns-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "sns-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "sns-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "sns-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"sqs": service{
@@ -3387,6 +5321,7 @@ var awsPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -3396,6 +5331,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -3436,6 +5372,7 @@ var awsPartition = partition{
"ssm": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -3445,20 +5382,70 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "ssm-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "ssm-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "ssm-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "ssm-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "ssm-facade-fips-us-east-1": endpoint{
+ Hostname: "ssm-facade-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "ssm-facade-fips-us-east-2": endpoint{
+ Hostname: "ssm-facade-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "ssm-facade-fips-us-west-1": endpoint{
+ Hostname: "ssm-facade-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "ssm-facade-fips-us-west-2": endpoint{
+ Hostname: "ssm-facade-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"states": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -3468,29 +5455,56 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
- },
- },
- "storagegateway": service{
-
- Endpoints: endpoints{
- "ap-east-1": endpoint{},
- "ap-northeast-1": endpoint{},
- "ap-northeast-2": endpoint{},
- "ap-south-1": endpoint{},
- "ap-southeast-1": endpoint{},
- "ap-southeast-2": endpoint{},
- "ca-central-1": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "states-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "states-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "states-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "states-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "storagegateway": service{
+
+ Endpoints: endpoints{
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
+ "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-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -3568,44 +5582,31 @@ var awsPartition = partition{
},
"sts": service{
PartitionEndpoint: "aws-global",
- Defaults: endpoint{
- Hostname: "sts.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
+
Endpoints: endpoints{
- "ap-east-1": endpoint{
- Hostname: "sts.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
+ "af-south-1": endpoint{},
+ "ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
- "ap-northeast-2": endpoint{
- Hostname: "sts.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
+ "ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
- "aws-global": endpoint{},
- "ca-central-1": endpoint{},
- "eu-central-1": endpoint{},
- "eu-north-1": endpoint{},
- "eu-west-1": endpoint{},
- "eu-west-2": endpoint{},
- "eu-west-3": endpoint{},
- "me-south-1": endpoint{
- Hostname: "sts.me-south-1.amazonaws.com",
+ "aws-global": endpoint{
+ Hostname: "sts.amazonaws.com",
CredentialScope: credentialScope{
- Region: "me-south-1",
+ Region: "us-east-1",
},
},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
"us-east-1-fips": endpoint{
Hostname: "sts-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -3650,6 +5651,7 @@ var awsPartition = partition{
"swf": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -3659,20 +5661,46 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
- "me-south-1": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "swf-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "swf-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "swf-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "swf-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"tagging": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -3682,6 +5710,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -3693,6 +5722,65 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "transcribe": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "ap-east-1": endpoint{},
+ "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{},
+ "eu-west-3": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "fips.transcribe.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "fips.transcribe.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoint{
+ Hostname: "fips.transcribe.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "fips.transcribe.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "transcribestreaming": service{
+
+ Endpoints: endpoints{
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"transfer": service{
Endpoints: endpoints{
@@ -3719,13 +5807,18 @@ var awsPartition = partition{
Protocols: []string{"https"},
},
Endpoints: endpoints{
+ "ap-east-1": endpoint{},
"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-north-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"us-east-1": endpoint{},
"us-east-1-fips": endpoint{
Hostname: "translate-fips.us-east-1.amazonaws.com",
@@ -3733,54 +5826,261 @@ var awsPartition = partition{
Region: "us-east-1",
},
},
- "us-east-2": endpoint{},
- "us-east-2-fips": endpoint{
- Hostname: "translate-fips.us-east-2.amazonaws.com",
+ "us-east-2": endpoint{},
+ "us-east-2-fips": endpoint{
+ Hostname: "translate-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ "us-west-2-fips": endpoint{
+ Hostname: "translate-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "waf": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+
+ Endpoints: endpoints{
+ "aws-fips": endpoint{
+ Hostname: "waf-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "aws-global": endpoint{
+ Hostname: "waf.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "waf-regional": service{
+
+ Endpoints: endpoints{
+ "ap-east-1": endpoint{
+ Hostname: "waf-regional.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ "ap-northeast-1": endpoint{
+ Hostname: "waf-regional.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ "ap-northeast-2": endpoint{
+ Hostname: "waf-regional.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ "ap-south-1": endpoint{
+ Hostname: "waf-regional.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ "ap-southeast-1": endpoint{
+ Hostname: "waf-regional.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ "ap-southeast-2": endpoint{
+ Hostname: "waf-regional.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ "ca-central-1": endpoint{
+ Hostname: "waf-regional.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "eu-central-1": endpoint{
+ Hostname: "waf-regional.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ "eu-north-1": endpoint{
+ Hostname: "waf-regional.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ "eu-west-1": endpoint{
+ Hostname: "waf-regional.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ "eu-west-2": endpoint{
+ Hostname: "waf-regional.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ "eu-west-3": endpoint{
+ Hostname: "waf-regional.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ "fips-ap-east-1": endpoint{
+ Hostname: "waf-regional-fips.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ "fips-ap-northeast-1": endpoint{
+ Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ "fips-ap-northeast-2": endpoint{
+ Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ "fips-ap-south-1": endpoint{
+ Hostname: "waf-regional-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ "fips-ap-southeast-1": endpoint{
+ Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ "fips-ap-southeast-2": endpoint{
+ Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ "fips-ca-central-1": endpoint{
+ Hostname: "waf-regional-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-eu-central-1": endpoint{
+ Hostname: "waf-regional-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ "fips-eu-north-1": endpoint{
+ Hostname: "waf-regional-fips.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ "fips-eu-west-1": endpoint{
+ Hostname: "waf-regional-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ "fips-eu-west-2": endpoint{
+ Hostname: "waf-regional-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ "fips-eu-west-3": endpoint{
+ Hostname: "waf-regional-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ "fips-me-south-1": endpoint{
+ Hostname: "waf-regional-fips.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ "fips-sa-east-1": endpoint{
+ Hostname: "waf-regional-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ "fips-us-east-1": endpoint{
+ Hostname: "waf-regional-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoint{
+ Hostname: "waf-regional-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
- "us-west-2": endpoint{},
- "us-west-2-fips": endpoint{
- Hostname: "translate-fips.us-west-2.amazonaws.com",
+ "fips-us-west-1": endpoint{
+ Hostname: "waf-regional-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "waf-regional-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
- },
- },
- "waf": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
-
- Endpoints: endpoints{
- "aws-global": endpoint{
- Hostname: "waf.amazonaws.com",
+ "me-south-1": endpoint{
+ Hostname: "waf-regional.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ "sa-east-1": endpoint{
+ Hostname: "waf-regional.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ "us-east-1": endpoint{
+ Hostname: "waf-regional.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
- },
- },
- "waf-regional": service{
-
- 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-north-1": endpoint{},
- "eu-west-1": endpoint{},
- "eu-west-2": endpoint{},
- "eu-west-3": endpoint{},
- "sa-east-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "us-east-2": endpoint{
+ Hostname: "waf-regional.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-1": endpoint{
+ Hostname: "waf-regional.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "us-west-2": endpoint{
+ Hostname: "waf-regional.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
},
},
"workdocs": service{
@@ -3790,8 +6090,20 @@ var awsPartition = partition{
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-west-2": endpoint{},
+ "fips-us-east-1": endpoint{
+ Hostname: "workdocs-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-west-2": endpoint{
+ Hostname: "workdocs-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"workmail": service{
@@ -3823,6 +6135,7 @@ var awsPartition = partition{
"xray": service{
Endpoints: endpoints{
+ "af-south-1": endpoint{},
"ap-east-1": endpoint{},
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
@@ -3832,6 +6145,7 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-north-1": endpoint{},
+ "eu-south-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
@@ -3875,6 +6189,13 @@ var awscnPartition = partition{
},
},
Services: services{
+ "acm": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"api.ecr": service{
Endpoints: endpoints{
@@ -3892,6 +6213,13 @@ var awscnPartition = partition{
},
},
},
+ "api.sagemaker": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"apigateway": service{
Endpoints: endpoints{
@@ -3901,17 +6229,26 @@ var awscnPartition = partition{
},
"application-autoscaling": service{
Defaults: endpoint{
- Hostname: "autoscaling.{region}.amazonaws.com.cn",
Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "application-autoscaling",
- },
},
Endpoints: endpoints{
"cn-north-1": endpoint{},
"cn-northwest-1": endpoint{},
},
},
+ "appsync": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
+ "athena": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"autoscaling": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
@@ -3921,6 +6258,22 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
+ "autoscaling-plans": service{
+ Defaults: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "backup": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"batch": service{
Endpoints: endpoints{
@@ -3928,6 +6281,19 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
+ "budgets": service{
+ PartitionEndpoint: "aws-cn-global",
+ IsRegionalized: boxedFalse,
+
+ Endpoints: endpoints{
+ "aws-cn-global": endpoint{
+ Hostname: "budgets.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
"cloudformation": service{
Endpoints: endpoints{
@@ -3963,6 +6329,13 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
+ "codecommit": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"codedeploy": service{
Endpoints: endpoints{
@@ -3983,6 +6356,12 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
+ "dax": service{
+
+ Endpoints: endpoints{
+ "cn-northwest-1": endpoint{},
+ },
+ },
"directconnect": service{
Endpoints: endpoints{
@@ -4040,6 +6419,15 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
+ "eks": service{
+ Defaults: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"elasticache": service{
Endpoints: endpoints{
@@ -4054,6 +6442,25 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
+ "elasticfilesystem": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ "fips-cn-north-1": endpoint{
+ Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ "fips-cn-northwest-1": endpoint{
+ Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
"elasticloadbalancing": service{
Defaults: endpoint{
Protocols: []string{"https"},
@@ -4108,6 +6515,13 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
+ "glue": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"greengrass": service{
IsRegionalized: boxedTrue,
Defaults: endpoint{
@@ -4117,6 +6531,13 @@ var awscnPartition = partition{
"cn-north-1": endpoint{},
},
},
+ "health": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"iam": service{
PartitionEndpoint: "aws-cn-global",
IsRegionalized: boxedFalse,
@@ -4141,6 +6562,20 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
+ "iotsecuredtunneling": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "kafka": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"kinesis": service{
Endpoints: endpoints{
@@ -4148,6 +6583,13 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
+ "kinesisanalytics": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"kms": service{
Endpoints: endpoints{
@@ -4196,20 +6638,51 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
+ "neptune": service{
+
+ Endpoints: endpoints{
+ "cn-northwest-1": endpoint{
+ Hostname: "rds.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
"polly": service{
Endpoints: endpoints{
"cn-northwest-1": endpoint{},
},
},
- "rds": service{
+ "rds": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "redshift": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "route53": service{
+ PartitionEndpoint: "aws-cn-global",
+ IsRegionalized: boxedFalse,
Endpoints: endpoints{
- "cn-north-1": endpoint{},
- "cn-northwest-1": endpoint{},
+ "aws-cn-global": endpoint{
+ Hostname: "route53.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
},
},
- "redshift": service{
+ "runtime.sagemaker": service{
Endpoints: endpoints{
"cn-north-1": endpoint{},
@@ -4220,6 +6693,9 @@ var awscnPartition = partition{
Defaults: endpoint{
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
+
+ HasDualStack: boxedTrue,
+ DualStackHostname: "{service}.dualstack.{region}.{dnsSuffix}",
},
Endpoints: endpoints{
"cn-north-1": endpoint{},
@@ -4230,6 +6706,9 @@ var awscnPartition = partition{
Defaults: endpoint{
Protocols: []string{"https"},
SignatureVersions: []string{"s3v4"},
+
+ HasDualStack: boxedTrue,
+ DualStackHostname: "{service}.dualstack.{region}.{dnsSuffix}",
},
Endpoints: endpoints{
"cn-north-1": endpoint{
@@ -4248,6 +6727,26 @@ var awscnPartition = partition{
},
},
},
+ "secretsmanager": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "serverlessrepo": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ "cn-northwest-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ },
"sms": service{
Endpoints: endpoints{
@@ -4259,6 +6758,12 @@ var awscnPartition = partition{
Endpoints: endpoints{
"cn-north-1": endpoint{},
+ "fips-cn-north-1": endpoint{
+ Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
},
},
"sns": service{
@@ -4297,7 +6802,8 @@ var awscnPartition = partition{
"storagegateway": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"streams.dynamodb": service{
@@ -4340,6 +6846,38 @@ var awscnPartition = partition{
},
"tagging": service{
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "transcribe": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{
+ Hostname: "cn.transcribe.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ "cn-northwest-1": endpoint{
+ Hostname: "cn.transcribe.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "workspaces": service{
+
+ Endpoints: endpoints{
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "xray": service{
+
Endpoints: endpoints{
"cn-north-1": endpoint{},
"cn-northwest-1": endpoint{},
@@ -4373,10 +6911,17 @@ var awsusgovPartition = partition{
Description: "AWS GovCloud (US-East)",
},
"us-gov-west-1": region{
- Description: "AWS GovCloud (US)",
+ Description: "AWS GovCloud (US-West)",
},
},
Services: services{
+ "access-analyzer": service{
+
+ Endpoints: endpoints{
+ "us-gov-east-1": endpoint{},
+ "us-gov-west-1": endpoint{},
+ },
+ },
"acm": service{
Endpoints: endpoints{
@@ -4389,6 +6934,18 @@ var awsusgovPartition = partition{
Protocols: []string{"https"},
},
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "acm-pca.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "acm-pca.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4396,6 +6953,18 @@ var awsusgovPartition = partition{
"api.ecr": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{
Hostname: "api.ecr.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
@@ -4414,6 +6983,18 @@ var awsusgovPartition = partition{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
+ "us-gov-west-1-fips": endpoint{
+ Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-west-1-fips-secondary": endpoint{
+ Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"apigateway": service{
@@ -4425,7 +7006,8 @@ var awsusgovPartition = partition{
},
"application-autoscaling": service{
Defaults: endpoint{
- Hostname: "autoscaling.{region}.amazonaws.com",
+ Hostname: "autoscaling.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "application-autoscaling",
},
@@ -4455,6 +7037,18 @@ var awsusgovPartition = partition{
"athena": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "athena-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "athena-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4462,12 +7056,42 @@ var awsusgovPartition = partition{
"autoscaling": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Protocols: []string{"http", "https"},
+ },
"us-gov-west-1": endpoint{
Protocols: []string{"http", "https"},
},
},
},
+ "autoscaling-plans": service{
+ Defaults: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ Endpoints: endpoints{
+ "us-gov-east-1": endpoint{},
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "batch": service{
+
+ Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "batch.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "batch.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-east-1": endpoint{},
+ "us-gov-west-1": endpoint{},
+ },
+ },
"clouddirectory": service{
Endpoints: endpoints{
@@ -4477,8 +7101,18 @@ var awsusgovPartition = partition{
"cloudformation": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
- "us-gov-west-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "cloudformation.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "us-gov-west-1": endpoint{
+ Hostname: "cloudformation.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"cloudhsm": service{
@@ -4501,20 +7135,48 @@ var awsusgovPartition = partition{
"cloudtrail": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
- "us-gov-west-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "cloudtrail.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "us-gov-west-1": endpoint{
+ Hostname: "cloudtrail.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"codebuild": service{
Endpoints: endpoints{
"us-gov-east-1": endpoint{},
+ "us-gov-east-1-fips": endpoint{
+ Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
"us-gov-west-1": endpoint{},
+ "us-gov-west-1-fips": endpoint{
+ Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"codecommit": service{
Endpoints: endpoints{
+ "fips": endpoint{
+ Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4538,10 +7200,52 @@ var awsusgovPartition = partition{
},
},
},
+ "codepipeline": service{
+
+ Endpoints: endpoints{
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "cognito-identity": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "cognito-idp": service{
+
+ Endpoints: endpoints{
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-west-1": endpoint{},
+ },
+ },
"comprehend": service{
Defaults: endpoint{
Protocols: []string{"https"},
},
+ Endpoints: endpoints{
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "comprehendmedical": service{
+
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
@@ -4556,25 +7260,48 @@ var awsusgovPartition = partition{
"datasync": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "datasync-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
"fips-us-gov-west-1": endpoint{
Hostname: "datasync-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
+ "us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
},
"directconnect": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
- "us-gov-west-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "directconnect.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "us-gov-west-1": endpoint{
+ Hostname: "directconnect.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"dms": service{
Endpoints: endpoints{
+ "dms-fips": endpoint{
+ Hostname: "dms.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4582,6 +7309,18 @@ var awsusgovPartition = partition{
"ds": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "ds-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "ds-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4608,8 +7347,18 @@ var awsusgovPartition = partition{
"ec2": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
- "us-gov-west-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "ec2.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "us-gov-west-1": endpoint{
+ Hostname: "ec2.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"ec2metadata": service{
@@ -4625,6 +7374,27 @@ var awsusgovPartition = partition{
},
"ecs": service{
+ Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "ecs-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "ecs-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-east-1": endpoint{},
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "eks": service{
+ Defaults: endpoint{
+ Protocols: []string{"http", "https"},
+ },
Endpoints: endpoints{
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
@@ -4634,7 +7404,7 @@ var awsusgovPartition = partition{
Endpoints: endpoints{
"fips": endpoint{
- Hostname: "elasticache-fips.us-gov-west-1.amazonaws.com",
+ Hostname: "elasticache.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
@@ -4646,19 +7416,54 @@ var awsusgovPartition = partition{
"elasticbeanstalk": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
- "us-gov-west-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "us-gov-west-1": endpoint{
+ Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"elasticfilesystem": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
},
"elasticloadbalancing": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "elasticloadbalancing-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "elasticloadbalancing-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{
Protocols: []string{"http", "https"},
@@ -4668,12 +7473,36 @@ var awsusgovPartition = partition{
"elasticmapreduce": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{
Protocols: []string{"https"},
},
},
},
+ "email": service{
+
+ Endpoints: endpoints{
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "email-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-west-1": endpoint{},
+ },
+ },
"es": service{
Endpoints: endpoints{
@@ -4690,13 +7519,35 @@ var awsusgovPartition = partition{
"events": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
- "us-gov-west-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "events.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "us-gov-west-1": endpoint{
+ Hostname: "events.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"firehose": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "firehose-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "firehose-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4704,15 +7555,36 @@ var awsusgovPartition = partition{
"glacier": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "glacier.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
"us-gov-west-1": endpoint{
+ Hostname: "glacier.us-gov-west-1.amazonaws.com",
Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
},
},
},
"glue": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "glue-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "glue-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4723,7 +7595,12 @@ var awsusgovPartition = partition{
Protocols: []string{"https"},
},
Endpoints: endpoints{
- "us-gov-west-1": endpoint{},
+ "us-gov-west-1": endpoint{
+ Hostname: "greengrass.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"guardduty": service{
@@ -4733,6 +7610,12 @@ var awsusgovPartition = partition{
},
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
+ "us-gov-west-1-fips": endpoint{
+ Hostname: "guardduty.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"health": service{
@@ -4752,11 +7635,29 @@ var awsusgovPartition = partition{
Region: "us-gov-west-1",
},
},
+ "iam-govcloud-fips": endpoint{
+ Hostname: "iam.us-gov.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"inspector": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "inspector-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "inspector-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4771,9 +7672,34 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "iotsecuredtunneling": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "kafka": service{
+
+ Endpoints: endpoints{
+ "us-gov-east-1": endpoint{},
+ "us-gov-west-1": endpoint{},
+ },
+ },
"kinesis": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "kinesis-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "kinesis-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4794,6 +7720,18 @@ var awsusgovPartition = partition{
"lambda": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4801,6 +7739,18 @@ var awsusgovPartition = partition{
"license-manager": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4815,7 +7765,12 @@ var awsusgovPartition = partition{
"mediaconvert": service{
Endpoints: endpoints{
- "us-gov-west-1": endpoint{},
+ "us-gov-west-1": endpoint{
+ Hostname: "mediaconvert.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"metering.marketplace": service{
@@ -4832,6 +7787,18 @@ var awsusgovPartition = partition{
"monitoring": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "monitoring.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "monitoring.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4864,11 +7831,50 @@ var awsusgovPartition = partition{
Region: "us-gov-west-1",
},
},
+ "fips-aws-us-gov-global": endpoint{
+ Hostname: "organizations.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "outposts": service{
+
+ Endpoints: endpoints{
+ "us-gov-east-1": endpoint{
+ Hostname: "outposts.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "us-gov-west-1": endpoint{
+ Hostname: "outposts.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "pinpoint": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "mobiletargeting",
+ },
+ },
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
},
},
"polly": service{
Endpoints: endpoints{
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "polly-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-west-1": endpoint{},
},
},
@@ -4882,6 +7888,18 @@ var awsusgovPartition = partition{
"rds": service{
Endpoints: endpoints{
+ "rds.us-gov-east-1": endpoint{
+ Hostname: "rds.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "rds.us-gov-west-1": endpoint{
+ Hostname: "rds.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -4889,8 +7907,18 @@ var awsusgovPartition = partition{
"redshift": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
- "us-gov-west-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "redshift.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "us-gov-west-1": endpoint{
+ Hostname: "redshift.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"rekognition": service{
@@ -4947,6 +7975,9 @@ var awsusgovPartition = partition{
"s3": service{
Defaults: endpoint{
SignatureVersions: []string{"s3", "s3v4"},
+
+ HasDualStack: boxedTrue,
+ DualStackHostname: "{service}.dualstack.{region}.{dnsSuffix}",
},
Endpoints: endpoints{
"fips-us-gov-west-1": endpoint{
@@ -4969,6 +8000,9 @@ var awsusgovPartition = partition{
Defaults: endpoint{
Protocols: []string{"https"},
SignatureVersions: []string{"s3v4"},
+
+ HasDualStack: boxedTrue,
+ DualStackHostname: "{service}.dualstack.{region}.{dnsSuffix}",
},
Endpoints: endpoints{
"us-gov-east-1": endpoint{
@@ -5020,22 +8054,56 @@ var awsusgovPartition = partition{
},
},
},
+ "securityhub": service{
+
+ Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-east-1": endpoint{},
+ "us-gov-west-1": endpoint{},
+ },
+ },
"serverlessrepo": service{
Defaults: endpoint{
Protocols: []string{"https"},
},
Endpoints: endpoints{
"us-gov-east-1": endpoint{
+ Hostname: "serverlessrepo.us-gov-east-1.amazonaws.com",
Protocols: []string{"https"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
},
"us-gov-west-1": endpoint{
+ Hostname: "serverlessrepo.us-gov-west-1.amazonaws.com",
Protocols: []string{"https"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
},
},
},
"servicecatalog": service{
Endpoints: endpoints{
+ "us-gov-east-1": endpoint{},
+ "us-gov-east-1-fips": endpoint{
+ Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
"us-gov-west-1": endpoint{},
"us-gov-west-1-fips": endpoint{
Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com",
@@ -5048,6 +8116,18 @@ var awsusgovPartition = partition{
"sms": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "sms-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "sms-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -5055,6 +8135,18 @@ var awsusgovPartition = partition{
"snowball": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "snowball-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "snowball-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -5062,25 +8154,67 @@ var awsusgovPartition = partition{
"sns": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "sns.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
"us-gov-west-1": endpoint{
+ Hostname: "sns.us-gov-west-1.amazonaws.com",
Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
},
},
},
"sqs": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "sqs.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
"us-gov-west-1": endpoint{
+ Hostname: "sqs.us-gov-west-1.amazonaws.com",
SSLCommonName: "{region}.queue.{dnsSuffix}",
Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
},
},
},
"ssm": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "ssm.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "ssm.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "ssm-facade-fips-us-gov-east-1": endpoint{
+ Hostname: "ssm-facade.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "ssm-facade-fips-us-gov-west-1": endpoint{
+ Hostname: "ssm-facade.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -5088,6 +8222,18 @@ var awsusgovPartition = partition{
"states": service{
Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "states-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "states.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
"us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
@@ -5095,6 +8241,13 @@ var awsusgovPartition = partition{
"storagegateway": service{
Endpoints: endpoints{
+ "fips": endpoint{
+ Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-east-1": endpoint{},
"us-gov-west-1": endpoint{},
},
},
@@ -5125,14 +8278,54 @@ var awsusgovPartition = partition{
Endpoints: endpoints{
"us-gov-east-1": endpoint{},
+ "us-gov-east-1-fips": endpoint{
+ Hostname: "sts.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
"us-gov-west-1": endpoint{},
+ "us-gov-west-1-fips": endpoint{
+ Hostname: "sts.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "support": service{
+ PartitionEndpoint: "aws-us-gov-global",
+
+ Endpoints: endpoints{
+ "aws-us-gov-global": endpoint{
+ Hostname: "support.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "support.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"swf": service{
Endpoints: endpoints{
- "us-gov-east-1": endpoint{},
- "us-gov-west-1": endpoint{},
+ "us-gov-east-1": endpoint{
+ Hostname: "swf.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "us-gov-west-1": endpoint{
+ Hostname: "swf.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"tagging": service{
@@ -5142,6 +8335,27 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "transcribe": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "fips-us-gov-east-1": endpoint{
+ Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-east-1": endpoint{},
+ "us-gov-west-1": endpoint{},
+ },
+ },
"translate": service{
Defaults: endpoint{
Protocols: []string{"https"},
@@ -5159,7 +8373,18 @@ var awsusgovPartition = partition{
"waf-regional": service{
Endpoints: endpoints{
- "us-gov-west-1": endpoint{},
+ "fips-us-gov-west-1": endpoint{
+ Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ "us-gov-west-1": endpoint{
+ Hostname: "waf-regional.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"workspaces": service{
@@ -5168,6 +8393,13 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "xray": service{
+
+ Endpoints: endpoints{
+ "us-gov-east-1": endpoint{},
+ "us-gov-west-1": endpoint{},
+ },
+ },
},
}
@@ -5208,6 +8440,12 @@ var awsisoPartition = partition{
},
},
},
+ "api.sagemaker": service{
+
+ Endpoints: endpoints{
+ "us-iso-east-1": endpoint{},
+ },
+ },
"apigateway": service{
Endpoints: endpoints{
@@ -5216,11 +8454,7 @@ var awsisoPartition = partition{
},
"application-autoscaling": service{
Defaults: endpoint{
- Hostname: "autoscaling.{region}.amazonaws.com",
Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "application-autoscaling",
- },
},
Endpoints: endpoints{
"us-iso-east-1": endpoint{},
@@ -5252,6 +8486,14 @@ var awsisoPartition = partition{
"us-iso-east-1": endpoint{},
},
},
+ "comprehend": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "us-iso-east-1": endpoint{},
+ },
+ },
"config": service{
Endpoints: endpoints{
@@ -5273,6 +8515,12 @@ var awsisoPartition = partition{
"dms": service{
Endpoints: endpoints{
+ "dms-fips": endpoint{
+ Hostname: "dms.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ },
"us-iso-east-1": endpoint{},
},
},
@@ -5335,6 +8583,12 @@ var awsisoPartition = partition{
},
},
},
+ "es": service{
+
+ Endpoints: endpoints{
+ "us-iso-east-1": endpoint{},
+ },
+ },
"events": service{
Endpoints: endpoints{
@@ -5429,6 +8683,12 @@ var awsisoPartition = partition{
},
},
},
+ "runtime.sagemaker": service{
+
+ Endpoints: endpoints{
+ "us-iso-east-1": endpoint{},
+ },
+ },
"s3": service{
Defaults: endpoint{
SignatureVersions: []string{"s3v4"},
@@ -5542,11 +8802,7 @@ var awsisobPartition = partition{
Services: services{
"application-autoscaling": service{
Defaults: endpoint{
- Hostname: "autoscaling.{region}.amazonaws.com",
Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "application-autoscaling",
- },
},
Endpoints: endpoints{
"us-isob-east-1": endpoint{},
@@ -5587,6 +8843,12 @@ var awsisobPartition = partition{
"dms": service{
Endpoints: endpoints{
+ "dms-fips": endpoint{
+ Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ },
"us-isob-east-1": endpoint{},
},
},
@@ -5686,6 +8948,18 @@ var awsisobPartition = partition{
"us-isob-east-1": endpoint{},
},
},
+ "lambda": service{
+
+ Endpoints: endpoints{
+ "us-isob-east-1": endpoint{},
+ },
+ },
+ "license-manager": service{
+
+ Endpoints: endpoints{
+ "us-isob-east-1": endpoint{},
+ },
+ },
"logs": service{
Endpoints: endpoints{
@@ -5742,6 +9016,12 @@ var awsisobPartition = partition{
"us-isob-east-1": endpoint{},
},
},
+ "ssm": service{
+
+ Endpoints: endpoints{
+ "us-isob-east-1": endpoint{},
+ },
+ },
"states": service{
Endpoints: endpoints{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
index 9c936be6..ca956e5f 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
@@ -3,6 +3,7 @@ package endpoints
import (
"fmt"
"regexp"
+ "strings"
"github.com/aws/aws-sdk-go/aws/awserr"
)
@@ -46,6 +47,108 @@ type Options struct {
//
// This option is ignored if StrictMatching is enabled.
ResolveUnknownService bool
+
+ // STS Regional Endpoint flag helps with resolving the STS endpoint
+ STSRegionalEndpoint STSRegionalEndpoint
+
+ // S3 Regional Endpoint flag helps with resolving the S3 endpoint
+ S3UsEast1RegionalEndpoint S3UsEast1RegionalEndpoint
+}
+
+// STSRegionalEndpoint is an enum for the states of the STS Regional Endpoint
+// options.
+type STSRegionalEndpoint int
+
+func (e STSRegionalEndpoint) String() string {
+ switch e {
+ case LegacySTSEndpoint:
+ return "legacy"
+ case RegionalSTSEndpoint:
+ return "regional"
+ case UnsetSTSEndpoint:
+ return ""
+ default:
+ return "unknown"
+ }
+}
+
+const (
+
+ // UnsetSTSEndpoint represents that STS Regional Endpoint flag is not specified.
+ UnsetSTSEndpoint STSRegionalEndpoint = iota
+
+ // LegacySTSEndpoint represents when STS Regional Endpoint flag is specified
+ // to use legacy endpoints.
+ LegacySTSEndpoint
+
+ // RegionalSTSEndpoint represents when STS Regional Endpoint flag is specified
+ // to use regional endpoints.
+ RegionalSTSEndpoint
+)
+
+// GetSTSRegionalEndpoint function returns the STSRegionalEndpointFlag based
+// on the input string provided in env config or shared config by the user.
+//
+// `legacy`, `regional` are the only case-insensitive valid strings for
+// resolving the STS regional Endpoint flag.
+func GetSTSRegionalEndpoint(s string) (STSRegionalEndpoint, error) {
+ switch {
+ case strings.EqualFold(s, "legacy"):
+ return LegacySTSEndpoint, nil
+ case strings.EqualFold(s, "regional"):
+ return RegionalSTSEndpoint, nil
+ default:
+ return UnsetSTSEndpoint, fmt.Errorf("unable to resolve the value of STSRegionalEndpoint for %v", s)
+ }
+}
+
+// S3UsEast1RegionalEndpoint is an enum for the states of the S3 us-east-1
+// Regional Endpoint options.
+type S3UsEast1RegionalEndpoint int
+
+func (e S3UsEast1RegionalEndpoint) String() string {
+ switch e {
+ case LegacyS3UsEast1Endpoint:
+ return "legacy"
+ case RegionalS3UsEast1Endpoint:
+ return "regional"
+ case UnsetS3UsEast1Endpoint:
+ return ""
+ default:
+ return "unknown"
+ }
+}
+
+const (
+
+ // UnsetS3UsEast1Endpoint represents that S3 Regional Endpoint flag is not
+ // specified.
+ UnsetS3UsEast1Endpoint S3UsEast1RegionalEndpoint = iota
+
+ // LegacyS3UsEast1Endpoint represents when S3 Regional Endpoint flag is
+ // specified to use legacy endpoints.
+ LegacyS3UsEast1Endpoint
+
+ // RegionalS3UsEast1Endpoint represents when S3 Regional Endpoint flag is
+ // specified to use regional endpoints.
+ RegionalS3UsEast1Endpoint
+)
+
+// GetS3UsEast1RegionalEndpoint function returns the S3UsEast1RegionalEndpointFlag based
+// on the input string provided in env config or shared config by the user.
+//
+// `legacy`, `regional` are the only case-insensitive valid strings for
+// resolving the S3 regional Endpoint flag.
+func GetS3UsEast1RegionalEndpoint(s string) (S3UsEast1RegionalEndpoint, error) {
+ switch {
+ case strings.EqualFold(s, "legacy"):
+ return LegacyS3UsEast1Endpoint, nil
+ case strings.EqualFold(s, "regional"):
+ return RegionalS3UsEast1Endpoint, nil
+ default:
+ return UnsetS3UsEast1Endpoint,
+ fmt.Errorf("unable to resolve the value of S3UsEast1RegionalEndpoint for %v", s)
+ }
}
// Set combines all of the option functions together.
@@ -79,6 +182,12 @@ func ResolveUnknownServiceOption(o *Options) {
o.ResolveUnknownService = true
}
+// STSRegionalEndpointOption enables the STS endpoint resolver behavior to resolve
+// STS endpoint to their regional endpoint, instead of the global endpoint.
+func STSRegionalEndpointOption(o *Options) {
+ o.STSRegionalEndpoint = RegionalSTSEndpoint
+}
+
// A Resolver provides the interface for functionality to resolve endpoints.
// The build in Partition and DefaultResolver return value satisfy this interface.
type Resolver interface {
@@ -194,7 +303,7 @@ func (p Partition) ID() string { return p.id }
// require the provided service and region to be known by the partition.
// If the endpoint cannot be strictly resolved an error will be returned. This
// mode is useful to ensure the endpoint resolved is valid. Without
-// StrictMatching enabled the endpoint returned my look valid but may not work.
+// StrictMatching enabled the endpoint returned may look valid but may not work.
// StrictMatching requires the SDK to be updated if you want to take advantage
// of new regions and services expansions.
//
@@ -208,7 +317,7 @@ func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) (
// Regions returns a map of Regions indexed by their ID. This is useful for
// enumerating over the regions in a partition.
func (p Partition) Regions() map[string]Region {
- rs := map[string]Region{}
+ rs := make(map[string]Region, len(p.p.Regions))
for id, r := range p.p.Regions {
rs[id] = Region{
id: id,
@@ -223,7 +332,7 @@ func (p Partition) Regions() map[string]Region {
// Services returns a map of Service indexed by their ID. This is useful for
// enumerating over the services in a partition.
func (p Partition) Services() map[string]Service {
- ss := map[string]Service{}
+ ss := make(map[string]Service, len(p.p.Services))
for id := range p.p.Services {
ss[id] = Service{
id: id,
@@ -310,7 +419,7 @@ func (s Service) Regions() map[string]Region {
// A region is the AWS region the service exists in. Whereas a Endpoint is
// an URL that can be resolved to a instance of a service.
func (s Service) Endpoints() map[string]Endpoint {
- es := map[string]Endpoint{}
+ es := make(map[string]Endpoint, len(s.p.Services[s.id].Endpoints))
for id := range s.p.Services[s.id].Endpoints {
es[id] = Endpoint{
id: id,
@@ -350,6 +459,9 @@ type ResolvedEndpoint struct {
// The endpoint URL
URL string
+ // The endpoint partition
+ PartitionID string
+
// The region that should be used for signing requests.
SigningRegion string
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
index 523ad79a..77361372 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
@@ -7,6 +7,8 @@ import (
"strings"
)
+var regionValidationRegex = regexp.MustCompile(`^[[:alnum:]]([[:alnum:]\-]*[[:alnum:]])?$`)
+
type partitions []partition
func (ps partitions) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
@@ -75,24 +77,56 @@ func (p partition) canResolveEndpoint(service, region string, strictMatch bool)
return p.RegionRegex.MatchString(region)
}
+func allowLegacyEmptyRegion(service string) bool {
+ legacy := map[string]struct{}{
+ "budgets": {},
+ "ce": {},
+ "chime": {},
+ "cloudfront": {},
+ "ec2metadata": {},
+ "iam": {},
+ "importexport": {},
+ "organizations": {},
+ "route53": {},
+ "sts": {},
+ "support": {},
+ "waf": {},
+ }
+
+ _, allowed := legacy[service]
+ return allowed
+}
+
func (p partition) EndpointFor(service, region string, opts ...func(*Options)) (resolved ResolvedEndpoint, err error) {
var opt Options
opt.Set(opts...)
s, hasService := p.Services[service]
- if !(hasService || opt.ResolveUnknownService) {
+ if len(service) == 0 || !(hasService || opt.ResolveUnknownService) {
// Only return error if the resolver will not fallback to creating
// endpoint based on service endpoint ID passed in.
return resolved, NewUnknownServiceError(p.ID, service, serviceList(p.Services))
}
+ if len(region) == 0 && allowLegacyEmptyRegion(service) && len(s.PartitionEndpoint) != 0 {
+ region = s.PartitionEndpoint
+ }
+
+ if (service == "sts" && opt.STSRegionalEndpoint != RegionalSTSEndpoint) ||
+ (service == "s3" && opt.S3UsEast1RegionalEndpoint != RegionalS3UsEast1Endpoint) {
+ if _, ok := legacyGlobalRegions[service][region]; ok {
+ region = "aws-global"
+ }
+ }
+
e, hasEndpoint := s.endpointForRegion(region)
- if !hasEndpoint && opt.StrictMatching {
+ if len(region) == 0 || (!hasEndpoint && opt.StrictMatching) {
return resolved, NewUnknownEndpointError(p.ID, service, region, endpointList(s.Endpoints))
}
defs := []endpoint{p.Defaults, s.Defaults}
- return e.resolve(service, region, p.DNSSuffix, defs, opt), nil
+
+ return e.resolve(service, p.ID, region, p.DNSSuffix, defs, opt)
}
func serviceList(ss services) []string {
@@ -201,7 +235,7 @@ func getByPriority(s []string, p []string, def string) string {
return s[0]
}
-func (e endpoint) resolve(service, region, dnsSuffix string, defs []endpoint, opts Options) ResolvedEndpoint {
+func (e endpoint) resolve(service, partitionID, region, dnsSuffix string, defs []endpoint, opts Options) (ResolvedEndpoint, error) {
var merged endpoint
for _, def := range defs {
merged.mergeIn(def)
@@ -209,11 +243,27 @@ func (e endpoint) resolve(service, region, dnsSuffix string, defs []endpoint, op
merged.mergeIn(e)
e = merged
- hostname := e.Hostname
+ signingRegion := e.CredentialScope.Region
+ if len(signingRegion) == 0 {
+ signingRegion = region
+ }
+ signingName := e.CredentialScope.Service
+ var signingNameDerived bool
+ if len(signingName) == 0 {
+ signingName = service
+ signingNameDerived = true
+ }
+
+ hostname := e.Hostname
// Offset the hostname for dualstack if enabled
if opts.UseDualStack && e.HasDualStack == boxedTrue {
hostname = e.DualStackHostname
+ region = signingRegion
+ }
+
+ if !validateInputRegion(region) {
+ return ResolvedEndpoint{}, fmt.Errorf("invalid region identifier format provided")
}
u := strings.Replace(hostname, "{service}", service, 1)
@@ -223,25 +273,14 @@ func (e endpoint) resolve(service, region, dnsSuffix string, defs []endpoint, op
scheme := getEndpointScheme(e.Protocols, opts.DisableSSL)
u = fmt.Sprintf("%s://%s", scheme, u)
- signingRegion := e.CredentialScope.Region
- if len(signingRegion) == 0 {
- signingRegion = region
- }
-
- signingName := e.CredentialScope.Service
- var signingNameDerived bool
- if len(signingName) == 0 {
- signingName = service
- signingNameDerived = true
- }
-
return ResolvedEndpoint{
URL: u,
+ PartitionID: partitionID,
SigningRegion: signingRegion,
SigningName: signingName,
SigningNameDerived: signingNameDerived,
SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner),
- }
+ }, nil
}
func getEndpointScheme(protocols []string, disableSSL bool) string {
@@ -306,3 +345,7 @@ const (
boxedFalse
boxedTrue
)
+
+func validateInputRegion(region string) bool {
+ return regionValidationRegex.MatchString(region)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
index 185b0731..e819ab6c 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
@@ -10,6 +10,7 @@ import (
type Handlers struct {
Validate HandlerList
Build HandlerList
+ BuildStream HandlerList
Sign HandlerList
Send HandlerList
ValidateResponse HandlerList
@@ -28,6 +29,7 @@ func (h *Handlers) Copy() Handlers {
return Handlers{
Validate: h.Validate.copy(),
Build: h.Build.copy(),
+ BuildStream: h.BuildStream.copy(),
Sign: h.Sign.copy(),
Send: h.Send.copy(),
ValidateResponse: h.ValidateResponse.copy(),
@@ -46,6 +48,7 @@ func (h *Handlers) Copy() Handlers {
func (h *Handlers) Clear() {
h.Validate.Clear()
h.Build.Clear()
+ h.BuildStream.Clear()
h.Send.Clear()
h.Sign.Clear()
h.Unmarshal.Clear()
@@ -67,6 +70,9 @@ func (h *Handlers) IsEmpty() bool {
if h.Build.Len() != 0 {
return false
}
+ if h.BuildStream.Len() != 0 {
+ return false
+ }
if h.Send.Len() != 0 {
return false
}
@@ -320,3 +326,18 @@ func MakeAddToUserAgentFreeFormHandler(s string) func(*Request) {
AddToUserAgent(r, s)
}
}
+
+// WithSetRequestHeaders updates the operation request's HTTP header to contain
+// the header key value pairs provided. If the header key already exists in the
+// request's HTTP header set, the existing value(s) will be replaced.
+func WithSetRequestHeaders(h map[string]string) Option {
+ return withRequestHeader(h).SetRequestHeaders
+}
+
+type withRequestHeader map[string]string
+
+func (h withRequestHeader) SetRequestHeaders(r *Request) {
+ for k, v := range h {
+ r.HTTPRequest.Header[k] = []string{v}
+ }
+}
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 8e332cce..d597c6ea 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
@@ -36,6 +36,10 @@ const (
// API request that was canceled. Requests given a aws.Context may
// return this error when canceled.
CanceledErrorCode = "RequestCanceled"
+
+ // ErrCodeRequestError is an error preventing the SDK from continuing to
+ // process the request.
+ ErrCodeRequestError = "RequestError"
)
// A Request is the service request to be made.
@@ -51,6 +55,7 @@ type Request struct {
HTTPRequest *http.Request
HTTPResponse *http.Response
Body io.ReadSeeker
+ streamingBody io.ReadCloser
BodyStart int64 // offset from beginning of Body that the request body starts
Params interface{}
Error error
@@ -99,8 +104,12 @@ type Operation struct {
BeforePresignFn func(r *Request) error
}
-// New returns a new Request pointer for the service API
-// operation and parameters.
+// New returns a new Request pointer for the service API operation and
+// parameters.
+//
+// A Retryer should be provided to direct how the request is retried. If
+// Retryer is nil, a default no retry value will be used. You can use
+// NoOpRetryer in the Client package to disable retry behavior directly.
//
// Params is any value of input parameters to be the request payload.
// Data is pointer value to an object which the request's response
@@ -108,6 +117,10 @@ type Operation struct {
func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers,
retryer Retryer, operation *Operation, params interface{}, data interface{}) *Request {
+ if retryer == nil {
+ retryer = noOpRetryer{}
+ }
+
method := operation.HTTPMethod
if method == "" {
method = "POST"
@@ -122,8 +135,6 @@ 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,
@@ -287,6 +298,13 @@ func (r *Request) SetReaderBody(reader io.ReadSeeker) {
r.ResetBody()
}
+// SetStreamingBody set the reader to be used for the request that will stream
+// bytes to the server. Request's Body must not be set to any reader.
+func (r *Request) SetStreamingBody(reader io.ReadCloser) {
+ r.streamingBody = reader
+ r.SetReaderBody(aws.ReadSeekCloser(reader))
+}
+
// Presign returns the request's signed URL. Error will be returned
// if the signing fails. The expire parameter is only used for presigned Amazon
// S3 API requests. All other AWS services will use a fixed expiration
@@ -406,11 +424,17 @@ func (r *Request) Sign() error {
return r.Error
}
+ SanitizeHostForHeader(r.HTTPRequest)
+
r.Handlers.Sign.Run(r)
return r.Error
}
func (r *Request) getNextRequestBody() (body io.ReadCloser, err error) {
+ if r.streamingBody != nil {
+ return r.streamingBody, nil
+ }
+
if r.safeBody != nil {
r.safeBody.Close()
}
@@ -615,6 +639,10 @@ func getHost(r *http.Request) string {
return r.Host
}
+ if r.URL == nil {
+ return ""
+ }
+
return r.URL.Host
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
index f093fc54..64784e16 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
@@ -17,11 +17,13 @@ import (
// does the pagination between API operations, and Paginator defines the
// configuration that will be used per page request.
//
-// cont := true
-// for p.Next() && cont {
+// for p.Next() {
// data := p.Page().(*s3.ListObjectsOutput)
// // process the page's data
+// // ...
+// // break out of loop to stop fetching additional pages
// }
+//
// return p.Err()
//
// See service client API operation Pages methods for examples how the SDK will
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
index e84084da..752ae47f 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
@@ -35,16 +35,47 @@ type Retryer interface {
}
// WithRetryer sets a Retryer value to the given Config returning the Config
-// value for chaining.
+// value for chaining. The value must not be nil.
func WithRetryer(cfg *aws.Config, retryer Retryer) *aws.Config {
+ if retryer == nil {
+ if cfg.Logger != nil {
+ cfg.Logger.Log("ERROR: Request.WithRetryer called with nil retryer. Replacing with retry disabled Retryer.")
+ }
+ retryer = noOpRetryer{}
+ }
cfg.Retryer = retryer
return cfg
+
+}
+
+// noOpRetryer is a internal no op retryer used when a request is created
+// without a retryer.
+//
+// Provides a retryer that performs no retries.
+// It should be used when we do not want retries to be performed.
+type noOpRetryer struct{}
+
+// MaxRetries returns the number of maximum returns the service will use to make
+// an individual API; For NoOpRetryer the MaxRetries will always be zero.
+func (d noOpRetryer) MaxRetries() int {
+ return 0
+}
+
+// ShouldRetry will always return false for NoOpRetryer, as it should never retry.
+func (d noOpRetryer) ShouldRetry(_ *Request) bool {
+ return false
+}
+
+// RetryRules returns the delay duration before retrying this request again;
+// since NoOpRetryer does not retry, RetryRules always returns 0.
+func (d noOpRetryer) RetryRules(_ *Request) time.Duration {
+ return 0
}
// retryableCodes is a collection of service response codes which are retry-able
// without any further action.
var retryableCodes = map[string]struct{}{
- "RequestError": {},
+ ErrCodeRequestError: {},
"RequestTimeout": {},
ErrCodeResponseTimeout: {},
"RequestTimeoutException": {}, // Glacier's flavor of RequestTimeout
@@ -52,6 +83,7 @@ var retryableCodes = map[string]struct{}{
var throttleCodes = map[string]struct{}{
"ProvisionedThroughputExceededException": {},
+ "ThrottledException": {}, // SNS, XRay, ResourceGroupsTagging API
"Throttling": {},
"ThrottlingException": {},
"RequestLimitExceeded": {},
@@ -60,6 +92,7 @@ var throttleCodes = map[string]struct{}{
"TooManyRequestsException": {}, // Lambda functions
"PriorRequestNotComplete": {}, // Route53
"TransactionInProgressException": {},
+ "EC2ThrottledException": {}, // EC2
}
// credsExpiredCodes is a collection of error codes which signify the credentials
@@ -145,8 +178,8 @@ func shouldRetryError(origErr error) bool {
origErr := err.OrigErr()
var shouldRetry bool
if origErr != nil {
- shouldRetry := shouldRetryError(origErr)
- if err.Code() == "RequestError" && !shouldRetry {
+ shouldRetry = shouldRetryError(origErr)
+ if err.Code() == ErrCodeRequestError && !shouldRetry {
return false
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go
index 7713ccfc..fe6dac1f 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go
@@ -3,6 +3,7 @@ package session
import (
"fmt"
"os"
+ "time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
@@ -47,10 +48,10 @@ func resolveCredentials(cfg *aws.Config,
}
// WebIdentityEmptyRoleARNErr will occur if 'AWS_WEB_IDENTITY_TOKEN_FILE' was set but
-// 'AWS_IAM_ROLE_ARN' was not set.
+// 'AWS_ROLE_ARN' was not set.
var WebIdentityEmptyRoleARNErr = awserr.New(stscreds.ErrCodeWebIdentity, "role ARN is not set", nil)
-// WebIdentityEmptyTokenFilePathErr will occur if 'AWS_IAM_ROLE_ARN' was set but
+// WebIdentityEmptyTokenFilePathErr will occur if 'AWS_ROLE_ARN' was set but
// 'AWS_WEB_IDENTITY_TOKEN_FILE' was not set.
var WebIdentityEmptyTokenFilePathErr = awserr.New(stscreds.ErrCodeWebIdentity, "token file path is not set", nil)
@@ -206,7 +207,14 @@ func credsFromAssumeRole(cfg aws.Config,
sharedCfg.RoleARN,
func(opt *stscreds.AssumeRoleProvider) {
opt.RoleSessionName = sharedCfg.RoleSessionName
- opt.Duration = sessOpts.AssumeRoleDuration
+
+ if sessOpts.AssumeRoleDuration == 0 &&
+ sharedCfg.AssumeRoleDuration != nil &&
+ *sharedCfg.AssumeRoleDuration/time.Minute > 15 {
+ opt.Duration = *sharedCfg.AssumeRoleDuration
+ } else if sessOpts.AssumeRoleDuration != 0 {
+ opt.Duration = sessOpts.AssumeRoleDuration
+ }
// Assume role with external ID
if len(sharedCfg.ExternalID) > 0 {
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 60a6f9ce..c1e0e9c9 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
@@ -1,12 +1,15 @@
package session
import (
+ "fmt"
"os"
"strconv"
+ "strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/defaults"
+ "github.com/aws/aws-sdk-go/aws/endpoints"
)
// EnvProviderName provides a name of the provider when config is loaded from environment.
@@ -125,6 +128,26 @@ type envConfig struct {
//
// AWS_ROLE_SESSION_NAME=session_name
RoleSessionName string
+
+ // Specifies the STS Regional Endpoint flag for the SDK to resolve the endpoint
+ // for a service.
+ //
+ // AWS_STS_REGIONAL_ENDPOINTS=regional
+ // This can take value as `regional` or `legacy`
+ STSRegionalEndpoint endpoints.STSRegionalEndpoint
+
+ // Specifies the S3 Regional Endpoint flag for the SDK to resolve the
+ // endpoint for a service.
+ //
+ // AWS_S3_US_EAST_1_REGIONAL_ENDPOINT=regional
+ // This can take value as `regional` or `legacy`
+ S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint
+
+ // Specifies if the S3 service should allow ARNs to direct the region
+ // the client's requests are sent to.
+ //
+ // AWS_S3_USE_ARN_REGION=true
+ S3UseARNRegion bool
}
var (
@@ -179,6 +202,15 @@ var (
roleSessionNameEnvKey = []string{
"AWS_ROLE_SESSION_NAME",
}
+ stsRegionalEndpointKey = []string{
+ "AWS_STS_REGIONAL_ENDPOINTS",
+ }
+ s3UsEast1RegionalEndpoint = []string{
+ "AWS_S3_US_EAST_1_REGIONAL_ENDPOINT",
+ }
+ s3UseARNRegionEnvKey = []string{
+ "AWS_S3_USE_ARN_REGION",
+ }
)
// loadEnvConfig retrieves the SDK's environment configuration.
@@ -187,7 +219,7 @@ var (
// If the environment variable `AWS_SDK_LOAD_CONFIG` is set to a truthy value
// the shared SDK config will be loaded in addition to the SDK's specific
// configuration values.
-func loadEnvConfig() envConfig {
+func loadEnvConfig() (envConfig, error) {
enableSharedConfig, _ := strconv.ParseBool(os.Getenv("AWS_SDK_LOAD_CONFIG"))
return envConfigLoad(enableSharedConfig)
}
@@ -198,11 +230,11 @@ func loadEnvConfig() envConfig {
// Loads the shared configuration in addition to the SDK's specific configuration.
// This will load the same values as `loadEnvConfig` if the `AWS_SDK_LOAD_CONFIG`
// environment variable is set.
-func loadSharedEnvConfig() envConfig {
+func loadSharedEnvConfig() (envConfig, error) {
return envConfigLoad(true)
}
-func envConfigLoad(enableSharedConfig bool) envConfig {
+func envConfigLoad(enableSharedConfig bool) (envConfig, error) {
cfg := envConfig{}
cfg.EnableSharedConfig = enableSharedConfig
@@ -264,12 +296,48 @@ func envConfigLoad(enableSharedConfig bool) envConfig {
cfg.CustomCABundle = os.Getenv("AWS_CA_BUNDLE")
- return cfg
+ var err error
+ // STS Regional Endpoint variable
+ for _, k := range stsRegionalEndpointKey {
+ if v := os.Getenv(k); len(v) != 0 {
+ cfg.STSRegionalEndpoint, err = endpoints.GetSTSRegionalEndpoint(v)
+ if err != nil {
+ return cfg, fmt.Errorf("failed to load, %v from env config, %v", k, err)
+ }
+ }
+ }
+
+ // S3 Regional Endpoint variable
+ for _, k := range s3UsEast1RegionalEndpoint {
+ if v := os.Getenv(k); len(v) != 0 {
+ cfg.S3UsEast1RegionalEndpoint, err = endpoints.GetS3UsEast1RegionalEndpoint(v)
+ if err != nil {
+ return cfg, fmt.Errorf("failed to load, %v from env config, %v", k, err)
+ }
+ }
+ }
+
+ var s3UseARNRegion string
+ setFromEnvVal(&s3UseARNRegion, s3UseARNRegionEnvKey)
+ if len(s3UseARNRegion) != 0 {
+ switch {
+ case strings.EqualFold(s3UseARNRegion, "false"):
+ cfg.S3UseARNRegion = false
+ case strings.EqualFold(s3UseARNRegion, "true"):
+ cfg.S3UseARNRegion = true
+ default:
+ return envConfig{}, fmt.Errorf(
+ "invalid value for environment variable, %s=%s, need true or false",
+ s3UseARNRegionEnvKey[0], s3UseARNRegion)
+ }
+ }
+
+ return cfg, nil
}
func setFromEnvVal(dst *string, keys []string) {
for _, k := range keys {
- if v := os.Getenv(k); len(v) > 0 {
+ if v := os.Getenv(k); len(v) != 0 {
*dst = v
break
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
index 7b0a942e..0ff49960 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
@@ -73,7 +73,7 @@ type Session struct {
// func is called instead of waiting to receive an error until a request is made.
func New(cfgs ...*aws.Config) *Session {
// load initial config from environment
- envCfg := loadEnvConfig()
+ envCfg, envErr := loadEnvConfig()
if envCfg.EnableSharedConfig {
var cfg aws.Config
@@ -93,17 +93,17 @@ func New(cfgs ...*aws.Config) *Session {
// Session creation failed, need to report the error and prevent
// any requests from succeeding.
s = &Session{Config: defaults.Config()}
- s.Config.MergeIn(cfgs...)
- s.Config.Logger.Log("ERROR:", msg, "Error:", err)
- s.Handlers.Validate.PushBack(func(r *request.Request) {
- r.Error = err
- })
+ s.logDeprecatedNewSessionError(msg, err, cfgs)
}
return s
}
s := deprecatedNewSession(cfgs...)
+ if envErr != nil {
+ msg := "failed to load env config"
+ s.logDeprecatedNewSessionError(msg, envErr, cfgs)
+ }
if csmCfg, err := loadCSMConfig(envCfg, []string{}); err != nil {
if l := s.Config.Logger; l != nil {
@@ -112,11 +112,8 @@ func New(cfgs ...*aws.Config) *Session {
} else if csmCfg.Enabled {
err := enableCSM(&s.Handlers, csmCfg, s.Config.Logger)
if err != nil {
- err = fmt.Errorf("failed to enable CSM, %v", err)
- s.Config.Logger.Log("ERROR:", err.Error())
- s.Handlers.Validate.PushBack(func(r *request.Request) {
- r.Error = err
- })
+ msg := "failed to enable CSM"
+ s.logDeprecatedNewSessionError(msg, err, cfgs)
}
}
@@ -279,10 +276,17 @@ type Options struct {
// }))
func NewSessionWithOptions(opts Options) (*Session, error) {
var envCfg envConfig
+ var err error
if opts.SharedConfigState == SharedConfigEnable {
- envCfg = loadSharedEnvConfig()
+ envCfg, err = loadSharedEnvConfig()
+ if err != nil {
+ return nil, fmt.Errorf("failed to load shared config, %v", err)
+ }
} else {
- envCfg = loadEnvConfig()
+ envCfg, err = loadEnvConfig()
+ if err != nil {
+ return nil, fmt.Errorf("failed to load environment config, %v", err)
+ }
}
if len(opts.Profile) != 0 {
@@ -550,6 +554,22 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config,
}
}
+ // Regional Endpoint flag for STS endpoint resolving
+ mergeSTSRegionalEndpointConfig(cfg, []endpoints.STSRegionalEndpoint{
+ userCfg.STSRegionalEndpoint,
+ envCfg.STSRegionalEndpoint,
+ sharedCfg.STSRegionalEndpoint,
+ endpoints.LegacySTSEndpoint,
+ })
+
+ // Regional Endpoint flag for S3 endpoint resolving
+ mergeS3UsEast1RegionalEndpointConfig(cfg, []endpoints.S3UsEast1RegionalEndpoint{
+ userCfg.S3UsEast1RegionalEndpoint,
+ envCfg.S3UsEast1RegionalEndpoint,
+ sharedCfg.S3UsEast1RegionalEndpoint,
+ endpoints.LegacyS3UsEast1Endpoint,
+ })
+
// Configure credentials if not already set by the user when creating the
// Session.
if cfg.Credentials == credentials.AnonymousCredentials && userCfg.Credentials == nil {
@@ -560,9 +580,35 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config,
cfg.Credentials = creds
}
+ cfg.S3UseARNRegion = userCfg.S3UseARNRegion
+ if cfg.S3UseARNRegion == nil {
+ cfg.S3UseARNRegion = &envCfg.S3UseARNRegion
+ }
+ if cfg.S3UseARNRegion == nil {
+ cfg.S3UseARNRegion = &sharedCfg.S3UseARNRegion
+ }
+
return nil
}
+func mergeSTSRegionalEndpointConfig(cfg *aws.Config, values []endpoints.STSRegionalEndpoint) {
+ for _, v := range values {
+ if v != endpoints.UnsetSTSEndpoint {
+ cfg.STSRegionalEndpoint = v
+ break
+ }
+ }
+}
+
+func mergeS3UsEast1RegionalEndpointConfig(cfg *aws.Config, values []endpoints.S3UsEast1RegionalEndpoint) {
+ for _, v := range values {
+ if v != endpoints.UnsetS3UsEast1Endpoint {
+ cfg.S3UsEast1RegionalEndpoint = v
+ break
+ }
+ }
+}
+
func initHandlers(s *Session) {
// Add the Validate parameter handler if it is not disabled.
s.Handlers.Validate.Remove(corehandlers.ValidateParametersHandler)
@@ -591,47 +637,67 @@ func (s *Session) Copy(cfgs ...*aws.Config) *Session {
// ClientConfig satisfies the client.ConfigProvider interface and is used to
// configure the service client instances. Passing the Session to the service
// client's constructor (New) will use this method to configure the client.
-func (s *Session) ClientConfig(serviceName string, cfgs ...*aws.Config) client.Config {
- // Backwards compatibility, the error will be eaten if user calls ClientConfig
- // directly. All SDK services will use ClientconfigWithError.
- cfg, _ := s.clientConfigWithErr(serviceName, cfgs...)
-
- return cfg
-}
-
-func (s *Session) clientConfigWithErr(serviceName string, cfgs ...*aws.Config) (client.Config, error) {
+func (s *Session) ClientConfig(service string, cfgs ...*aws.Config) client.Config {
s = s.Copy(cfgs...)
- var resolved endpoints.ResolvedEndpoint
- var err error
-
region := aws.StringValue(s.Config.Region)
-
- if endpoint := aws.StringValue(s.Config.Endpoint); len(endpoint) != 0 {
- resolved.URL = endpoints.AddScheme(endpoint, aws.BoolValue(s.Config.DisableSSL))
- resolved.SigningRegion = region
- } else {
- resolved, err = s.Config.EndpointResolver.EndpointFor(
- serviceName, region,
- func(opt *endpoints.Options) {
- opt.DisableSSL = aws.BoolValue(s.Config.DisableSSL)
- opt.UseDualStack = aws.BoolValue(s.Config.UseDualStack)
-
- // Support the condition where the service is modeled but its
- // endpoint metadata is not available.
- opt.ResolveUnknownService = true
- },
- )
+ resolved, err := s.resolveEndpoint(service, region, s.Config)
+ if err != nil {
+ s.Handlers.Validate.PushBack(func(r *request.Request) {
+ if len(r.ClientInfo.Endpoint) != 0 {
+ // Error occurred while resolving endpoint, but the request
+ // being invoked has had an endpoint specified after the client
+ // was created.
+ return
+ }
+ r.Error = err
+ })
}
return client.Config{
Config: s.Config,
Handlers: s.Handlers,
+ PartitionID: resolved.PartitionID,
Endpoint: resolved.URL,
SigningRegion: resolved.SigningRegion,
SigningNameDerived: resolved.SigningNameDerived,
SigningName: resolved.SigningName,
- }, err
+ }
+}
+
+func (s *Session) resolveEndpoint(service, region string, cfg *aws.Config) (endpoints.ResolvedEndpoint, error) {
+
+ if ep := aws.StringValue(cfg.Endpoint); len(ep) != 0 {
+ return endpoints.ResolvedEndpoint{
+ URL: endpoints.AddScheme(ep, aws.BoolValue(cfg.DisableSSL)),
+ SigningRegion: region,
+ }, nil
+ }
+
+ resolved, err := cfg.EndpointResolver.EndpointFor(service, region,
+ func(opt *endpoints.Options) {
+ opt.DisableSSL = aws.BoolValue(cfg.DisableSSL)
+ opt.UseDualStack = aws.BoolValue(cfg.UseDualStack)
+ // Support for STSRegionalEndpoint where the STSRegionalEndpoint is
+ // provided in envConfig or sharedConfig with envConfig getting
+ // precedence.
+ opt.STSRegionalEndpoint = cfg.STSRegionalEndpoint
+
+ // Support for S3UsEast1RegionalEndpoint where the S3UsEast1RegionalEndpoint is
+ // provided in envConfig or sharedConfig with envConfig getting
+ // precedence.
+ opt.S3UsEast1RegionalEndpoint = cfg.S3UsEast1RegionalEndpoint
+
+ // Support the condition where the service is modeled but its
+ // endpoint metadata is not available.
+ opt.ResolveUnknownService = true
+ },
+ )
+ if err != nil {
+ return endpoints.ResolvedEndpoint{}, err
+ }
+
+ return resolved, nil
}
// ClientConfigNoResolveEndpoint is the same as ClientConfig with the exception
@@ -641,12 +707,9 @@ func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Conf
s = s.Copy(cfgs...)
var resolved endpoints.ResolvedEndpoint
-
- region := aws.StringValue(s.Config.Region)
-
if ep := aws.StringValue(s.Config.Endpoint); len(ep) > 0 {
resolved.URL = endpoints.AddScheme(ep, aws.BoolValue(s.Config.DisableSSL))
- resolved.SigningRegion = region
+ resolved.SigningRegion = aws.StringValue(s.Config.Region)
}
return client.Config{
@@ -658,3 +721,14 @@ func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Conf
SigningName: resolved.SigningName,
}
}
+
+// logDeprecatedNewSessionError function enables error handling for session
+func (s *Session) logDeprecatedNewSessionError(msg string, err error, cfgs []*aws.Config) {
+ // Session creation failed, need to report the error and prevent
+ // any requests from succeeding.
+ s.Config.MergeIn(cfgs...)
+ s.Config.Logger.Log("ERROR:", msg, "Error:", err)
+ s.Handlers.Validate.PushBack(func(r *request.Request) {
+ r.Error = err
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
index d91ac93a..680805a3 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
@@ -2,9 +2,11 @@ package session
import (
"fmt"
+ "time"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/aws/endpoints"
"github.com/aws/aws-sdk-go/internal/ini"
)
@@ -15,12 +17,13 @@ const (
sessionTokenKey = `aws_session_token` // optional
// Assume Role Credentials group
- roleArnKey = `role_arn` // group required
- sourceProfileKey = `source_profile` // group required (or credential_source)
- credentialSourceKey = `credential_source` // group required (or source_profile)
- externalIDKey = `external_id` // optional
- mfaSerialKey = `mfa_serial` // optional
- roleSessionNameKey = `role_session_name` // optional
+ roleArnKey = `role_arn` // group required
+ sourceProfileKey = `source_profile` // group required (or credential_source)
+ credentialSourceKey = `credential_source` // group required (or source_profile)
+ externalIDKey = `external_id` // optional
+ mfaSerialKey = `mfa_serial` // optional
+ roleSessionNameKey = `role_session_name` // optional
+ roleDurationSecondsKey = "duration_seconds" // optional
// CSM options
csmEnabledKey = `csm_enabled`
@@ -40,10 +43,19 @@ const (
// Web Identity Token File
webIdentityTokenFileKey = `web_identity_token_file` // optional
+ // Additional config fields for regional or legacy endpoints
+ stsRegionalEndpointSharedKey = `sts_regional_endpoints`
+
+ // Additional config fields for regional or legacy endpoints
+ s3UsEast1RegionalSharedKey = `s3_us_east_1_regional_endpoint`
+
// DefaultSharedConfigProfile is the default profile to be used when
// loading configuration from the config files if another profile name
// is not provided.
DefaultSharedConfigProfile = `default`
+
+ // S3 ARN Region Usage
+ s3UseARNRegionKey = "s3_use_arn_region"
)
// sharedConfig represents the configuration fields of the SDK config files.
@@ -63,10 +75,11 @@ type sharedConfig struct {
CredentialProcess string
WebIdentityTokenFile string
- RoleARN string
- RoleSessionName string
- ExternalID string
- MFASerial string
+ RoleARN string
+ RoleSessionName string
+ ExternalID string
+ MFASerial string
+ AssumeRoleDuration *time.Duration
SourceProfileName string
SourceProfile *sharedConfig
@@ -88,6 +101,24 @@ type sharedConfig struct {
CSMHost string
CSMPort string
CSMClientID string
+
+ // Specifies the Regional Endpoint flag for the SDK to resolve the endpoint for a service
+ //
+ // sts_regional_endpoints = regional
+ // This can take value as `LegacySTSEndpoint` or `RegionalSTSEndpoint`
+ STSRegionalEndpoint endpoints.STSRegionalEndpoint
+
+ // Specifies the Regional Endpoint flag for the SDK to resolve the endpoint for a service
+ //
+ // s3_us_east_1_regional_endpoint = regional
+ // This can take value as `LegacyS3UsEast1Endpoint` or `RegionalS3UsEast1Endpoint`
+ S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint
+
+ // Specifies if the S3 service should allow ARNs to direct the region
+ // the client's requests are sent to.
+ //
+ // s3_use_arn_region=true
+ S3UseARNRegion bool
}
type sharedConfigFile struct {
@@ -244,8 +275,30 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, e
updateString(&cfg.RoleSessionName, section, roleSessionNameKey)
updateString(&cfg.SourceProfileName, section, sourceProfileKey)
updateString(&cfg.CredentialSource, section, credentialSourceKey)
-
updateString(&cfg.Region, section, regionKey)
+
+ if section.Has(roleDurationSecondsKey) {
+ d := time.Duration(section.Int(roleDurationSecondsKey)) * time.Second
+ cfg.AssumeRoleDuration = &d
+ }
+
+ if v := section.String(stsRegionalEndpointSharedKey); len(v) != 0 {
+ sre, err := endpoints.GetSTSRegionalEndpoint(v)
+ if err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %s, %v",
+ stsRegionalEndpointSharedKey, file.Filename, err)
+ }
+ cfg.STSRegionalEndpoint = sre
+ }
+
+ if v := section.String(s3UsEast1RegionalSharedKey); len(v) != 0 {
+ sre, err := endpoints.GetS3UsEast1RegionalEndpoint(v)
+ if err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %s, %v",
+ s3UsEast1RegionalSharedKey, file.Filename, err)
+ }
+ cfg.S3UsEast1RegionalEndpoint = sre
+ }
}
updateString(&cfg.CredentialProcess, section, credentialProcessKey)
@@ -271,6 +324,8 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, e
updateString(&cfg.CSMPort, section, csmPortKey)
updateString(&cfg.CSMClientID, section, csmClientIDKey)
+ updateBool(&cfg.S3UseARNRegion, section, s3UseARNRegionKey)
+
return nil
}
@@ -363,6 +418,15 @@ func updateString(dst *string, section ini.Section, key string) {
*dst = section.String(key)
}
+// updateBool will only update the dst with the value in the section key, key
+// is present in the section.
+func updateBool(dst *bool, section ini.Section, key string) {
+ if !section.Has(key) {
+ return
+ }
+ *dst = section.Bool(key)
+}
+
// updateBoolPtr will only update the dst with the value in the section key,
// key is present in the section.
func updateBoolPtr(dst **bool, section ini.Section, key string) {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go
index 244c86da..07ea799f 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go
@@ -1,8 +1,7 @@
package v4
import (
- "net/http"
- "strings"
+ "github.com/aws/aws-sdk-go/internal/strings"
)
// validator houses a set of rule needed for validation of a
@@ -61,7 +60,7 @@ type patterns []string
// been found
func (p patterns) IsValid(value string) bool {
for _, pattern := range p {
- if strings.HasPrefix(http.CanonicalHeaderKey(value), pattern) {
+ if strings.HasPrefixFold(value, pattern) {
return true
}
}
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 8104793a..d71f7b3f 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
@@ -76,9 +76,14 @@ import (
)
const (
+ authorizationHeader = "Authorization"
+ authHeaderSignatureElem = "Signature="
+ signatureQueryKey = "X-Amz-Signature"
+
authHeaderPrefix = "AWS4-HMAC-SHA256"
timeFormat = "20060102T150405Z"
shortTimeFormat = "20060102"
+ awsV4Request = "aws4_request"
// emptyStringSHA256 is a SHA256 of an empty string
emptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`
@@ -87,9 +92,9 @@ const (
var ignoredHeaders = rules{
blacklist{
mapRule{
- "Authorization": struct{}{},
- "User-Agent": struct{}{},
- "X-Amzn-Trace-Id": struct{}{},
+ authorizationHeader: struct{}{},
+ "User-Agent": struct{}{},
+ "X-Amzn-Trace-Id": struct{}{},
},
},
}
@@ -229,11 +234,9 @@ type signingCtx struct {
DisableURIPathEscaping bool
- credValues credentials.Value
- isPresign bool
- formattedTime string
- formattedShortTime string
- unsignedPayload bool
+ credValues credentials.Value
+ isPresign bool
+ unsignedPayload bool
bodyDigest string
signedHeaders string
@@ -337,7 +340,7 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi
}
var err error
- ctx.credValues, err = v4.Credentials.Get()
+ ctx.credValues, err = v4.Credentials.GetWithContext(requestContext(r))
if err != nil {
return http.Header{}, err
}
@@ -532,39 +535,56 @@ func (ctx *signingCtx) build(disableHeaderHoisting bool) error {
ctx.buildSignature() // depends on string to sign
if ctx.isPresign {
- ctx.Request.URL.RawQuery += "&X-Amz-Signature=" + ctx.signature
+ ctx.Request.URL.RawQuery += "&" + signatureQueryKey + "=" + ctx.signature
} else {
parts := []string{
authHeaderPrefix + " Credential=" + ctx.credValues.AccessKeyID + "/" + ctx.credentialString,
"SignedHeaders=" + ctx.signedHeaders,
- "Signature=" + ctx.signature,
+ authHeaderSignatureElem + ctx.signature,
}
- ctx.Request.Header.Set("Authorization", strings.Join(parts, ", "))
+ ctx.Request.Header.Set(authorizationHeader, strings.Join(parts, ", "))
}
return nil
}
-func (ctx *signingCtx) buildTime() {
- ctx.formattedTime = ctx.Time.UTC().Format(timeFormat)
- ctx.formattedShortTime = ctx.Time.UTC().Format(shortTimeFormat)
+// GetSignedRequestSignature attempts to extract the signature of the request.
+// Returning an error if the request is unsigned, or unable to extract the
+// signature.
+func GetSignedRequestSignature(r *http.Request) ([]byte, error) {
+
+ if auth := r.Header.Get(authorizationHeader); len(auth) != 0 {
+ ps := strings.Split(auth, ", ")
+ for _, p := range ps {
+ if idx := strings.Index(p, authHeaderSignatureElem); idx >= 0 {
+ sig := p[len(authHeaderSignatureElem):]
+ if len(sig) == 0 {
+ return nil, fmt.Errorf("invalid request signature authorization header")
+ }
+ return hex.DecodeString(sig)
+ }
+ }
+ }
+
+ if sig := r.URL.Query().Get("X-Amz-Signature"); len(sig) != 0 {
+ return hex.DecodeString(sig)
+ }
+
+ return nil, fmt.Errorf("request not signed")
+}
+func (ctx *signingCtx) buildTime() {
if ctx.isPresign {
duration := int64(ctx.ExpireTime / time.Second)
- ctx.Query.Set("X-Amz-Date", ctx.formattedTime)
+ ctx.Query.Set("X-Amz-Date", formatTime(ctx.Time))
ctx.Query.Set("X-Amz-Expires", strconv.FormatInt(duration, 10))
} else {
- ctx.Request.Header.Set("X-Amz-Date", ctx.formattedTime)
+ ctx.Request.Header.Set("X-Amz-Date", formatTime(ctx.Time))
}
}
func (ctx *signingCtx) buildCredentialString() {
- ctx.credentialString = strings.Join([]string{
- ctx.formattedShortTime,
- ctx.Region,
- ctx.ServiceName,
- "aws4_request",
- }, "/")
+ ctx.credentialString = buildSigningScope(ctx.Region, ctx.ServiceName, ctx.Time)
if ctx.isPresign {
ctx.Query.Set("X-Amz-Credential", ctx.credValues.AccessKeyID+"/"+ctx.credentialString)
@@ -588,8 +608,7 @@ func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) {
var headers []string
headers = append(headers, "host")
for k, v := range header {
- canonicalKey := http.CanonicalHeaderKey(k)
- if !r.IsValid(canonicalKey) {
+ if !r.IsValid(k) {
continue // ignored header
}
if ctx.SignedHeaderVals == nil {
@@ -653,19 +672,15 @@ func (ctx *signingCtx) buildCanonicalString() {
func (ctx *signingCtx) buildStringToSign() {
ctx.stringToSign = strings.Join([]string{
authHeaderPrefix,
- ctx.formattedTime,
+ formatTime(ctx.Time),
ctx.credentialString,
- hex.EncodeToString(makeSha256([]byte(ctx.canonicalString))),
+ hex.EncodeToString(hashSHA256([]byte(ctx.canonicalString))),
}, "\n")
}
func (ctx *signingCtx) buildSignature() {
- secret := ctx.credValues.SecretAccessKey
- date := makeHmac([]byte("AWS4"+secret), []byte(ctx.formattedShortTime))
- region := makeHmac(date, []byte(ctx.Region))
- service := makeHmac(region, []byte(ctx.ServiceName))
- credentials := makeHmac(service, []byte("aws4_request"))
- signature := makeHmac(credentials, []byte(ctx.stringToSign))
+ creds := deriveSigningKey(ctx.Region, ctx.ServiceName, ctx.credValues.SecretAccessKey, ctx.Time)
+ signature := hmacSHA256(creds, []byte(ctx.stringToSign))
ctx.signature = hex.EncodeToString(signature)
}
@@ -726,13 +741,13 @@ func (ctx *signingCtx) removePresign() {
ctx.Query.Del("X-Amz-SignedHeaders")
}
-func makeHmac(key []byte, data []byte) []byte {
+func hmacSHA256(key []byte, data []byte) []byte {
hash := hmac.New(sha256.New, key)
hash.Write(data)
return hash.Sum(nil)
}
-func makeSha256(data []byte) []byte {
+func hashSHA256(data []byte) []byte {
hash := sha256.New()
hash.Write(data)
return hash.Sum(nil)
@@ -804,3 +819,28 @@ func stripExcessSpaces(vals []string) {
vals[i] = string(buf[:m])
}
}
+
+func buildSigningScope(region, service string, dt time.Time) string {
+ return strings.Join([]string{
+ formatShortTime(dt),
+ region,
+ service,
+ awsV4Request,
+ }, "/")
+}
+
+func deriveSigningKey(region, service, secretKey string, dt time.Time) []byte {
+ kDate := hmacSHA256([]byte("AWS4"+secretKey), []byte(formatShortTime(dt)))
+ kRegion := hmacSHA256(kDate, []byte(region))
+ kService := hmacSHA256(kRegion, []byte(service))
+ signingKey := hmacSHA256(kService, []byte(awsV4Request))
+ return signingKey
+}
+
+func formatShortTime(dt time.Time) string {
+ return dt.UTC().Format(shortTimeFormat)
+}
+
+func formatTime(dt time.Time) string {
+ return dt.UTC().Format(timeFormat)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/types.go b/vendor/github.com/aws/aws-sdk-go/aws/types.go
index 45509154..98751ee8 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/types.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/types.go
@@ -2,6 +2,7 @@ package aws
import (
"io"
+ "strings"
"sync"
"github.com/aws/aws-sdk-go/internal/sdkio"
@@ -205,3 +206,59 @@ func (b *WriteAtBuffer) Bytes() []byte {
defer b.m.Unlock()
return b.buf
}
+
+// MultiCloser is a utility to close multiple io.Closers within a single
+// statement.
+type MultiCloser []io.Closer
+
+// Close closes all of the io.Closers making up the MultiClosers. Any
+// errors that occur while closing will be returned in the order they
+// occur.
+func (m MultiCloser) Close() error {
+ var errs errors
+ for _, c := range m {
+ err := c.Close()
+ if err != nil {
+ errs = append(errs, err)
+ }
+ }
+ if len(errs) != 0 {
+ return errs
+ }
+
+ return nil
+}
+
+type errors []error
+
+func (es errors) Error() string {
+ var parts []string
+ for _, e := range es {
+ parts = append(parts, e.Error())
+ }
+
+ return strings.Join(parts, "\n")
+}
+
+// CopySeekableBody copies the seekable body to an io.Writer
+func CopySeekableBody(dst io.Writer, src io.ReadSeeker) (int64, error) {
+ curPos, err := src.Seek(0, sdkio.SeekCurrent)
+ if err != nil {
+ return 0, err
+ }
+
+ // copy errors may be assumed to be from the body.
+ n, err := io.Copy(dst, src)
+ if err != nil {
+ return n, err
+ }
+
+ // seek back to the first position after reading to reset
+ // the body for transmission.
+ _, err = src.Seek(curPos, sdkio.SeekStart)
+ if err != nil {
+ return n, err
+ }
+
+ return n, nil
+}
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 70dccc78..c0506123 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.25.14"
+const SDKVersion = "1.32.7"
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go
index ecc7bf82..15105497 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go
@@ -101,7 +101,7 @@ func (hs *decodedHeaders) UnmarshalJSON(b []byte) error {
}
headers.Set(h.Name, value)
}
- (*hs) = decodedHeaders(headers)
+ *hs = decodedHeaders(headers)
return nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go
index 4b972b2d..47433939 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go
@@ -21,10 +21,24 @@ type Decoder struct {
// NewDecoder initializes and returns a Decoder for decoding event
// stream messages from the reader provided.
-func NewDecoder(r io.Reader) *Decoder {
- return &Decoder{
+func NewDecoder(r io.Reader, opts ...func(*Decoder)) *Decoder {
+ d := &Decoder{
r: r,
}
+
+ for _, opt := range opts {
+ opt(d)
+ }
+
+ return d
+}
+
+// DecodeWithLogger adds a logger to be used by the decoder when decoding
+// stream events.
+func DecodeWithLogger(logger aws.Logger) func(*Decoder) {
+ return func(d *Decoder) {
+ d.logger = logger
+ }
}
// Decode attempts to decode a single message from the event stream reader.
@@ -40,6 +54,15 @@ func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) {
}()
}
+ m, err = Decode(reader, payloadBuf)
+
+ return m, err
+}
+
+// Decode attempts to decode a single message from the event stream reader.
+// Will return the event stream message, or error if Decode fails to read
+// the message from the reader.
+func Decode(reader io.Reader, payloadBuf []byte) (m Message, err error) {
crc := crc32.New(crc32IEEETable)
hashReader := io.TeeReader(reader, crc)
@@ -72,12 +95,6 @@ func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) {
return m, nil
}
-// UseLogger specifies the Logger that that the decoder should use to log the
-// message decode to.
-func (d *Decoder) UseLogger(logger aws.Logger) {
- d.logger = logger
-}
-
func logMessageDecode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, decodeErr error) {
w := bytes.NewBuffer(nil)
defer func() { logger.Log(w.String()) }()
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go
index 150a6098..ffade3bc 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go
@@ -3,61 +3,107 @@ package eventstream
import (
"bytes"
"encoding/binary"
+ "encoding/hex"
+ "encoding/json"
+ "fmt"
"hash"
"hash/crc32"
"io"
+
+ "github.com/aws/aws-sdk-go/aws"
)
// Encoder provides EventStream message encoding.
type Encoder struct {
- w io.Writer
+ w io.Writer
+ logger aws.Logger
headersBuf *bytes.Buffer
}
// NewEncoder initializes and returns an Encoder to encode Event Stream
// messages to an io.Writer.
-func NewEncoder(w io.Writer) *Encoder {
- return &Encoder{
+func NewEncoder(w io.Writer, opts ...func(*Encoder)) *Encoder {
+ e := &Encoder{
w: w,
headersBuf: bytes.NewBuffer(nil),
}
+
+ for _, opt := range opts {
+ opt(e)
+ }
+
+ return e
+}
+
+// EncodeWithLogger adds a logger to be used by the encode when decoding
+// stream events.
+func EncodeWithLogger(logger aws.Logger) func(*Encoder) {
+ return func(d *Encoder) {
+ d.logger = logger
+ }
}
// Encode encodes a single EventStream message to the io.Writer the Encoder
// was created with. An error is returned if writing the message fails.
-func (e *Encoder) Encode(msg Message) error {
+func (e *Encoder) Encode(msg Message) (err error) {
e.headersBuf.Reset()
- err := encodeHeaders(e.headersBuf, msg.Headers)
- if err != nil {
+ writer := e.w
+ if e.logger != nil {
+ encodeMsgBuf := bytes.NewBuffer(nil)
+ writer = io.MultiWriter(writer, encodeMsgBuf)
+ defer func() {
+ logMessageEncode(e.logger, encodeMsgBuf, msg, err)
+ }()
+ }
+
+ if err = EncodeHeaders(e.headersBuf, msg.Headers); err != nil {
return err
}
crc := crc32.New(crc32IEEETable)
- hashWriter := io.MultiWriter(e.w, crc)
+ hashWriter := io.MultiWriter(writer, crc)
headersLen := uint32(e.headersBuf.Len())
payloadLen := uint32(len(msg.Payload))
- if err := encodePrelude(hashWriter, crc, headersLen, payloadLen); err != nil {
+ if err = encodePrelude(hashWriter, crc, headersLen, payloadLen); err != nil {
return err
}
if headersLen > 0 {
- if _, err := io.Copy(hashWriter, e.headersBuf); err != nil {
+ if _, err = io.Copy(hashWriter, e.headersBuf); err != nil {
return err
}
}
if payloadLen > 0 {
- if _, err := hashWriter.Write(msg.Payload); err != nil {
+ if _, err = hashWriter.Write(msg.Payload); err != nil {
return err
}
}
msgCRC := crc.Sum32()
- return binary.Write(e.w, binary.BigEndian, msgCRC)
+ return binary.Write(writer, binary.BigEndian, msgCRC)
+}
+
+func logMessageEncode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, encodeErr error) {
+ w := bytes.NewBuffer(nil)
+ defer func() { logger.Log(w.String()) }()
+
+ fmt.Fprintf(w, "Message to encode:\n")
+ encoder := json.NewEncoder(w)
+ if err := encoder.Encode(msg); err != nil {
+ fmt.Fprintf(w, "Failed to get encoded message, %v\n", err)
+ }
+
+ if encodeErr != nil {
+ fmt.Fprintf(w, "Encode error: %v\n", encodeErr)
+ return
+ }
+
+ fmt.Fprintf(w, "Raw message:\n%s\n", hex.Dump(msgBuf.Bytes()))
}
func encodePrelude(w io.Writer, crc hash.Hash32, headersLen, payloadLen uint32) error {
@@ -86,7 +132,9 @@ func encodePrelude(w io.Writer, crc hash.Hash32, headersLen, payloadLen uint32)
return nil
}
-func encodeHeaders(w io.Writer, headers Headers) error {
+// EncodeHeaders writes the header values to the writer encoded in the event
+// stream format. Returns an error if a header fails to encode.
+func EncodeHeaders(w io.Writer, headers Headers) error {
for _, h := range headers {
hn := headerName{
Len: uint8(len(h.Name)),
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/api.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/api.go
deleted file mode 100644
index 97937c8e..00000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/api.go
+++ /dev/null
@@ -1,196 +0,0 @@
-package eventstreamapi
-
-import (
- "fmt"
- "io"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/eventstream"
-)
-
-// Unmarshaler provides the interface for unmarshaling a EventStream
-// message into a SDK type.
-type Unmarshaler interface {
- UnmarshalEvent(protocol.PayloadUnmarshaler, eventstream.Message) error
-}
-
-// EventStream headers with specific meaning to async API functionality.
-const (
- MessageTypeHeader = `:message-type` // Identifies type of message.
- EventMessageType = `event`
- ErrorMessageType = `error`
- ExceptionMessageType = `exception`
-
- // Message Events
- EventTypeHeader = `:event-type` // Identifies message event type e.g. "Stats".
-
- // Message Error
- ErrorCodeHeader = `:error-code`
- ErrorMessageHeader = `:error-message`
-
- // Message Exception
- ExceptionTypeHeader = `:exception-type`
-)
-
-// EventReader provides reading from the EventStream of an reader.
-type EventReader struct {
- reader io.ReadCloser
- decoder *eventstream.Decoder
-
- unmarshalerForEventType func(string) (Unmarshaler, error)
- payloadUnmarshaler protocol.PayloadUnmarshaler
-
- payloadBuf []byte
-}
-
-// NewEventReader returns a EventReader built from the reader and unmarshaler
-// provided. Use ReadStream method to start reading from the EventStream.
-func NewEventReader(
- reader io.ReadCloser,
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- unmarshalerForEventType func(string) (Unmarshaler, error),
-) *EventReader {
- return &EventReader{
- reader: reader,
- decoder: eventstream.NewDecoder(reader),
- payloadUnmarshaler: payloadUnmarshaler,
- unmarshalerForEventType: unmarshalerForEventType,
- payloadBuf: make([]byte, 10*1024),
- }
-}
-
-// UseLogger instructs the EventReader to use the logger and log level
-// specified.
-func (r *EventReader) UseLogger(logger aws.Logger, logLevel aws.LogLevelType) {
- if logger != nil && logLevel.Matches(aws.LogDebugWithEventStreamBody) {
- r.decoder.UseLogger(logger)
- }
-}
-
-// ReadEvent attempts to read a message from the EventStream and return the
-// unmarshaled event value that the message is for.
-//
-// For EventStream API errors check if the returned error satisfies the
-// awserr.Error interface to get the error's Code and Message components.
-//
-// EventUnmarshalers called with EventStream messages must take copies of the
-// message's Payload. The payload will is reused between events read.
-func (r *EventReader) ReadEvent() (event interface{}, err error) {
- msg, err := r.decoder.Decode(r.payloadBuf)
- if err != nil {
- return nil, err
- }
- defer func() {
- // Reclaim payload buffer for next message read.
- r.payloadBuf = msg.Payload[0:0]
- }()
-
- typ, err := GetHeaderString(msg, MessageTypeHeader)
- if err != nil {
- return nil, err
- }
-
- switch typ {
- case EventMessageType:
- return r.unmarshalEventMessage(msg)
- case ExceptionMessageType:
- err = r.unmarshalEventException(msg)
- return nil, err
- case ErrorMessageType:
- return nil, r.unmarshalErrorMessage(msg)
- default:
- return nil, fmt.Errorf("unknown eventstream message type, %v", typ)
- }
-}
-
-func (r *EventReader) unmarshalEventMessage(
- msg eventstream.Message,
-) (event interface{}, err error) {
- eventType, err := GetHeaderString(msg, EventTypeHeader)
- if err != nil {
- return nil, err
- }
-
- ev, err := r.unmarshalerForEventType(eventType)
- if err != nil {
- return nil, err
- }
-
- err = ev.UnmarshalEvent(r.payloadUnmarshaler, msg)
- if err != nil {
- return nil, err
- }
-
- return ev, nil
-}
-
-func (r *EventReader) unmarshalEventException(
- msg eventstream.Message,
-) (err error) {
- eventType, err := GetHeaderString(msg, ExceptionTypeHeader)
- if err != nil {
- return err
- }
-
- ev, err := r.unmarshalerForEventType(eventType)
- if err != nil {
- return err
- }
-
- err = ev.UnmarshalEvent(r.payloadUnmarshaler, msg)
- if err != nil {
- return err
- }
-
- var ok bool
- err, ok = ev.(error)
- if !ok {
- err = messageError{
- code: "SerializationError",
- msg: fmt.Sprintf(
- "event stream exception %s mapped to non-error %T, %v",
- eventType, ev, ev,
- ),
- }
- }
-
- return err
-}
-
-func (r *EventReader) unmarshalErrorMessage(msg eventstream.Message) (err error) {
- var msgErr messageError
-
- msgErr.code, err = GetHeaderString(msg, ErrorCodeHeader)
- if err != nil {
- return err
- }
-
- msgErr.msg, err = GetHeaderString(msg, ErrorMessageHeader)
- if err != nil {
- return err
- }
-
- return msgErr
-}
-
-// Close closes the EventReader's EventStream reader.
-func (r *EventReader) Close() error {
- return r.reader.Close()
-}
-
-// GetHeaderString returns the value of the header as a string. If the header
-// is not set or the value is not a string an error will be returned.
-func GetHeaderString(msg eventstream.Message, headerName string) (string, error) {
- headerVal := msg.Headers.Get(headerName)
- if headerVal == nil {
- return "", fmt.Errorf("error header %s not present", headerName)
- }
-
- v, ok := headerVal.Get().(string)
- if !ok {
- return "", fmt.Errorf("error header value is not a string, %T", headerVal)
- }
-
- return v, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go
index 5ea5a988..34c2e89d 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go
@@ -1,6 +1,9 @@
package eventstreamapi
-import "fmt"
+import (
+ "fmt"
+ "sync"
+)
type messageError struct {
code string
@@ -22,3 +25,53 @@ func (e messageError) Error() string {
func (e messageError) OrigErr() error {
return nil
}
+
+// OnceError wraps the behavior of recording an error
+// once and signal on a channel when this has occurred.
+// Signaling is done by closing of the channel.
+//
+// Type is safe for concurrent usage.
+type OnceError struct {
+ mu sync.RWMutex
+ err error
+ ch chan struct{}
+}
+
+// NewOnceError return a new OnceError
+func NewOnceError() *OnceError {
+ return &OnceError{
+ ch: make(chan struct{}, 1),
+ }
+}
+
+// Err acquires a read-lock and returns an
+// error if one has been set.
+func (e *OnceError) Err() error {
+ e.mu.RLock()
+ err := e.err
+ e.mu.RUnlock()
+
+ return err
+}
+
+// SetError acquires a write-lock and will set
+// the underlying error value if one has not been set.
+func (e *OnceError) SetError(err error) {
+ if err == nil {
+ return
+ }
+
+ e.mu.Lock()
+ if e.err == nil {
+ e.err = err
+ close(e.ch)
+ }
+ e.mu.Unlock()
+}
+
+// ErrorSet returns a channel that will be used to signal
+// that an error has been set. This channel will be closed
+// when the error value has been set for OnceError.
+func (e *OnceError) ErrorSet() <-chan struct{} {
+ return e.ch
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go
index e3fc0766..9f509d8f 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go
@@ -461,6 +461,11 @@ func (v *TimestampValue) decode(r io.Reader) error {
return nil
}
+// MarshalJSON implements the json.Marshaler interface
+func (v TimestampValue) MarshalJSON() ([]byte, error) {
+ return []byte(v.String()), nil
+}
+
func timeFromEpochMilli(t int64) time.Time {
secs := t / 1e3
msec := t % 1e3
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go
index 2dc012a6..25c9783c 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go
@@ -27,7 +27,7 @@ func (m *Message) rawMessage() (rawMessage, error) {
if len(m.Headers) > 0 {
var headers bytes.Buffer
- if err := encodeHeaders(&headers, m.Headers); err != nil {
+ if err := EncodeHeaders(&headers, m.Headers); err != nil {
return rawMessage{}, err
}
raw.Headers = headers.Bytes()
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go
index ea0da79a..5e949969 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go
@@ -7,6 +7,7 @@ import (
"fmt"
"io"
"reflect"
+ "strings"
"time"
"github.com/aws/aws-sdk-go/aws"
@@ -45,10 +46,31 @@ func UnmarshalJSON(v interface{}, stream io.Reader) error {
return err
}
- return unmarshalAny(reflect.ValueOf(v), out, "")
+ return unmarshaler{}.unmarshalAny(reflect.ValueOf(v), out, "")
}
-func unmarshalAny(value reflect.Value, data interface{}, tag reflect.StructTag) error {
+// UnmarshalJSONCaseInsensitive reads a stream and unmarshals the result into the
+// object v. Ignores casing for structure members.
+func UnmarshalJSONCaseInsensitive(v interface{}, stream io.Reader) error {
+ var out interface{}
+
+ err := json.NewDecoder(stream).Decode(&out)
+ if err == io.EOF {
+ return nil
+ } else if err != nil {
+ return err
+ }
+
+ return unmarshaler{
+ caseInsensitive: true,
+ }.unmarshalAny(reflect.ValueOf(v), out, "")
+}
+
+type unmarshaler struct {
+ caseInsensitive bool
+}
+
+func (u unmarshaler) unmarshalAny(value reflect.Value, data interface{}, tag reflect.StructTag) error {
vtype := value.Type()
if vtype.Kind() == reflect.Ptr {
vtype = vtype.Elem() // check kind of actual element type
@@ -80,17 +102,17 @@ func unmarshalAny(value reflect.Value, data interface{}, tag reflect.StructTag)
if field, ok := vtype.FieldByName("_"); ok {
tag = field.Tag
}
- return unmarshalStruct(value, data, tag)
+ return u.unmarshalStruct(value, data, tag)
case "list":
- return unmarshalList(value, data, tag)
+ return u.unmarshalList(value, data, tag)
case "map":
- return unmarshalMap(value, data, tag)
+ return u.unmarshalMap(value, data, tag)
default:
- return unmarshalScalar(value, data, tag)
+ return u.unmarshalScalar(value, data, tag)
}
}
-func unmarshalStruct(value reflect.Value, data interface{}, tag reflect.StructTag) error {
+func (u unmarshaler) unmarshalStruct(value reflect.Value, data interface{}, tag reflect.StructTag) error {
if data == nil {
return nil
}
@@ -114,7 +136,7 @@ func unmarshalStruct(value reflect.Value, data interface{}, tag reflect.StructTa
// unwrap any payloads
if payload := tag.Get("payload"); payload != "" {
field, _ := t.FieldByName(payload)
- return unmarshalAny(value.FieldByName(payload), data, field.Tag)
+ return u.unmarshalAny(value.FieldByName(payload), data, field.Tag)
}
for i := 0; i < t.NumField(); i++ {
@@ -128,9 +150,19 @@ func unmarshalStruct(value reflect.Value, data interface{}, tag reflect.StructTa
if locName := field.Tag.Get("locationName"); locName != "" {
name = locName
}
+ if u.caseInsensitive {
+ if _, ok := mapData[name]; !ok {
+ // Fallback to uncased name search if the exact name didn't match.
+ for kn, v := range mapData {
+ if strings.EqualFold(kn, name) {
+ mapData[name] = v
+ }
+ }
+ }
+ }
member := value.FieldByIndex(field.Index)
- err := unmarshalAny(member, mapData[name], field.Tag)
+ err := u.unmarshalAny(member, mapData[name], field.Tag)
if err != nil {
return err
}
@@ -138,7 +170,7 @@ func unmarshalStruct(value reflect.Value, data interface{}, tag reflect.StructTa
return nil
}
-func unmarshalList(value reflect.Value, data interface{}, tag reflect.StructTag) error {
+func (u unmarshaler) unmarshalList(value reflect.Value, data interface{}, tag reflect.StructTag) error {
if data == nil {
return nil
}
@@ -153,7 +185,7 @@ func unmarshalList(value reflect.Value, data interface{}, tag reflect.StructTag)
}
for i, c := range listData {
- err := unmarshalAny(value.Index(i), c, "")
+ err := u.unmarshalAny(value.Index(i), c, "")
if err != nil {
return err
}
@@ -162,7 +194,7 @@ func unmarshalList(value reflect.Value, data interface{}, tag reflect.StructTag)
return nil
}
-func unmarshalMap(value reflect.Value, data interface{}, tag reflect.StructTag) error {
+func (u unmarshaler) unmarshalMap(value reflect.Value, data interface{}, tag reflect.StructTag) error {
if data == nil {
return nil
}
@@ -179,14 +211,14 @@ func unmarshalMap(value reflect.Value, data interface{}, tag reflect.StructTag)
kvalue := reflect.ValueOf(k)
vvalue := reflect.New(value.Type().Elem()).Elem()
- unmarshalAny(vvalue, v, "")
+ u.unmarshalAny(vvalue, v, "")
value.SetMapIndex(kvalue, vvalue)
}
return nil
}
-func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTag) error {
+func (u unmarshaler) unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTag) error {
switch d := data.(type) {
case nil:
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
index bfedc9fd..a029217e 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
@@ -2,12 +2,10 @@
// requests and responses.
package jsonrpc
-//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/json.json build_test.go
-//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/json.json unmarshal_test.go
+//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/json.json build_test.go
+//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/json.json unmarshal_test.go
import (
- "strings"
-
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol/json/jsonutil"
@@ -16,17 +14,26 @@ import (
var emptyJSON = []byte("{}")
-// BuildHandler is a named request handler for building jsonrpc protocol requests
-var BuildHandler = request.NamedHandler{Name: "awssdk.jsonrpc.Build", Fn: Build}
-
-// UnmarshalHandler is a named request handler for unmarshaling jsonrpc protocol requests
-var UnmarshalHandler = request.NamedHandler{Name: "awssdk.jsonrpc.Unmarshal", Fn: Unmarshal}
+// BuildHandler is a named request handler for building jsonrpc protocol
+// requests
+var BuildHandler = request.NamedHandler{
+ Name: "awssdk.jsonrpc.Build",
+ Fn: Build,
+}
-// UnmarshalMetaHandler is a named request handler for unmarshaling jsonrpc protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.jsonrpc.UnmarshalMeta", Fn: UnmarshalMeta}
+// UnmarshalHandler is a named request handler for unmarshaling jsonrpc
+// protocol requests
+var UnmarshalHandler = request.NamedHandler{
+ Name: "awssdk.jsonrpc.Unmarshal",
+ Fn: Unmarshal,
+}
-// UnmarshalErrorHandler is a named request handler for unmarshaling jsonrpc protocol request errors
-var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.jsonrpc.UnmarshalError", Fn: UnmarshalError}
+// UnmarshalMetaHandler is a named request handler for unmarshaling jsonrpc
+// protocol request metadata
+var UnmarshalMetaHandler = request.NamedHandler{
+ Name: "awssdk.jsonrpc.UnmarshalMeta",
+ Fn: UnmarshalMeta,
+}
// Build builds a JSON payload for a JSON RPC request.
func Build(req *request.Request) {
@@ -79,32 +86,3 @@ func Unmarshal(req *request.Request) {
func UnmarshalMeta(req *request.Request) {
rest.UnmarshalMeta(req)
}
-
-// UnmarshalError unmarshals an error response for a JSON RPC service.
-func UnmarshalError(req *request.Request) {
- defer req.HTTPResponse.Body.Close()
-
- var jsonErr jsonErrorResponse
- err := jsonutil.UnmarshalJSONError(&jsonErr, req.HTTPResponse.Body)
- if err != nil {
- req.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to unmarshal error message", err),
- req.HTTPResponse.StatusCode,
- req.RequestID,
- )
- return
- }
-
- codes := strings.SplitN(jsonErr.Code, "#", 2)
- req.Error = awserr.NewRequestFailure(
- awserr.New(codes[len(codes)-1], jsonErr.Message, nil),
- req.HTTPResponse.StatusCode,
- req.RequestID,
- )
-}
-
-type jsonErrorResponse struct {
- Code string `json:"__type"`
- Message string `json:"message"`
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go
index e21614a1..0ea0647a 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go
@@ -64,7 +64,7 @@ func (h HandlerPayloadMarshal) MarshalPayload(w io.Writer, v interface{}) error
metadata.ClientInfo{},
request.Handlers{},
nil,
- &request.Operation{HTTPMethod: "GET"},
+ &request.Operation{HTTPMethod: "PUT"},
v,
nil,
)
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go
index 0cb99eb5..d40346a7 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go
@@ -1,7 +1,7 @@
// Package query provides serialization of AWS query requests, and responses.
package query
-//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/query.json build_test.go
+//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/query.json build_test.go
import (
"net/url"
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go
index f69c1efc..9231e95d 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go
@@ -1,6 +1,6 @@
package query
-//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/query.json unmarshal_test.go
+//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/query.json unmarshal_test.go
import (
"encoding/xml"
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
index 74e361e0..92f8b4d9 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
@@ -15,6 +15,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
+ awsStrings "github.com/aws/aws-sdk-go/internal/strings"
"github.com/aws/aws-sdk-go/private/protocol"
)
@@ -28,7 +29,9 @@ var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.rest.UnmarshalMeta
func Unmarshal(r *request.Request) {
if r.DataFilled() {
v := reflect.Indirect(reflect.ValueOf(r.Data))
- unmarshalBody(r, v)
+ if err := unmarshalBody(r, v); err != nil {
+ r.Error = err
+ }
}
}
@@ -40,12 +43,21 @@ func UnmarshalMeta(r *request.Request) {
r.RequestID = r.HTTPResponse.Header.Get("X-Amz-Request-Id")
}
if r.DataFilled() {
- v := reflect.Indirect(reflect.ValueOf(r.Data))
- unmarshalLocationElements(r, v)
+ if err := UnmarshalResponse(r.HTTPResponse, r.Data, aws.BoolValue(r.Config.LowerCaseHeaderMaps)); err != nil {
+ r.Error = err
+ }
}
}
-func unmarshalBody(r *request.Request, v reflect.Value) {
+// UnmarshalResponse attempts to unmarshal the REST response headers to
+// the data type passed in. The type must be a pointer. An error is returned
+// with any error unmarshaling the response into the target datatype.
+func UnmarshalResponse(resp *http.Response, data interface{}, lowerCaseHeaderMaps bool) error {
+ v := reflect.Indirect(reflect.ValueOf(data))
+ return unmarshalLocationElements(resp, v, lowerCaseHeaderMaps)
+}
+
+func unmarshalBody(r *request.Request, v reflect.Value) error {
if field, ok := v.Type().FieldByName("_"); ok {
if payloadName := field.Tag.Get("payload"); payloadName != "" {
pfield, _ := v.Type().FieldByName(payloadName)
@@ -57,35 +69,38 @@ func unmarshalBody(r *request.Request, v reflect.Value) {
defer r.HTTPResponse.Body.Close()
b, err := ioutil.ReadAll(r.HTTPResponse.Body)
if err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
- } else {
- payload.Set(reflect.ValueOf(b))
+ return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
}
+
+ payload.Set(reflect.ValueOf(b))
+
case *string:
defer r.HTTPResponse.Body.Close()
b, err := ioutil.ReadAll(r.HTTPResponse.Body)
if err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
- } else {
- str := string(b)
- payload.Set(reflect.ValueOf(&str))
+ return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
}
+
+ str := string(b)
+ payload.Set(reflect.ValueOf(&str))
+
default:
switch payload.Type().String() {
case "io.ReadCloser":
payload.Set(reflect.ValueOf(r.HTTPResponse.Body))
+
case "io.ReadSeeker":
b, err := ioutil.ReadAll(r.HTTPResponse.Body)
if err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization,
+ return awserr.New(request.ErrCodeSerialization,
"failed to read response body", err)
- return
}
payload.Set(reflect.ValueOf(ioutil.NopCloser(bytes.NewReader(b))))
+
default:
io.Copy(ioutil.Discard, r.HTTPResponse.Body)
- defer r.HTTPResponse.Body.Close()
- r.Error = awserr.New(request.ErrCodeSerialization,
+ r.HTTPResponse.Body.Close()
+ return awserr.New(request.ErrCodeSerialization,
"failed to decode REST response",
fmt.Errorf("unknown payload type %s", payload.Type()))
}
@@ -94,9 +109,11 @@ func unmarshalBody(r *request.Request, v reflect.Value) {
}
}
}
+
+ return nil
}
-func unmarshalLocationElements(r *request.Request, v reflect.Value) {
+func unmarshalLocationElements(resp *http.Response, v reflect.Value, lowerCaseHeaderMaps bool) error {
for i := 0; i < v.NumField(); i++ {
m, field := v.Field(i), v.Type().Field(i)
if n := field.Name; n[0:1] == strings.ToLower(n[0:1]) {
@@ -111,26 +128,25 @@ func unmarshalLocationElements(r *request.Request, v reflect.Value) {
switch field.Tag.Get("location") {
case "statusCode":
- unmarshalStatusCode(m, r.HTTPResponse.StatusCode)
+ unmarshalStatusCode(m, resp.StatusCode)
+
case "header":
- err := unmarshalHeader(m, r.HTTPResponse.Header.Get(name), field.Tag)
+ err := unmarshalHeader(m, resp.Header.Get(name), field.Tag)
if err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
- break
+ return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
}
+
case "headers":
prefix := field.Tag.Get("locationName")
- err := unmarshalHeaderMap(m, r.HTTPResponse.Header, prefix)
+ err := unmarshalHeaderMap(m, resp.Header, prefix, lowerCaseHeaderMaps)
if err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
- break
+ awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
}
}
}
- if r.Error != nil {
- return
- }
}
+
+ return nil
}
func unmarshalStatusCode(v reflect.Value, statusCode int) {
@@ -145,7 +161,7 @@ func unmarshalStatusCode(v reflect.Value, statusCode int) {
}
}
-func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string) error {
+func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string, normalize bool) error {
if len(headers) == 0 {
return nil
}
@@ -153,8 +169,12 @@ func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string) err
case map[string]*string: // we only support string map value types
out := map[string]*string{}
for k, v := range headers {
- k = http.CanonicalHeaderKey(k)
- if strings.HasPrefix(strings.ToLower(k), strings.ToLower(prefix)) {
+ if awsStrings.HasPrefixFold(k, prefix) {
+ if normalize == true {
+ k = strings.ToLower(k)
+ } else {
+ k = http.CanonicalHeaderKey(k)
+ }
out[k[len(prefix):]] = &v[0]
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go
index 07a6187e..b1ae3648 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go
@@ -2,8 +2,8 @@
// requests and responses.
package restxml
-//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/rest-xml.json build_test.go
-//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/rest-xml.json unmarshal_test.go
+//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/rest-xml.json build_test.go
+//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/rest-xml.json unmarshal_test.go
import (
"bytes"
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go
index 05d4ff51..d2f6dae5 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go
@@ -56,7 +56,8 @@ func FormatTime(name string, t time.Time) string {
case ISO8601TimeFormatName:
return t.Format(ISO8601OutputTimeFormat)
case UnixTimeFormatName:
- return strconv.FormatInt(t.Unix(), 10)
+ ms := t.UnixNano() / int64(time.Millisecond)
+ return strconv.FormatFloat(float64(ms)/1e3, 'f', -1, 64)
default:
panic("unknown timestamp format name, " + name)
}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go
index da1a6811..f614ef89 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go
@@ -19,3 +19,9 @@ func UnmarshalDiscardBody(r *request.Request) {
io.Copy(ioutil.Discard, r.HTTPResponse.Body)
r.HTTPResponse.Body.Close()
}
+
+// ResponseMetadata provides the SDK response metadata attributes.
+type ResponseMetadata struct {
+ StatusCode int
+ RequestID string
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
index cf981fe9..09ad9515 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
@@ -8,6 +8,7 @@ import (
"reflect"
"sort"
"strconv"
+ "strings"
"time"
"github.com/aws/aws-sdk-go/private/protocol"
@@ -60,6 +61,14 @@ func (b *xmlBuilder) buildValue(value reflect.Value, current *XMLNode, tag refle
return nil
}
+ xml := tag.Get("xml")
+ if len(xml) != 0 {
+ name := strings.SplitAfterN(xml, ",", 2)[0]
+ if name == "-" {
+ return nil
+ }
+ }
+
t := tag.Get("type")
if t == "" {
switch value.Kind() {
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
index 7108d380..107c053f 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
@@ -64,6 +64,14 @@ func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error {
// parse deserializes any value from the XMLNode. The type tag is used to infer the type, or reflect
// will be used to determine the type from r.
func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
+ xml := tag.Get("xml")
+ if len(xml) != 0 {
+ name := strings.SplitAfterN(xml, ",", 2)[0]
+ if name == "-" {
+ return nil
+ }
+ }
+
rtype := r.Type()
if rtype.Kind() == reflect.Ptr {
rtype = rtype.Elem() // check kind of actual element type
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 e0ac414e..9e3d7de9 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
@@ -245,10 +245,11 @@ func (c *CloudFormation) CreateChangeSetRequest(input *CreateChangeSetInput) (re
//
// To create a change set for a stack that doesn't exist, for the ChangeSetType
// parameter, specify CREATE. To create a change set for an existing stack,
-// specify UPDATE for the ChangeSetType parameter. After the CreateChangeSet
-// call successfully completes, AWS CloudFormation starts creating the change
-// set. To check the status of the change set or to review it, use the DescribeChangeSet
-// action.
+// specify UPDATE for the ChangeSetType parameter. To create a change set for
+// an import operation, specify IMPORT for the ChangeSetType parameter. After
+// the CreateChangeSet call successfully completes, AWS CloudFormation starts
+// creating the change set. To check the status of the change set or to review
+// it, use the DescribeChangeSet action.
//
// When you are satisfied with the changes the change set will make, execute
// the change set by using the ExecuteChangeSet action. AWS CloudFormation doesn't
@@ -436,9 +437,9 @@ func (c *CloudFormation) CreateStackInstancesRequest(input *CreateStackInstances
// CreateStackInstances API operation for AWS CloudFormation.
//
// Creates stack instances for the specified accounts, within the specified
-// regions. A stack instance refers to a stack in a specific account and region.
-// Accounts and Regions are required parameters—you must specify at least
-// one account and one region.
+// Regions. A stack instance refers to a stack in a specific account and Region.
+// You must specify at least one value for either Accounts or DeploymentTargets,
+// and you must specify at least one value for Regions.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -793,7 +794,7 @@ func (c *CloudFormation) DeleteStackInstancesRequest(input *DeleteStackInstances
// DeleteStackInstances API operation for AWS CloudFormation.
//
-// Deletes stack instances for the specified accounts, in the specified regions.
+// Deletes stack instances for the specified accounts, in the specified Regions.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -930,6 +931,99 @@ func (c *CloudFormation) DeleteStackSetWithContext(ctx aws.Context, input *Delet
return out, req.Send()
}
+const opDeregisterType = "DeregisterType"
+
+// DeregisterTypeRequest generates a "aws/request.Request" representing the
+// client's request for the DeregisterType operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeregisterType for more information on using the DeregisterType
+// 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 DeregisterTypeRequest method.
+// req, resp := client.DeregisterTypeRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DeregisterType
+func (c *CloudFormation) DeregisterTypeRequest(input *DeregisterTypeInput) (req *request.Request, output *DeregisterTypeOutput) {
+ op := &request.Operation{
+ Name: opDeregisterType,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeregisterTypeInput{}
+ }
+
+ output = &DeregisterTypeOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// DeregisterType API operation for AWS CloudFormation.
+//
+// Removes a type or type version from active use in the CloudFormation registry.
+// If a type or type version is deregistered, it cannot be used in CloudFormation
+// operations.
+//
+// To deregister a type, you must individually deregister all registered versions
+// of that type. If a type has only a single registered version, deregistering
+// that version results in the type itself being deregistered.
+//
+// You cannot deregister the default version of a type, unless it is the only
+// registered version of that type, in which case the type itself is deregistered
+// as well.
+//
+// Returns awserr.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 DeregisterType for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeCFNRegistryException "CFNRegistryException"
+// An error occurred during a CloudFormation registry operation.
+//
+// * ErrCodeTypeNotFoundException "TypeNotFoundException"
+// The specified type does not exist in the CloudFormation registry.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DeregisterType
+func (c *CloudFormation) DeregisterType(input *DeregisterTypeInput) (*DeregisterTypeOutput, error) {
+ req, out := c.DeregisterTypeRequest(input)
+ return out, req.Send()
+}
+
+// DeregisterTypeWithContext is the same as DeregisterType with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeregisterType 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) DeregisterTypeWithContext(ctx aws.Context, input *DeregisterTypeInput, opts ...request.Option) (*DeregisterTypeOutput, error) {
+ req, out := c.DeregisterTypeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDescribeAccountLimits = "DescribeAccountLimits"
// DescribeAccountLimitsRequest generates a "aws/request.Request" representing the
@@ -961,6 +1055,12 @@ func (c *CloudFormation) DescribeAccountLimitsRequest(input *DescribeAccountLimi
Name: opDescribeAccountLimits,
HTTPMethod: "POST",
HTTPPath: "/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "",
+ TruncationToken: "",
+ },
}
if input == nil {
@@ -1007,6 +1107,58 @@ func (c *CloudFormation) DescribeAccountLimitsWithContext(ctx aws.Context, input
return out, req.Send()
}
+// DescribeAccountLimitsPages iterates over the pages of a DescribeAccountLimits operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See DescribeAccountLimits 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 DescribeAccountLimits operation.
+// pageNum := 0
+// err := client.DescribeAccountLimitsPages(params,
+// func(page *cloudformation.DescribeAccountLimitsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *CloudFormation) DescribeAccountLimitsPages(input *DescribeAccountLimitsInput, fn func(*DescribeAccountLimitsOutput, bool) bool) error {
+ return c.DescribeAccountLimitsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeAccountLimitsPagesWithContext same as DescribeAccountLimitsPages 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 *CloudFormation) DescribeAccountLimitsPagesWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, fn func(*DescribeAccountLimitsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeAccountLimitsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeAccountLimitsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*DescribeAccountLimitsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
const opDescribeChangeSet = "DescribeChangeSet"
// DescribeChangeSetRequest generates a "aws/request.Request" representing the
@@ -1304,10 +1456,12 @@ func (c *CloudFormation) DescribeStackEventsPagesWithContext(ctx aws.Context, in
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeStackEventsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*DescribeStackEventsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -1356,7 +1510,7 @@ func (c *CloudFormation) DescribeStackInstanceRequest(input *DescribeStackInstan
// DescribeStackInstance API operation for AWS CloudFormation.
//
// Returns the stack instance that's associated with the specified stack set,
-// AWS account, and region.
+// AWS account, and Region.
//
// For a list of stack instances that are associated with a specific stack set,
// use ListStackInstances.
@@ -1608,10 +1762,12 @@ func (c *CloudFormation) DescribeStackResourceDriftsPagesWithContext(ctx aws.Con
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeStackResourceDriftsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*DescribeStackResourceDriftsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -1993,13 +2149,187 @@ func (c *CloudFormation) DescribeStacksPagesWithContext(ctx aws.Context, input *
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeStacksOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*DescribeStacksOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
+const opDescribeType = "DescribeType"
+
+// DescribeTypeRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeType operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeType for more information on using the DescribeType
+// 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 DescribeTypeRequest method.
+// req, resp := client.DescribeTypeRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeType
+func (c *CloudFormation) DescribeTypeRequest(input *DescribeTypeInput) (req *request.Request, output *DescribeTypeOutput) {
+ op := &request.Operation{
+ Name: opDescribeType,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeTypeInput{}
+ }
+
+ output = &DescribeTypeOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeType API operation for AWS CloudFormation.
+//
+// Returns detailed information about a type that has been registered.
+//
+// If you specify a VersionId, DescribeType returns information about that specific
+// type version. Otherwise, it returns information about the default type version.
+//
+// Returns awserr.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 DescribeType for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeCFNRegistryException "CFNRegistryException"
+// An error occurred during a CloudFormation registry operation.
+//
+// * ErrCodeTypeNotFoundException "TypeNotFoundException"
+// The specified type does not exist in the CloudFormation registry.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeType
+func (c *CloudFormation) DescribeType(input *DescribeTypeInput) (*DescribeTypeOutput, error) {
+ req, out := c.DescribeTypeRequest(input)
+ return out, req.Send()
+}
+
+// DescribeTypeWithContext is the same as DescribeType with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeType 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) DescribeTypeWithContext(ctx aws.Context, input *DescribeTypeInput, opts ...request.Option) (*DescribeTypeOutput, error) {
+ req, out := c.DescribeTypeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeTypeRegistration = "DescribeTypeRegistration"
+
+// DescribeTypeRegistrationRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeTypeRegistration operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeTypeRegistration for more information on using the DescribeTypeRegistration
+// 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 DescribeTypeRegistrationRequest method.
+// req, resp := client.DescribeTypeRegistrationRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeTypeRegistration
+func (c *CloudFormation) DescribeTypeRegistrationRequest(input *DescribeTypeRegistrationInput) (req *request.Request, output *DescribeTypeRegistrationOutput) {
+ op := &request.Operation{
+ Name: opDescribeTypeRegistration,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeTypeRegistrationInput{}
+ }
+
+ output = &DescribeTypeRegistrationOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeTypeRegistration API operation for AWS CloudFormation.
+//
+// Returns information about a type's registration, including its current status
+// and type and version identifiers.
+//
+// When you initiate a registration request using RegisterType , you can then
+// use DescribeTypeRegistration to monitor the progress of that registration
+// request.
+//
+// Once the registration request has completed, use DescribeType to return detailed
+// informaiton about a type.
+//
+// Returns awserr.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 DescribeTypeRegistration for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeCFNRegistryException "CFNRegistryException"
+// An error occurred during a CloudFormation registry operation.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeTypeRegistration
+func (c *CloudFormation) DescribeTypeRegistration(input *DescribeTypeRegistrationInput) (*DescribeTypeRegistrationOutput, error) {
+ req, out := c.DescribeTypeRegistrationRequest(input)
+ return out, req.Send()
+}
+
+// DescribeTypeRegistrationWithContext is the same as DescribeTypeRegistration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeTypeRegistration 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) DescribeTypeRegistrationWithContext(ctx aws.Context, input *DescribeTypeRegistrationInput, opts ...request.Option) (*DescribeTypeRegistrationOutput, error) {
+ req, out := c.DescribeTypeRegistrationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDetectStackDrift = "DetectStackDrift"
// DetectStackDriftRequest generates a "aws/request.Request" representing the
@@ -2186,65 +2516,183 @@ func (c *CloudFormation) DetectStackResourceDriftWithContext(ctx aws.Context, in
return out, req.Send()
}
-const opEstimateTemplateCost = "EstimateTemplateCost"
+const opDetectStackSetDrift = "DetectStackSetDrift"
-// EstimateTemplateCostRequest generates a "aws/request.Request" representing the
-// client's request for the EstimateTemplateCost operation. The "output" return
+// DetectStackSetDriftRequest generates a "aws/request.Request" representing the
+// client's request for the DetectStackSetDrift operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See EstimateTemplateCost for more information on using the EstimateTemplateCost
+// See DetectStackSetDrift for more information on using the DetectStackSetDrift
// 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 EstimateTemplateCostRequest method.
-// req, resp := client.EstimateTemplateCostRequest(params)
+// // Example sending a request using the DetectStackSetDriftRequest method.
+// req, resp := client.DetectStackSetDriftRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/EstimateTemplateCost
-func (c *CloudFormation) EstimateTemplateCostRequest(input *EstimateTemplateCostInput) (req *request.Request, output *EstimateTemplateCostOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackSetDrift
+func (c *CloudFormation) DetectStackSetDriftRequest(input *DetectStackSetDriftInput) (req *request.Request, output *DetectStackSetDriftOutput) {
op := &request.Operation{
- Name: opEstimateTemplateCost,
+ Name: opDetectStackSetDrift,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
- input = &EstimateTemplateCostInput{}
+ input = &DetectStackSetDriftInput{}
}
- output = &EstimateTemplateCostOutput{}
+ output = &DetectStackSetDriftOutput{}
req = c.newRequest(op, input, output)
return
}
-// EstimateTemplateCost API operation for AWS CloudFormation.
+// DetectStackSetDrift API operation for AWS CloudFormation.
//
-// Returns the estimated monthly cost of a template. The return value is an
-// AWS Simple Monthly Calculator URL with a query string that describes the
-// resources required to run the template.
+// Detect drift on a stack set. When CloudFormation performs drift detection
+// on a stack set, it performs drift detection on the stack associated with
+// each stack instance in the stack set. For more information, see How CloudFormation
+// Performs Drift Detection on a Stack Set (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-drift.html).
+//
+// DetectStackSetDrift returns the OperationId of the stack set drift detection
+// operation. Use this operation id with DescribeStackSetOperation to monitor
+// the progress of the drift detection operation. The drift detection operation
+// may take some time, depending on the number of stack instances included in
+// the stack set, as well as the number of resources included in each stack.
+//
+// Once the operation has completed, use the following actions to return drift
+// information:
+//
+// * Use DescribeStackSet to return detailed informaiton about the stack
+// set, including detailed information about the last completed drift operation
+// performed on the stack set. (Information about drift operations that are
+// in progress is not included.)
+//
+// * Use ListStackInstances to return a list of stack instances belonging
+// to the stack set, including the drift status and last drift time checked
+// of each instance.
+//
+// * Use DescribeStackInstance to return detailed information about a specific
+// stack instance, including its drift status and last drift time checked.
+//
+// For more information on performing a drift detection operation on a stack
+// set, see Detecting Unmanaged Changes in Stack Sets (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-drift.html).
+//
+// You can only run a single drift detection operation on a given stack set
+// at one time.
+//
+// To stop a drift detection stack set operation, use StopStackSetOperation .
//
// Returns awserr.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 EstimateTemplateCost for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/EstimateTemplateCost
-func (c *CloudFormation) EstimateTemplateCost(input *EstimateTemplateCostInput) (*EstimateTemplateCostOutput, error) {
- req, out := c.EstimateTemplateCostRequest(input)
- return out, req.Send()
-}
+// API operation DetectStackSetDrift for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeInvalidOperationException "InvalidOperationException"
+// The specified operation isn't valid.
+//
+// * ErrCodeOperationInProgressException "OperationInProgressException"
+// Another operation is currently in progress for this stack set. Only one operation
+// can be performed for a stack set at a given time.
+//
+// * ErrCodeStackSetNotFoundException "StackSetNotFoundException"
+// The specified stack set doesn't exist.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackSetDrift
+func (c *CloudFormation) DetectStackSetDrift(input *DetectStackSetDriftInput) (*DetectStackSetDriftOutput, error) {
+ req, out := c.DetectStackSetDriftRequest(input)
+ return out, req.Send()
+}
+
+// DetectStackSetDriftWithContext is the same as DetectStackSetDrift with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetectStackSetDrift 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) DetectStackSetDriftWithContext(ctx aws.Context, input *DetectStackSetDriftInput, opts ...request.Option) (*DetectStackSetDriftOutput, error) {
+ req, out := c.DetectStackSetDriftRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opEstimateTemplateCost = "EstimateTemplateCost"
+
+// EstimateTemplateCostRequest generates a "aws/request.Request" representing the
+// client's request for the EstimateTemplateCost operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See EstimateTemplateCost for more information on using the EstimateTemplateCost
+// 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 EstimateTemplateCostRequest method.
+// req, resp := client.EstimateTemplateCostRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/EstimateTemplateCost
+func (c *CloudFormation) EstimateTemplateCostRequest(input *EstimateTemplateCostInput) (req *request.Request, output *EstimateTemplateCostOutput) {
+ op := &request.Operation{
+ Name: opEstimateTemplateCost,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &EstimateTemplateCostInput{}
+ }
+
+ output = &EstimateTemplateCostOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// EstimateTemplateCost API operation for AWS CloudFormation.
+//
+// Returns the estimated monthly cost of a template. The return value is an
+// AWS Simple Monthly Calculator URL with a query string that describes the
+// resources required to run the template.
+//
+// Returns awserr.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 EstimateTemplateCost for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/EstimateTemplateCost
+func (c *CloudFormation) EstimateTemplateCost(input *EstimateTemplateCostInput) (*EstimateTemplateCostOutput, error) {
+ req, out := c.EstimateTemplateCostRequest(input)
+ return out, req.Send()
+}
// EstimateTemplateCostWithContext is the same as EstimateTemplateCost with the addition of
// the ability to pass a context and additional request options.
@@ -2648,6 +3096,12 @@ func (c *CloudFormation) ListChangeSetsRequest(input *ListChangeSetsInput) (req
Name: opListChangeSets,
HTTPMethod: "POST",
HTTPPath: "/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "",
+ TruncationToken: "",
+ },
}
if input == nil {
@@ -2693,6 +3147,58 @@ func (c *CloudFormation) ListChangeSetsWithContext(ctx aws.Context, input *ListC
return out, req.Send()
}
+// ListChangeSetsPages iterates over the pages of a ListChangeSets operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See ListChangeSets 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 ListChangeSets operation.
+// pageNum := 0
+// err := client.ListChangeSetsPages(params,
+// func(page *cloudformation.ListChangeSetsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *CloudFormation) ListChangeSetsPages(input *ListChangeSetsInput, fn func(*ListChangeSetsOutput, bool) bool) error {
+ return c.ListChangeSetsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListChangeSetsPagesWithContext same as ListChangeSetsPages 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 *CloudFormation) ListChangeSetsPagesWithContext(ctx aws.Context, input *ListChangeSetsInput, fn func(*ListChangeSetsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListChangeSetsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListChangeSetsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*ListChangeSetsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
const opListExports = "ListExports"
// ListExportsRequest generates a "aws/request.Request" representing the
@@ -2743,7 +3249,7 @@ func (c *CloudFormation) ListExportsRequest(input *ListExportsInput) (req *reque
// ListExports API operation for AWS CloudFormation.
//
-// Lists all exported output values in the account and region in which you call
+// Lists all exported output values in the account and Region in which you call
// this action. Use this action to see the exported output values that you can
// import into other stacks. To import values, use the Fn::ImportValue (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html)
// function.
@@ -2821,10 +3327,12 @@ func (c *CloudFormation) ListExportsPagesWithContext(ctx aws.Context, input *Lis
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListExportsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListExportsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -2957,10 +3465,12 @@ func (c *CloudFormation) ListImportsPagesWithContext(ctx aws.Context, input *Lis
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListImportsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListImportsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -2995,6 +3505,12 @@ func (c *CloudFormation) ListStackInstancesRequest(input *ListStackInstancesInpu
Name: opListStackInstances,
HTTPMethod: "POST",
HTTPPath: "/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
}
if input == nil {
@@ -3010,7 +3526,7 @@ func (c *CloudFormation) ListStackInstancesRequest(input *ListStackInstancesInpu
//
// Returns summary information about stack instances that are associated with
// the specified stack set. You can filter for stack instances that are associated
-// with a specific AWS account name or region.
+// with a specific AWS account name or 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
@@ -3045,6 +3561,58 @@ func (c *CloudFormation) ListStackInstancesWithContext(ctx aws.Context, input *L
return out, req.Send()
}
+// ListStackInstancesPages iterates over the pages of a ListStackInstances operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See ListStackInstances 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 ListStackInstances operation.
+// pageNum := 0
+// err := client.ListStackInstancesPages(params,
+// func(page *cloudformation.ListStackInstancesOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *CloudFormation) ListStackInstancesPages(input *ListStackInstancesInput, fn func(*ListStackInstancesOutput, bool) bool) error {
+ return c.ListStackInstancesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListStackInstancesPagesWithContext same as ListStackInstancesPages 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 *CloudFormation) ListStackInstancesPagesWithContext(ctx aws.Context, input *ListStackInstancesInput, fn func(*ListStackInstancesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListStackInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListStackInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*ListStackInstancesOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
const opListStackResources = "ListStackResources"
// ListStackResourcesRequest generates a "aws/request.Request" representing the
@@ -3171,10 +3739,12 @@ func (c *CloudFormation) ListStackResourcesPagesWithContext(ctx aws.Context, inp
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListStackResourcesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListStackResourcesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -3209,6 +3779,12 @@ func (c *CloudFormation) ListStackSetOperationResultsRequest(input *ListStackSet
Name: opListStackSetOperationResults,
HTTPMethod: "POST",
HTTPPath: "/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
}
if input == nil {
@@ -3260,6 +3836,58 @@ func (c *CloudFormation) ListStackSetOperationResultsWithContext(ctx aws.Context
return out, req.Send()
}
+// ListStackSetOperationResultsPages iterates over the pages of a ListStackSetOperationResults operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See ListStackSetOperationResults 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 ListStackSetOperationResults operation.
+// pageNum := 0
+// err := client.ListStackSetOperationResultsPages(params,
+// func(page *cloudformation.ListStackSetOperationResultsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *CloudFormation) ListStackSetOperationResultsPages(input *ListStackSetOperationResultsInput, fn func(*ListStackSetOperationResultsOutput, bool) bool) error {
+ return c.ListStackSetOperationResultsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListStackSetOperationResultsPagesWithContext same as ListStackSetOperationResultsPages 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 *CloudFormation) ListStackSetOperationResultsPagesWithContext(ctx aws.Context, input *ListStackSetOperationResultsInput, fn func(*ListStackSetOperationResultsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListStackSetOperationResultsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListStackSetOperationResultsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*ListStackSetOperationResultsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
const opListStackSetOperations = "ListStackSetOperations"
// ListStackSetOperationsRequest generates a "aws/request.Request" representing the
@@ -3291,6 +3919,12 @@ func (c *CloudFormation) ListStackSetOperationsRequest(input *ListStackSetOperat
Name: opListStackSetOperations,
HTTPMethod: "POST",
HTTPPath: "/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
}
if input == nil {
@@ -3339,25 +3973,77 @@ func (c *CloudFormation) ListStackSetOperationsWithContext(ctx aws.Context, inpu
return out, req.Send()
}
-const opListStackSets = "ListStackSets"
-
-// ListStackSetsRequest generates a "aws/request.Request" representing the
-// client's request for the ListStackSets operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
+// ListStackSetOperationsPages iterates over the pages of a ListStackSetOperations operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
//
-// See ListStackSets for more information on using the ListStackSets
-// API call, and error handling.
+// See ListStackSetOperations method for more information on how to use this operation.
//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+// Note: This operation can generate multiple requests to a service.
//
+// // Example iterating over at most 3 pages of a ListStackSetOperations operation.
+// pageNum := 0
+// err := client.ListStackSetOperationsPages(params,
+// func(page *cloudformation.ListStackSetOperationsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
//
-// // Example sending a request using the ListStackSetsRequest method.
-// req, resp := client.ListStackSetsRequest(params)
+func (c *CloudFormation) ListStackSetOperationsPages(input *ListStackSetOperationsInput, fn func(*ListStackSetOperationsOutput, bool) bool) error {
+ return c.ListStackSetOperationsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListStackSetOperationsPagesWithContext same as ListStackSetOperationsPages 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 *CloudFormation) ListStackSetOperationsPagesWithContext(ctx aws.Context, input *ListStackSetOperationsInput, fn func(*ListStackSetOperationsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListStackSetOperationsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListStackSetOperationsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*ListStackSetOperationsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
+const opListStackSets = "ListStackSets"
+
+// ListStackSetsRequest generates a "aws/request.Request" representing the
+// client's request for the ListStackSets operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ListStackSets for more information on using the ListStackSets
+// 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 ListStackSetsRequest method.
+// req, resp := client.ListStackSetsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
@@ -3370,6 +4056,12 @@ func (c *CloudFormation) ListStackSetsRequest(input *ListStackSetsInput) (req *r
Name: opListStackSets,
HTTPMethod: "POST",
HTTPPath: "/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
}
if input == nil {
@@ -3414,6 +4106,58 @@ func (c *CloudFormation) ListStackSetsWithContext(ctx aws.Context, input *ListSt
return out, req.Send()
}
+// ListStackSetsPages iterates over the pages of a ListStackSets operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See ListStackSets 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 ListStackSets operation.
+// pageNum := 0
+// err := client.ListStackSetsPages(params,
+// func(page *cloudformation.ListStackSetsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *CloudFormation) ListStackSetsPages(input *ListStackSetsInput, fn func(*ListStackSetsOutput, bool) bool) error {
+ return c.ListStackSetsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListStackSetsPagesWithContext same as ListStackSetsPages 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 *CloudFormation) ListStackSetsPagesWithContext(ctx aws.Context, input *ListStackSetsInput, fn func(*ListStackSetsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListStackSetsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListStackSetsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*ListStackSetsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
const opListStacks = "ListStacks"
// ListStacksRequest generates a "aws/request.Request" representing the
@@ -3541,856 +4285,2984 @@ func (c *CloudFormation) ListStacksPagesWithContext(ctx aws.Context, input *List
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListStacksOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListStacksOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
-const opSetStackPolicy = "SetStackPolicy"
+const opListTypeRegistrations = "ListTypeRegistrations"
-// SetStackPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the SetStackPolicy operation. The "output" return
+// ListTypeRegistrationsRequest generates a "aws/request.Request" representing the
+// client's request for the ListTypeRegistrations operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See SetStackPolicy for more information on using the SetStackPolicy
+// See ListTypeRegistrations for more information on using the ListTypeRegistrations
// 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 SetStackPolicyRequest method.
-// req, resp := client.SetStackPolicyRequest(params)
+// // Example sending a request using the ListTypeRegistrationsRequest method.
+// req, resp := client.ListTypeRegistrationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SetStackPolicy
-func (c *CloudFormation) SetStackPolicyRequest(input *SetStackPolicyInput) (req *request.Request, output *SetStackPolicyOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListTypeRegistrations
+func (c *CloudFormation) ListTypeRegistrationsRequest(input *ListTypeRegistrationsInput) (req *request.Request, output *ListTypeRegistrationsOutput) {
op := &request.Operation{
- Name: opSetStackPolicy,
+ Name: opListTypeRegistrations,
HTTPMethod: "POST",
HTTPPath: "/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
}
if input == nil {
- input = &SetStackPolicyInput{}
+ input = &ListTypeRegistrationsInput{}
}
- output = &SetStackPolicyOutput{}
+ output = &ListTypeRegistrationsOutput{}
req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
-// SetStackPolicy API operation for AWS CloudFormation.
+// ListTypeRegistrations API operation for AWS CloudFormation.
//
-// Sets a stack policy for a specified stack.
+// Returns a list of registration tokens for the specified type(s).
//
// Returns awserr.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 SetStackPolicy for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SetStackPolicy
-func (c *CloudFormation) SetStackPolicy(input *SetStackPolicyInput) (*SetStackPolicyOutput, error) {
- req, out := c.SetStackPolicyRequest(input)
+// API operation ListTypeRegistrations for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeCFNRegistryException "CFNRegistryException"
+// An error occurred during a CloudFormation registry operation.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListTypeRegistrations
+func (c *CloudFormation) ListTypeRegistrations(input *ListTypeRegistrationsInput) (*ListTypeRegistrationsOutput, error) {
+ req, out := c.ListTypeRegistrationsRequest(input)
return out, req.Send()
}
-// SetStackPolicyWithContext is the same as SetStackPolicy with the addition of
+// ListTypeRegistrationsWithContext is the same as ListTypeRegistrations with the addition of
// the ability to pass a context and additional request options.
//
-// See SetStackPolicy for details on how to use this API operation.
+// See ListTypeRegistrations 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) SetStackPolicyWithContext(ctx aws.Context, input *SetStackPolicyInput, opts ...request.Option) (*SetStackPolicyOutput, error) {
- req, out := c.SetStackPolicyRequest(input)
+func (c *CloudFormation) ListTypeRegistrationsWithContext(ctx aws.Context, input *ListTypeRegistrationsInput, opts ...request.Option) (*ListTypeRegistrationsOutput, error) {
+ req, out := c.ListTypeRegistrationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
-const opSignalResource = "SignalResource"
+// ListTypeRegistrationsPages iterates over the pages of a ListTypeRegistrations operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See ListTypeRegistrations 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 ListTypeRegistrations operation.
+// pageNum := 0
+// err := client.ListTypeRegistrationsPages(params,
+// func(page *cloudformation.ListTypeRegistrationsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *CloudFormation) ListTypeRegistrationsPages(input *ListTypeRegistrationsInput, fn func(*ListTypeRegistrationsOutput, bool) bool) error {
+ return c.ListTypeRegistrationsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
-// SignalResourceRequest generates a "aws/request.Request" representing the
-// client's request for the SignalResource operation. The "output" return
+// ListTypeRegistrationsPagesWithContext same as ListTypeRegistrationsPages 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 *CloudFormation) ListTypeRegistrationsPagesWithContext(ctx aws.Context, input *ListTypeRegistrationsInput, fn func(*ListTypeRegistrationsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListTypeRegistrationsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListTypeRegistrationsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*ListTypeRegistrationsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
+const opListTypeVersions = "ListTypeVersions"
+
+// ListTypeVersionsRequest generates a "aws/request.Request" representing the
+// client's request for the ListTypeVersions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See SignalResource for more information on using the SignalResource
+// See ListTypeVersions for more information on using the ListTypeVersions
// 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 SignalResourceRequest method.
-// req, resp := client.SignalResourceRequest(params)
+// // Example sending a request using the ListTypeVersionsRequest method.
+// req, resp := client.ListTypeVersionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SignalResource
-func (c *CloudFormation) SignalResourceRequest(input *SignalResourceInput) (req *request.Request, output *SignalResourceOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListTypeVersions
+func (c *CloudFormation) ListTypeVersionsRequest(input *ListTypeVersionsInput) (req *request.Request, output *ListTypeVersionsOutput) {
op := &request.Operation{
- Name: opSignalResource,
+ Name: opListTypeVersions,
HTTPMethod: "POST",
HTTPPath: "/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
}
if input == nil {
- input = &SignalResourceInput{}
+ input = &ListTypeVersionsInput{}
}
- output = &SignalResourceOutput{}
+ output = &ListTypeVersionsOutput{}
req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
-// SignalResource API operation for AWS CloudFormation.
+// ListTypeVersions API operation for AWS CloudFormation.
//
-// Sends a signal to the specified resource with a success or failure status.
-// You can use the SignalResource API in conjunction with a creation policy
-// or update policy. AWS CloudFormation doesn't proceed with a stack creation
-// or update until resources receive the required number of signals or the timeout
-// period is exceeded. The SignalResource API is useful in cases where you want
-// to send signals from anywhere other than an Amazon EC2 instance.
+// Returns summary information about the versions of a type.
//
// Returns awserr.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 SignalResource for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SignalResource
-func (c *CloudFormation) SignalResource(input *SignalResourceInput) (*SignalResourceOutput, error) {
- req, out := c.SignalResourceRequest(input)
+// API operation ListTypeVersions for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeCFNRegistryException "CFNRegistryException"
+// An error occurred during a CloudFormation registry operation.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListTypeVersions
+func (c *CloudFormation) ListTypeVersions(input *ListTypeVersionsInput) (*ListTypeVersionsOutput, error) {
+ req, out := c.ListTypeVersionsRequest(input)
return out, req.Send()
}
-// SignalResourceWithContext is the same as SignalResource with the addition of
+// ListTypeVersionsWithContext is the same as ListTypeVersions with the addition of
// the ability to pass a context and additional request options.
//
-// See SignalResource for details on how to use this API operation.
+// See ListTypeVersions 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) SignalResourceWithContext(ctx aws.Context, input *SignalResourceInput, opts ...request.Option) (*SignalResourceOutput, error) {
- req, out := c.SignalResourceRequest(input)
+func (c *CloudFormation) ListTypeVersionsWithContext(ctx aws.Context, input *ListTypeVersionsInput, opts ...request.Option) (*ListTypeVersionsOutput, error) {
+ req, out := c.ListTypeVersionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
-const opStopStackSetOperation = "StopStackSetOperation"
+// ListTypeVersionsPages iterates over the pages of a ListTypeVersions operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See ListTypeVersions 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 ListTypeVersions operation.
+// pageNum := 0
+// err := client.ListTypeVersionsPages(params,
+// func(page *cloudformation.ListTypeVersionsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *CloudFormation) ListTypeVersionsPages(input *ListTypeVersionsInput, fn func(*ListTypeVersionsOutput, bool) bool) error {
+ return c.ListTypeVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
-// StopStackSetOperationRequest generates a "aws/request.Request" representing the
-// client's request for the StopStackSetOperation operation. The "output" return
+// ListTypeVersionsPagesWithContext same as ListTypeVersionsPages 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 *CloudFormation) ListTypeVersionsPagesWithContext(ctx aws.Context, input *ListTypeVersionsInput, fn func(*ListTypeVersionsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListTypeVersionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListTypeVersionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*ListTypeVersionsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
+const opListTypes = "ListTypes"
+
+// ListTypesRequest generates a "aws/request.Request" representing the
+// client's request for the ListTypes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See StopStackSetOperation for more information on using the StopStackSetOperation
+// See ListTypes for more information on using the ListTypes
// 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 StopStackSetOperationRequest method.
-// req, resp := client.StopStackSetOperationRequest(params)
+// // Example sending a request using the ListTypesRequest method.
+// req, resp := client.ListTypesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/StopStackSetOperation
-func (c *CloudFormation) StopStackSetOperationRequest(input *StopStackSetOperationInput) (req *request.Request, output *StopStackSetOperationOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListTypes
+func (c *CloudFormation) ListTypesRequest(input *ListTypesInput) (req *request.Request, output *ListTypesOutput) {
op := &request.Operation{
- Name: opStopStackSetOperation,
+ Name: opListTypes,
HTTPMethod: "POST",
HTTPPath: "/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
}
if input == nil {
- input = &StopStackSetOperationInput{}
+ input = &ListTypesInput{}
}
- output = &StopStackSetOperationOutput{}
+ output = &ListTypesOutput{}
req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
-// StopStackSetOperation API operation for AWS CloudFormation.
+// ListTypes API operation for AWS CloudFormation.
//
-// Stops an in-progress operation on a stack set and its associated stack instances.
+// Returns summary information about types that have been registered with CloudFormation.
//
// Returns awserr.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 StopStackSetOperation for usage and error information.
+// API operation ListTypes for usage and error information.
//
// Returned Error Codes:
-// * ErrCodeStackSetNotFoundException "StackSetNotFoundException"
-// The specified stack set doesn't exist.
+// * ErrCodeCFNRegistryException "CFNRegistryException"
+// An error occurred during a CloudFormation registry operation.
//
-// * ErrCodeOperationNotFoundException "OperationNotFoundException"
-// The specified ID refers to an operation that doesn't exist.
-//
-// * ErrCodeInvalidOperationException "InvalidOperationException"
-// The specified operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/StopStackSetOperation
-func (c *CloudFormation) StopStackSetOperation(input *StopStackSetOperationInput) (*StopStackSetOperationOutput, error) {
- req, out := c.StopStackSetOperationRequest(input)
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListTypes
+func (c *CloudFormation) ListTypes(input *ListTypesInput) (*ListTypesOutput, error) {
+ req, out := c.ListTypesRequest(input)
return out, req.Send()
}
-// StopStackSetOperationWithContext is the same as StopStackSetOperation with the addition of
+// ListTypesWithContext is the same as ListTypes with the addition of
// the ability to pass a context and additional request options.
//
-// See StopStackSetOperation for details on how to use this API operation.
+// See ListTypes 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) StopStackSetOperationWithContext(ctx aws.Context, input *StopStackSetOperationInput, opts ...request.Option) (*StopStackSetOperationOutput, error) {
- req, out := c.StopStackSetOperationRequest(input)
+func (c *CloudFormation) ListTypesWithContext(ctx aws.Context, input *ListTypesInput, opts ...request.Option) (*ListTypesOutput, error) {
+ req, out := c.ListTypesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
-const opUpdateStack = "UpdateStack"
+// ListTypesPages iterates over the pages of a ListTypes operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See ListTypes 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 ListTypes operation.
+// pageNum := 0
+// err := client.ListTypesPages(params,
+// func(page *cloudformation.ListTypesOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *CloudFormation) ListTypesPages(input *ListTypesInput, fn func(*ListTypesOutput, bool) bool) error {
+ return c.ListTypesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
-// UpdateStackRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateStack operation. The "output" return
+// ListTypesPagesWithContext same as ListTypesPages 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 *CloudFormation) ListTypesPagesWithContext(ctx aws.Context, input *ListTypesInput, fn func(*ListTypesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListTypesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListTypesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*ListTypesOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
+const opRecordHandlerProgress = "RecordHandlerProgress"
+
+// RecordHandlerProgressRequest generates a "aws/request.Request" representing the
+// client's request for the RecordHandlerProgress operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See UpdateStack for more information on using the UpdateStack
+// See RecordHandlerProgress for more information on using the RecordHandlerProgress
// 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 UpdateStackRequest method.
-// req, resp := client.UpdateStackRequest(params)
+// // Example sending a request using the RecordHandlerProgressRequest method.
+// req, resp := client.RecordHandlerProgressRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStack
-func (c *CloudFormation) UpdateStackRequest(input *UpdateStackInput) (req *request.Request, output *UpdateStackOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RecordHandlerProgress
+func (c *CloudFormation) RecordHandlerProgressRequest(input *RecordHandlerProgressInput) (req *request.Request, output *RecordHandlerProgressOutput) {
op := &request.Operation{
- Name: opUpdateStack,
+ Name: opRecordHandlerProgress,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
- input = &UpdateStackInput{}
+ input = &RecordHandlerProgressInput{}
}
- output = &UpdateStackOutput{}
+ output = &RecordHandlerProgressOutput{}
req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
-// UpdateStack API operation for AWS CloudFormation.
-//
-// Updates a stack as specified in the template. After the call completes successfully,
-// the stack update starts. You can check the status of the stack via the DescribeStacks
-// action.
+// RecordHandlerProgress API operation for AWS CloudFormation.
//
-// To get a copy of the template for an existing stack, you can use the GetTemplate
-// action.
+// Reports progress of a resource handler to CloudFormation.
//
-// For more information about creating an update template, updating a stack,
-// and monitoring the progress of the update, see Updating a Stack (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html).
+// Reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+// Do not use this API in your code.
//
// Returns awserr.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 UpdateStack for usage and error information.
+// API operation RecordHandlerProgress for usage and error information.
//
// Returned Error Codes:
-// * ErrCodeInsufficientCapabilitiesException "InsufficientCapabilitiesException"
-// The template contains resources with capabilities that weren't specified
-// in the Capabilities parameter.
+// * ErrCodeInvalidStateTransitionException "InvalidStateTransition"
+// Error reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+// CloudFormation does not return this error to users.
//
-// * ErrCodeTokenAlreadyExistsException "TokenAlreadyExistsException"
-// A client request token already exists.
+// * ErrCodeOperationStatusCheckFailedException "ConditionalCheckFailed"
+// Error reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+// CloudFormation does not return this error to users.
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStack
-func (c *CloudFormation) UpdateStack(input *UpdateStackInput) (*UpdateStackOutput, error) {
- req, out := c.UpdateStackRequest(input)
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RecordHandlerProgress
+func (c *CloudFormation) RecordHandlerProgress(input *RecordHandlerProgressInput) (*RecordHandlerProgressOutput, error) {
+ req, out := c.RecordHandlerProgressRequest(input)
return out, req.Send()
}
-// UpdateStackWithContext is the same as UpdateStack with the addition of
+// RecordHandlerProgressWithContext is the same as RecordHandlerProgress with the addition of
// the ability to pass a context and additional request options.
//
-// See UpdateStack for details on how to use this API operation.
+// See RecordHandlerProgress 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) UpdateStackWithContext(ctx aws.Context, input *UpdateStackInput, opts ...request.Option) (*UpdateStackOutput, error) {
- req, out := c.UpdateStackRequest(input)
+func (c *CloudFormation) RecordHandlerProgressWithContext(ctx aws.Context, input *RecordHandlerProgressInput, opts ...request.Option) (*RecordHandlerProgressOutput, error) {
+ req, out := c.RecordHandlerProgressRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
-const opUpdateStackInstances = "UpdateStackInstances"
+const opRegisterType = "RegisterType"
-// UpdateStackInstancesRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateStackInstances operation. The "output" return
+// RegisterTypeRequest generates a "aws/request.Request" representing the
+// client's request for the RegisterType operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See UpdateStackInstances for more information on using the UpdateStackInstances
+// See RegisterType for more information on using the RegisterType
// 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 UpdateStackInstancesRequest method.
-// req, resp := client.UpdateStackInstancesRequest(params)
+// // Example sending a request using the RegisterTypeRequest method.
+// req, resp := client.RegisterTypeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackInstances
-func (c *CloudFormation) UpdateStackInstancesRequest(input *UpdateStackInstancesInput) (req *request.Request, output *UpdateStackInstancesOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RegisterType
+func (c *CloudFormation) RegisterTypeRequest(input *RegisterTypeInput) (req *request.Request, output *RegisterTypeOutput) {
op := &request.Operation{
- Name: opUpdateStackInstances,
+ Name: opRegisterType,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
- input = &UpdateStackInstancesInput{}
+ input = &RegisterTypeInput{}
}
- output = &UpdateStackInstancesOutput{}
+ output = &RegisterTypeOutput{}
req = c.newRequest(op, input, output)
return
}
-// UpdateStackInstances API operation for AWS CloudFormation.
+// RegisterType API operation for AWS CloudFormation.
//
-// Updates the parameter values for stack instances for the specified accounts,
-// within the specified regions. A stack instance refers to a stack in a specific
-// account and region.
+// Registers a type with the CloudFormation service. Registering a type makes
+// it available for use in CloudFormation templates in your AWS account, and
+// includes:
//
-// You can only update stack instances in regions and accounts where they already
-// exist; to create additional stack instances, use CreateStackInstances (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStackInstances.html).
+// * Validating the resource schema
//
-// During stack set updates, any parameters overridden for a stack instance
-// are not updated, but retain their overridden value.
+// * Determining which handlers have been specified for the resource
//
-// You can only update the parameter values that are specified in the stack
-// set; to add or delete a parameter itself, use UpdateStackSet (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html)
-// to update the stack set template. If you add a parameter to a template, before
-// you can override the parameter value specified in the stack set you must
-// first use UpdateStackSet (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html)
-// to update all stack instances with the updated template and parameter value
-// specified in the stack set. Once a stack instance has been updated with the
-// new parameter, you can then override the parameter value using UpdateStackInstances.
+// * Making the resource type available for use in your account
+//
+// For more information on how to develop types and ready them for registeration,
+// see Creating Resource Providers (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-types.html)
+// in the CloudFormation CLI User Guide.
+//
+// You can have a maximum of 50 resource type versions registered at a time.
+// This maximum is per account and per region. Use DeregisterType (AWSCloudFormation/latest/APIReference/API_DeregisterType.html)
+// to deregister specific resource type versions if necessary.
+//
+// Once you have initiated a registration request using RegisterType , you can
+// use DescribeTypeRegistration to monitor the progress of the registration
+// 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 CloudFormation's
-// API operation UpdateStackInstances for usage and error information.
+// API operation RegisterType for usage and error information.
//
// Returned Error Codes:
-// * ErrCodeStackSetNotFoundException "StackSetNotFoundException"
-// The specified stack set doesn't exist.
-//
-// * ErrCodeStackInstanceNotFoundException "StackInstanceNotFoundException"
-// The specified stack instance doesn't exist.
-//
-// * ErrCodeOperationInProgressException "OperationInProgressException"
-// Another operation is currently in progress for this stack set. Only one operation
-// can be performed for a stack set at a given time.
-//
-// * ErrCodeOperationIdAlreadyExistsException "OperationIdAlreadyExistsException"
-// The specified operation ID already exists.
-//
-// * ErrCodeStaleRequestException "StaleRequestException"
-// Another operation has been performed on this stack set since the specified
-// operation was performed.
-//
-// * ErrCodeInvalidOperationException "InvalidOperationException"
-// The specified operation isn't valid.
+// * ErrCodeCFNRegistryException "CFNRegistryException"
+// An error occurred during a CloudFormation registry operation.
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackInstances
-func (c *CloudFormation) UpdateStackInstances(input *UpdateStackInstancesInput) (*UpdateStackInstancesOutput, error) {
- req, out := c.UpdateStackInstancesRequest(input)
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RegisterType
+func (c *CloudFormation) RegisterType(input *RegisterTypeInput) (*RegisterTypeOutput, error) {
+ req, out := c.RegisterTypeRequest(input)
return out, req.Send()
}
-// UpdateStackInstancesWithContext is the same as UpdateStackInstances with the addition of
+// RegisterTypeWithContext is the same as RegisterType with the addition of
// the ability to pass a context and additional request options.
//
-// See UpdateStackInstances for details on how to use this API operation.
+// See RegisterType 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) UpdateStackInstancesWithContext(ctx aws.Context, input *UpdateStackInstancesInput, opts ...request.Option) (*UpdateStackInstancesOutput, error) {
- req, out := c.UpdateStackInstancesRequest(input)
+func (c *CloudFormation) RegisterTypeWithContext(ctx aws.Context, input *RegisterTypeInput, opts ...request.Option) (*RegisterTypeOutput, error) {
+ req, out := c.RegisterTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
-const opUpdateStackSet = "UpdateStackSet"
+const opSetStackPolicy = "SetStackPolicy"
-// UpdateStackSetRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateStackSet operation. The "output" return
+// SetStackPolicyRequest generates a "aws/request.Request" representing the
+// client's request for the SetStackPolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See UpdateStackSet for more information on using the UpdateStackSet
+// See SetStackPolicy for more information on using the SetStackPolicy
// 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 UpdateStackSetRequest method.
-// req, resp := client.UpdateStackSetRequest(params)
+// // Example sending a request using the SetStackPolicyRequest method.
+// req, resp := client.SetStackPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackSet
-func (c *CloudFormation) UpdateStackSetRequest(input *UpdateStackSetInput) (req *request.Request, output *UpdateStackSetOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SetStackPolicy
+func (c *CloudFormation) SetStackPolicyRequest(input *SetStackPolicyInput) (req *request.Request, output *SetStackPolicyOutput) {
op := &request.Operation{
- Name: opUpdateStackSet,
+ Name: opSetStackPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
- input = &UpdateStackSetInput{}
+ input = &SetStackPolicyInput{}
}
- output = &UpdateStackSetOutput{}
+ output = &SetStackPolicyOutput{}
req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
-// UpdateStackSet API operation for AWS CloudFormation.
-//
-// Updates the stack set, and associated stack instances in the specified accounts
-// and regions.
+// SetStackPolicy API operation for AWS CloudFormation.
//
-// Even if the stack set operation created by updating the stack set fails (completely
-// or partially, below or above a specified failure tolerance), the stack set
-// is updated with your changes. Subsequent CreateStackInstances calls on the
-// specified stack set use the updated stack set.
+// Sets a stack policy for a specified 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 UpdateStackSet for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeStackSetNotFoundException "StackSetNotFoundException"
-// The specified stack set doesn't exist.
-//
-// * ErrCodeOperationInProgressException "OperationInProgressException"
-// Another operation is currently in progress for this stack set. Only one operation
-// can be performed for a stack set at a given time.
-//
-// * ErrCodeOperationIdAlreadyExistsException "OperationIdAlreadyExistsException"
-// The specified operation ID already exists.
-//
-// * ErrCodeStaleRequestException "StaleRequestException"
-// Another operation has been performed on this stack set since the specified
-// operation was performed.
-//
-// * ErrCodeInvalidOperationException "InvalidOperationException"
-// The specified operation isn't valid.
-//
-// * ErrCodeStackInstanceNotFoundException "StackInstanceNotFoundException"
-// The specified stack instance doesn't exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackSet
-func (c *CloudFormation) UpdateStackSet(input *UpdateStackSetInput) (*UpdateStackSetOutput, error) {
- req, out := c.UpdateStackSetRequest(input)
+// API operation SetStackPolicy for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SetStackPolicy
+func (c *CloudFormation) SetStackPolicy(input *SetStackPolicyInput) (*SetStackPolicyOutput, error) {
+ req, out := c.SetStackPolicyRequest(input)
return out, req.Send()
}
-// UpdateStackSetWithContext is the same as UpdateStackSet with the addition of
+// SetStackPolicyWithContext is the same as SetStackPolicy with the addition of
// the ability to pass a context and additional request options.
//
-// See UpdateStackSet for details on how to use this API operation.
+// See SetStackPolicy 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) UpdateStackSetWithContext(ctx aws.Context, input *UpdateStackSetInput, opts ...request.Option) (*UpdateStackSetOutput, error) {
- req, out := c.UpdateStackSetRequest(input)
+func (c *CloudFormation) SetStackPolicyWithContext(ctx aws.Context, input *SetStackPolicyInput, opts ...request.Option) (*SetStackPolicyOutput, error) {
+ req, out := c.SetStackPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
-const opUpdateTerminationProtection = "UpdateTerminationProtection"
+const opSetTypeDefaultVersion = "SetTypeDefaultVersion"
-// UpdateTerminationProtectionRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateTerminationProtection operation. The "output" return
+// SetTypeDefaultVersionRequest generates a "aws/request.Request" representing the
+// client's request for the SetTypeDefaultVersion operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See UpdateTerminationProtection for more information on using the UpdateTerminationProtection
+// See SetTypeDefaultVersion for more information on using the SetTypeDefaultVersion
// 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)
+// // Example sending a request using the SetTypeDefaultVersionRequest method.
+// req, resp := client.SetTypeDefaultVersionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateTerminationProtection
-func (c *CloudFormation) UpdateTerminationProtectionRequest(input *UpdateTerminationProtectionInput) (req *request.Request, output *UpdateTerminationProtectionOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SetTypeDefaultVersion
+func (c *CloudFormation) SetTypeDefaultVersionRequest(input *SetTypeDefaultVersionInput) (req *request.Request, output *SetTypeDefaultVersionOutput) {
op := &request.Operation{
- Name: opUpdateTerminationProtection,
+ Name: opSetTypeDefaultVersion,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
- input = &UpdateTerminationProtectionInput{}
+ input = &SetTypeDefaultVersionInput{}
}
- output = &UpdateTerminationProtectionOutput{}
+ output = &SetTypeDefaultVersionOutput{}
req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
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 (AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html)
-// in the AWS CloudFormation User Guide.
+// SetTypeDefaultVersion API operation for AWS CloudFormation.
//
-// For nested stacks (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.
+// Specify the default version of a type. The default version of a type will
+// be used in CloudFormation operations.
//
// Returns awserr.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.
-// See also, 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)
+// API operation SetTypeDefaultVersion for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeCFNRegistryException "CFNRegistryException"
+// An error occurred during a CloudFormation registry operation.
+//
+// * ErrCodeTypeNotFoundException "TypeNotFoundException"
+// The specified type does not exist in the CloudFormation registry.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SetTypeDefaultVersion
+func (c *CloudFormation) SetTypeDefaultVersion(input *SetTypeDefaultVersionInput) (*SetTypeDefaultVersionOutput, error) {
+ req, out := c.SetTypeDefaultVersionRequest(input)
return out, req.Send()
}
-// UpdateTerminationProtectionWithContext is the same as UpdateTerminationProtection with the addition of
+// SetTypeDefaultVersionWithContext is the same as SetTypeDefaultVersion 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.
+// See SetTypeDefaultVersion 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)
+func (c *CloudFormation) SetTypeDefaultVersionWithContext(ctx aws.Context, input *SetTypeDefaultVersionInput, opts ...request.Option) (*SetTypeDefaultVersionOutput, error) {
+ req, out := c.SetTypeDefaultVersionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
-const opValidateTemplate = "ValidateTemplate"
+const opSignalResource = "SignalResource"
-// ValidateTemplateRequest generates a "aws/request.Request" representing the
-// client's request for the ValidateTemplate operation. The "output" return
+// SignalResourceRequest generates a "aws/request.Request" representing the
+// client's request for the SignalResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See ValidateTemplate for more information on using the ValidateTemplate
+// See SignalResource for more information on using the SignalResource
// 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 ValidateTemplateRequest method.
-// req, resp := client.ValidateTemplateRequest(params)
+// // Example sending a request using the SignalResourceRequest method.
+// req, resp := client.SignalResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ValidateTemplate
-func (c *CloudFormation) ValidateTemplateRequest(input *ValidateTemplateInput) (req *request.Request, output *ValidateTemplateOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SignalResource
+func (c *CloudFormation) SignalResourceRequest(input *SignalResourceInput) (req *request.Request, output *SignalResourceOutput) {
op := &request.Operation{
- Name: opValidateTemplate,
+ Name: opSignalResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
- input = &ValidateTemplateInput{}
+ input = &SignalResourceInput{}
}
- output = &ValidateTemplateOutput{}
+ output = &SignalResourceOutput{}
req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
-// ValidateTemplate API operation for AWS CloudFormation.
+// SignalResource API operation for AWS CloudFormation.
//
-// Validates a specified template. AWS CloudFormation first checks if the template
-// is valid JSON. If it isn't, AWS CloudFormation checks if the template is
-// valid YAML. If both these checks fail, AWS CloudFormation returns a template
-// validation error.
+// Sends a signal to the specified resource with a success or failure status.
+// You can use the SignalResource API in conjunction with a creation policy
+// or update policy. AWS CloudFormation doesn't proceed with a stack creation
+// or update until resources receive the required number of signals or the timeout
+// period is exceeded. The SignalResource API is useful in cases where you want
+// to send signals from anywhere other than an Amazon EC2 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
// the error.
//
// See the AWS API reference guide for AWS CloudFormation's
-// API operation ValidateTemplate for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ValidateTemplate
-func (c *CloudFormation) ValidateTemplate(input *ValidateTemplateInput) (*ValidateTemplateOutput, error) {
- req, out := c.ValidateTemplateRequest(input)
+// API operation SignalResource for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SignalResource
+func (c *CloudFormation) SignalResource(input *SignalResourceInput) (*SignalResourceOutput, error) {
+ req, out := c.SignalResourceRequest(input)
return out, req.Send()
}
-// ValidateTemplateWithContext is the same as ValidateTemplate with the addition of
+// SignalResourceWithContext is the same as SignalResource with the addition of
// the ability to pass a context and additional request options.
//
-// See ValidateTemplate for details on how to use this API operation.
+// See SignalResource 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) ValidateTemplateWithContext(ctx aws.Context, input *ValidateTemplateInput, opts ...request.Option) (*ValidateTemplateOutput, error) {
- req, out := c.ValidateTemplateRequest(input)
+func (c *CloudFormation) SignalResourceWithContext(ctx aws.Context, input *SignalResourceInput, opts ...request.Option) (*SignalResourceOutput, error) {
+ req, out := c.SignalResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
-// Structure that contains the results of the account gate function which AWS
-// CloudFormation invokes, if present, before proceeding with a stack set operation
-// in an account and region.
+const opStopStackSetOperation = "StopStackSetOperation"
+
+// StopStackSetOperationRequest generates a "aws/request.Request" representing the
+// client's request for the StopStackSetOperation operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
//
-// For each account and region, AWS CloudFormation lets you specify a Lamdba
-// function that encapsulates any requirements that must be met before CloudFormation
-// can proceed with a stack set operation in that account and region. CloudFormation
-// invokes the function each time a stack set operation is requested for that
-// account and region; if the function returns FAILED, CloudFormation cancels
-// the operation in that account and region, and sets the stack set operation
-// result status for that account and region to FAILED.
+// 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.
//
-// For more information, see Configuring a target account gate (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-account-gating.html).
-type AccountGateResult struct {
- _ struct{} `type:"structure"`
-
- // The status of the account gate function.
- //
- // * SUCCEEDED: The account gate function has determined that the account
- // and region passes any requirements for a stack set operation to occur.
- // AWS CloudFormation proceeds with the stack operation in that account and
- // region.
- //
- // * FAILED: The account gate function has determined that the account and
- // region does not meet the requirements for a stack set operation to occur.
- // AWS CloudFormation cancels the stack set operation in that account and
- // region, and sets the stack set operation result status for that account
- // and region to FAILED.
- //
- // * SKIPPED: AWS CloudFormation has skipped calling the account gate function
- // for this account and region, for one of the following reasons: An account
- // gate function has not been specified for the account and region. AWS CloudFormation
- // proceeds with the stack set operation in this account and region. The
- // AWSCloudFormationStackSetExecutionRole of the stack set adminstration
- // account lacks permissions to invoke the function. AWS CloudFormation proceeds
- // with the stack set operation in this account and region. Either no action
- // is necessary, or no action is possible, on the stack. AWS CloudFormation
- // skips the stack set operation in this account and region.
- Status *string `type:"string" enum:"AccountGateStatus"`
-
- // The reason for the account gate status assigned to this account and region
- // for the stack set operation.
- StatusReason *string `type:"string"`
-}
+// See StopStackSetOperation for more information on using the StopStackSetOperation
+// 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 StopStackSetOperationRequest method.
+// req, resp := client.StopStackSetOperationRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/StopStackSetOperation
+func (c *CloudFormation) StopStackSetOperationRequest(input *StopStackSetOperationInput) (req *request.Request, output *StopStackSetOperationOutput) {
+ op := &request.Operation{
+ Name: opStopStackSetOperation,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
-// String returns the string representation
-func (s AccountGateResult) String() string {
- return awsutil.Prettify(s)
-}
+ if input == nil {
+ input = &StopStackSetOperationInput{}
+ }
-// GoString returns the string representation
-func (s AccountGateResult) GoString() string {
- return s.String()
+ output = &StopStackSetOperationOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
}
-// SetStatus sets the Status field's value.
-func (s *AccountGateResult) SetStatus(v string) *AccountGateResult {
- s.Status = &v
- return s
+// StopStackSetOperation API operation for AWS CloudFormation.
+//
+// Stops an in-progress operation on a stack set and its associated stack instances.
+//
+// Returns awserr.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 StopStackSetOperation for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeStackSetNotFoundException "StackSetNotFoundException"
+// The specified stack set doesn't exist.
+//
+// * ErrCodeOperationNotFoundException "OperationNotFoundException"
+// The specified ID refers to an operation that doesn't exist.
+//
+// * ErrCodeInvalidOperationException "InvalidOperationException"
+// The specified operation isn't valid.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/StopStackSetOperation
+func (c *CloudFormation) StopStackSetOperation(input *StopStackSetOperationInput) (*StopStackSetOperationOutput, error) {
+ req, out := c.StopStackSetOperationRequest(input)
+ return out, req.Send()
}
-// SetStatusReason sets the StatusReason field's value.
-func (s *AccountGateResult) SetStatusReason(v string) *AccountGateResult {
- s.StatusReason = &v
- return s
+// StopStackSetOperationWithContext is the same as StopStackSetOperation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See StopStackSetOperation 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) StopStackSetOperationWithContext(ctx aws.Context, input *StopStackSetOperationInput, opts ...request.Option) (*StopStackSetOperationOutput, error) {
+ req, out := c.StopStackSetOperationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
-// The AccountLimit data type. For more information about account limits, see
-// AWS CloudFormation Limits (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html)
-// in the AWS CloudFormation User Guide.
-type AccountLimit struct {
- _ struct{} `type:"structure"`
+const opUpdateStack = "UpdateStack"
- // The name of the account limit.
- Name *string `type:"string"`
+// UpdateStackRequest generates a "aws/request.Request" representing the
+// client's request for the UpdateStack operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See UpdateStack for more information on using the UpdateStack
+// 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 UpdateStackRequest method.
+// req, resp := client.UpdateStackRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStack
+func (c *CloudFormation) UpdateStackRequest(input *UpdateStackInput) (req *request.Request, output *UpdateStackOutput) {
+ op := &request.Operation{
+ Name: opUpdateStack,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
- // The value that is associated with the account limit name.
- Value *int64 `type:"integer"`
-}
+ if input == nil {
+ input = &UpdateStackInput{}
+ }
-// String returns the string representation
-func (s AccountLimit) String() string {
- return awsutil.Prettify(s)
+ output = &UpdateStackOutput{}
+ req = c.newRequest(op, input, output)
+ return
}
-// GoString returns the string representation
-func (s AccountLimit) GoString() string {
- return s.String()
+// UpdateStack API operation for AWS CloudFormation.
+//
+// Updates a stack as specified in the template. After the call completes successfully,
+// the stack update starts. You can check the status of the stack via the DescribeStacks
+// action.
+//
+// To get a copy of the template for an existing stack, you can use the GetTemplate
+// action.
+//
+// For more information about creating an update template, updating a stack,
+// and monitoring the progress of the update, see Updating a Stack (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.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 CloudFormation's
+// API operation UpdateStack for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeInsufficientCapabilitiesException "InsufficientCapabilitiesException"
+// The template contains resources with capabilities that weren't specified
+// in the Capabilities parameter.
+//
+// * ErrCodeTokenAlreadyExistsException "TokenAlreadyExistsException"
+// A client request token already exists.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStack
+func (c *CloudFormation) UpdateStack(input *UpdateStackInput) (*UpdateStackOutput, error) {
+ req, out := c.UpdateStackRequest(input)
+ return out, req.Send()
}
-// SetName sets the Name field's value.
-func (s *AccountLimit) SetName(v string) *AccountLimit {
- s.Name = &v
- return s
+// UpdateStackWithContext is the same as UpdateStack with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UpdateStack 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) UpdateStackWithContext(ctx aws.Context, input *UpdateStackInput, opts ...request.Option) (*UpdateStackOutput, error) {
+ req, out := c.UpdateStackRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
-// SetValue sets the Value field's value.
-func (s *AccountLimit) SetValue(v int64) *AccountLimit {
- s.Value = &v
- return s
-}
+const opUpdateStackInstances = "UpdateStackInstances"
+
+// UpdateStackInstancesRequest generates a "aws/request.Request" representing the
+// client's request for the UpdateStackInstances operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See UpdateStackInstances for more information on using the UpdateStackInstances
+// 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 UpdateStackInstancesRequest method.
+// req, resp := client.UpdateStackInstancesRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackInstances
+func (c *CloudFormation) UpdateStackInstancesRequest(input *UpdateStackInstancesInput) (req *request.Request, output *UpdateStackInstancesOutput) {
+ op := &request.Operation{
+ Name: opUpdateStackInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &UpdateStackInstancesInput{}
+ }
+
+ output = &UpdateStackInstancesOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// UpdateStackInstances API operation for AWS CloudFormation.
+//
+// Updates the parameter values for stack instances for the specified accounts,
+// within the specified Regions. A stack instance refers to a stack in a specific
+// account and Region.
+//
+// You can only update stack instances in Regions and accounts where they already
+// exist; to create additional stack instances, use CreateStackInstances (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStackInstances.html).
+//
+// During stack set updates, any parameters overridden for a stack instance
+// are not updated, but retain their overridden value.
+//
+// You can only update the parameter values that are specified in the stack
+// set; to add or delete a parameter itself, use UpdateStackSet (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html)
+// to update the stack set template. If you add a parameter to a template, before
+// you can override the parameter value specified in the stack set you must
+// first use UpdateStackSet (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html)
+// to update all stack instances with the updated template and parameter value
+// specified in the stack set. Once a stack instance has been updated with the
+// new parameter, you can then override the parameter value using UpdateStackInstances.
+//
+// Returns awserr.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 UpdateStackInstances for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeStackSetNotFoundException "StackSetNotFoundException"
+// The specified stack set doesn't exist.
+//
+// * ErrCodeStackInstanceNotFoundException "StackInstanceNotFoundException"
+// The specified stack instance doesn't exist.
+//
+// * ErrCodeOperationInProgressException "OperationInProgressException"
+// Another operation is currently in progress for this stack set. Only one operation
+// can be performed for a stack set at a given time.
+//
+// * ErrCodeOperationIdAlreadyExistsException "OperationIdAlreadyExistsException"
+// The specified operation ID already exists.
+//
+// * ErrCodeStaleRequestException "StaleRequestException"
+// Another operation has been performed on this stack set since the specified
+// operation was performed.
+//
+// * ErrCodeInvalidOperationException "InvalidOperationException"
+// The specified operation isn't valid.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackInstances
+func (c *CloudFormation) UpdateStackInstances(input *UpdateStackInstancesInput) (*UpdateStackInstancesOutput, error) {
+ req, out := c.UpdateStackInstancesRequest(input)
+ return out, req.Send()
+}
+
+// UpdateStackInstancesWithContext is the same as UpdateStackInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UpdateStackInstances 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) UpdateStackInstancesWithContext(ctx aws.Context, input *UpdateStackInstancesInput, opts ...request.Option) (*UpdateStackInstancesOutput, error) {
+ req, out := c.UpdateStackInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opUpdateStackSet = "UpdateStackSet"
+
+// UpdateStackSetRequest generates a "aws/request.Request" representing the
+// client's request for the UpdateStackSet operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See UpdateStackSet for more information on using the UpdateStackSet
+// 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 UpdateStackSetRequest method.
+// req, resp := client.UpdateStackSetRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackSet
+func (c *CloudFormation) UpdateStackSetRequest(input *UpdateStackSetInput) (req *request.Request, output *UpdateStackSetOutput) {
+ op := &request.Operation{
+ Name: opUpdateStackSet,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &UpdateStackSetInput{}
+ }
+
+ output = &UpdateStackSetOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// UpdateStackSet API operation for AWS CloudFormation.
+//
+// Updates the stack set, and associated stack instances in the specified accounts
+// and Regions.
+//
+// Even if the stack set operation created by updating the stack set fails (completely
+// or partially, below or above a specified failure tolerance), the stack set
+// is updated with your changes. Subsequent CreateStackInstances calls on the
+// specified stack set use the updated stack set.
+//
+// Returns awserr.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 UpdateStackSet for usage and error information.
+//
+// Returned Error Codes:
+// * ErrCodeStackSetNotFoundException "StackSetNotFoundException"
+// The specified stack set doesn't exist.
+//
+// * ErrCodeOperationInProgressException "OperationInProgressException"
+// Another operation is currently in progress for this stack set. Only one operation
+// can be performed for a stack set at a given time.
+//
+// * ErrCodeOperationIdAlreadyExistsException "OperationIdAlreadyExistsException"
+// The specified operation ID already exists.
+//
+// * ErrCodeStaleRequestException "StaleRequestException"
+// Another operation has been performed on this stack set since the specified
+// operation was performed.
+//
+// * ErrCodeInvalidOperationException "InvalidOperationException"
+// The specified operation isn't valid.
+//
+// * ErrCodeStackInstanceNotFoundException "StackInstanceNotFoundException"
+// The specified stack instance doesn't exist.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackSet
+func (c *CloudFormation) UpdateStackSet(input *UpdateStackSetInput) (*UpdateStackSetOutput, error) {
+ req, out := c.UpdateStackSetRequest(input)
+ return out, req.Send()
+}
+
+// UpdateStackSetWithContext is the same as UpdateStackSet with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UpdateStackSet 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) UpdateStackSetWithContext(ctx aws.Context, input *UpdateStackSetInput, opts ...request.Option) (*UpdateStackSetOutput, error) {
+ req, out := c.UpdateStackSetRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ 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 completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// 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)
+// }
+//
+// See also, 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 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html)
+// in the AWS CloudFormation User Guide.
+//
+// For nested stacks (https://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.
+// See also, 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
+// client's request for the ValidateTemplate operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ValidateTemplate for more information on using the ValidateTemplate
+// 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 ValidateTemplateRequest method.
+// req, resp := client.ValidateTemplateRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ValidateTemplate
+func (c *CloudFormation) ValidateTemplateRequest(input *ValidateTemplateInput) (req *request.Request, output *ValidateTemplateOutput) {
+ op := &request.Operation{
+ Name: opValidateTemplate,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ValidateTemplateInput{}
+ }
+
+ output = &ValidateTemplateOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// ValidateTemplate API operation for AWS CloudFormation.
+//
+// Validates a specified template. AWS CloudFormation first checks if the template
+// is valid JSON. If it isn't, AWS CloudFormation checks if the template is
+// valid YAML. If both these checks fail, AWS CloudFormation returns a template
+// validation 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 AWS CloudFormation's
+// API operation ValidateTemplate for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ValidateTemplate
+func (c *CloudFormation) ValidateTemplate(input *ValidateTemplateInput) (*ValidateTemplateOutput, error) {
+ req, out := c.ValidateTemplateRequest(input)
+ return out, req.Send()
+}
+
+// ValidateTemplateWithContext is the same as ValidateTemplate with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ValidateTemplate 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) ValidateTemplateWithContext(ctx aws.Context, input *ValidateTemplateInput, opts ...request.Option) (*ValidateTemplateOutput, error) {
+ req, out := c.ValidateTemplateRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+// Structure that contains the results of the account gate function which AWS
+// CloudFormation invokes, if present, before proceeding with a stack set operation
+// in an account and Region.
+//
+// For each account and Region, AWS CloudFormation lets you specify a Lamdba
+// function that encapsulates any requirements that must be met before CloudFormation
+// can proceed with a stack set operation in that account and Region. CloudFormation
+// invokes the function each time a stack set operation is requested for that
+// account and Region; if the function returns FAILED, CloudFormation cancels
+// the operation in that account and Region, and sets the stack set operation
+// result status for that account and Region to FAILED.
+//
+// For more information, see Configuring a target account gate (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-account-gating.html).
+type AccountGateResult struct {
+ _ struct{} `type:"structure"`
+
+ // The status of the account gate function.
+ //
+ // * SUCCEEDED: The account gate function has determined that the account
+ // and Region passes any requirements for a stack set operation to occur.
+ // AWS CloudFormation proceeds with the stack operation in that account and
+ // Region.
+ //
+ // * FAILED: The account gate function has determined that the account and
+ // Region does not meet the requirements for a stack set operation to occur.
+ // AWS CloudFormation cancels the stack set operation in that account and
+ // Region, and sets the stack set operation result status for that account
+ // and Region to FAILED.
+ //
+ // * SKIPPED: AWS CloudFormation has skipped calling the account gate function
+ // for this account and Region, for one of the following reasons: An account
+ // gate function has not been specified for the account and Region. AWS CloudFormation
+ // proceeds with the stack set operation in this account and Region. The
+ // AWSCloudFormationStackSetExecutionRole of the stack set adminstration
+ // account lacks permissions to invoke the function. AWS CloudFormation proceeds
+ // with the stack set operation in this account and Region. Either no action
+ // is necessary, or no action is possible, on the stack. AWS CloudFormation
+ // skips the stack set operation in this account and Region.
+ Status *string `type:"string" enum:"AccountGateStatus"`
+
+ // The reason for the account gate status assigned to this account and Region
+ // for the stack set operation.
+ StatusReason *string `type:"string"`
+}
+
+// String returns the string representation
+func (s AccountGateResult) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccountGateResult) GoString() string {
+ return s.String()
+}
+
+// SetStatus sets the Status field's value.
+func (s *AccountGateResult) SetStatus(v string) *AccountGateResult {
+ s.Status = &v
+ return s
+}
+
+// SetStatusReason sets the StatusReason field's value.
+func (s *AccountGateResult) SetStatusReason(v string) *AccountGateResult {
+ s.StatusReason = &v
+ return s
+}
+
+// The AccountLimit data type.
+//
+// CloudFormation has the following limits per account:
+//
+// * Number of concurrent resources
+//
+// * Number of stacks
+//
+// * Number of stack outputs
+//
+// For more information about these account limits, and other CloudFormation
+// limits, see AWS CloudFormation Limits (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html)
+// in the AWS CloudFormation User Guide.
+type AccountLimit struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the account limit.
+ //
+ // Values: ConcurrentResourcesLimit | StackLimit | StackOutputsLimit
+ Name *string `type:"string"`
+
+ // The value that is associated with the account limit name.
+ Value *int64 `type:"integer"`
+}
+
+// String returns the string representation
+func (s AccountLimit) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccountLimit) GoString() string {
+ return s.String()
+}
+
+// SetName sets the Name field's value.
+func (s *AccountLimit) SetName(v string) *AccountLimit {
+ s.Name = &v
+ return s
+}
+
+// SetValue sets the Value field's value.
+func (s *AccountLimit) SetValue(v int64) *AccountLimit {
+ s.Value = &v
+ return s
+}
+
+// [Service-managed permissions] Describes whether StackSets automatically deploys
+// to AWS Organizations accounts that are added to a target organization or
+// organizational unit (OU).
+type AutoDeployment struct {
+ _ struct{} `type:"structure"`
+
+ // If set to true, StackSets automatically deploys additional stack instances
+ // to AWS Organizations accounts that are added to a target organization or
+ // organizational unit (OU) in the specified Regions. If an account is removed
+ // from a target organization or OU, StackSets deletes stack instances from
+ // the account in the specified Regions.
+ Enabled *bool `type:"boolean"`
+
+ // If set to true, stack resources are retained when an account is removed from
+ // a target organization or OU. If set to false, stack resources are deleted.
+ // Specify only if Enabled is set to True.
+ RetainStacksOnAccountRemoval *bool `type:"boolean"`
+}
+
+// String returns the string representation
+func (s AutoDeployment) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AutoDeployment) GoString() string {
+ return s.String()
+}
+
+// SetEnabled sets the Enabled field's value.
+func (s *AutoDeployment) SetEnabled(v bool) *AutoDeployment {
+ s.Enabled = &v
+ return s
+}
+
+// SetRetainStacksOnAccountRemoval sets the RetainStacksOnAccountRemoval field's value.
+func (s *AutoDeployment) SetRetainStacksOnAccountRemoval(v bool) *AutoDeployment {
+ s.RetainStacksOnAccountRemoval = &v
+ return s
+}
// The input for the CancelUpdateStack action.
type CancelUpdateStackInput struct {
_ struct{} `type:"structure"`
- // A unique identifier for this CancelUpdateStack request. Specify this token
- // if you plan to retry requests so that AWS CloudFormation knows that you're
- // not attempting to cancel an update on a stack with the same name. You might
- // retry CancelUpdateStack requests to ensure that AWS CloudFormation successfully
- // received them.
- ClientRequestToken *string `min:"1" type:"string"`
+ // A unique identifier for this CancelUpdateStack request. Specify this token
+ // if you plan to retry requests so that AWS CloudFormation knows that you're
+ // not attempting to cancel an update on a stack with the same name. You might
+ // retry CancelUpdateStack requests to ensure that AWS CloudFormation successfully
+ // received them.
+ ClientRequestToken *string `min:"1" type:"string"`
+
+ // The name or the unique stack ID that is associated with the stack.
+ //
+ // StackName is a required field
+ StackName *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s CancelUpdateStackInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelUpdateStackInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CancelUpdateStackInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CancelUpdateStackInput"}
+ if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
+ }
+ if s.StackName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackName"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientRequestToken sets the ClientRequestToken field's value.
+func (s *CancelUpdateStackInput) SetClientRequestToken(v string) *CancelUpdateStackInput {
+ s.ClientRequestToken = &v
+ return s
+}
+
+// SetStackName sets the StackName field's value.
+func (s *CancelUpdateStackInput) SetStackName(v string) *CancelUpdateStackInput {
+ s.StackName = &v
+ return s
+}
+
+type CancelUpdateStackOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelUpdateStackOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelUpdateStackOutput) GoString() string {
+ return s.String()
+}
+
+// The Change structure describes the changes AWS CloudFormation will perform
+// if you execute the change set.
+type Change struct {
+ _ struct{} `type:"structure"`
+
+ // A ResourceChange structure that describes the resource and action that AWS
+ // CloudFormation will perform.
+ ResourceChange *ResourceChange `type:"structure"`
+
+ // The type of entity that AWS CloudFormation changes. Currently, the only entity
+ // type is Resource.
+ Type *string `type:"string" enum:"ChangeType"`
+}
+
+// String returns the string representation
+func (s Change) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Change) GoString() string {
+ return s.String()
+}
+
+// SetResourceChange sets the ResourceChange field's value.
+func (s *Change) SetResourceChange(v *ResourceChange) *Change {
+ s.ResourceChange = v
+ return s
+}
+
+// SetType sets the Type field's value.
+func (s *Change) SetType(v string) *Change {
+ s.Type = &v
+ return s
+}
+
+// The ChangeSetSummary structure describes a change set, its status, and the
+// stack with which it's associated.
+type ChangeSetSummary struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the change set.
+ ChangeSetId *string `min:"1" type:"string"`
+
+ // The name of the change set.
+ ChangeSetName *string `min:"1" type:"string"`
+
+ // The start time when the change set was created, in UTC.
+ CreationTime *time.Time `type:"timestamp"`
+
+ // Descriptive information about the change set.
+ Description *string `min:"1" type:"string"`
+
+ // If the change set execution status is AVAILABLE, you can execute the change
+ // set. If you can’t execute the change set, the status indicates why. For
+ // example, a change set might be in an UNAVAILABLE state because AWS CloudFormation
+ // is still creating it or in an OBSOLETE state because the stack was already
+ // updated.
+ ExecutionStatus *string `type:"string" enum:"ExecutionStatus"`
+
+ // The ID of the stack with which the change set is associated.
+ StackId *string `type:"string"`
+
+ // The name of the stack with which the change set is associated.
+ StackName *string `type:"string"`
+
+ // The state of the change set, such as CREATE_IN_PROGRESS, CREATE_COMPLETE,
+ // or FAILED.
+ Status *string `type:"string" enum:"ChangeSetStatus"`
+
+ // A description of the change set's status. For example, if your change set
+ // is in the FAILED state, AWS CloudFormation shows the error message.
+ StatusReason *string `type:"string"`
+}
+
+// String returns the string representation
+func (s ChangeSetSummary) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ChangeSetSummary) GoString() string {
+ return s.String()
+}
+
+// SetChangeSetId sets the ChangeSetId field's value.
+func (s *ChangeSetSummary) SetChangeSetId(v string) *ChangeSetSummary {
+ s.ChangeSetId = &v
+ return s
+}
+
+// SetChangeSetName sets the ChangeSetName field's value.
+func (s *ChangeSetSummary) SetChangeSetName(v string) *ChangeSetSummary {
+ s.ChangeSetName = &v
+ return s
+}
+
+// SetCreationTime sets the CreationTime field's value.
+func (s *ChangeSetSummary) SetCreationTime(v time.Time) *ChangeSetSummary {
+ s.CreationTime = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *ChangeSetSummary) SetDescription(v string) *ChangeSetSummary {
+ s.Description = &v
+ return s
+}
+
+// SetExecutionStatus sets the ExecutionStatus field's value.
+func (s *ChangeSetSummary) SetExecutionStatus(v string) *ChangeSetSummary {
+ s.ExecutionStatus = &v
+ return s
+}
+
+// SetStackId sets the StackId field's value.
+func (s *ChangeSetSummary) SetStackId(v string) *ChangeSetSummary {
+ s.StackId = &v
+ return s
+}
+
+// SetStackName sets the StackName field's value.
+func (s *ChangeSetSummary) SetStackName(v string) *ChangeSetSummary {
+ s.StackName = &v
+ return s
+}
+
+// SetStatus sets the Status field's value.
+func (s *ChangeSetSummary) SetStatus(v string) *ChangeSetSummary {
+ s.Status = &v
+ return s
+}
+
+// SetStatusReason sets the StatusReason field's value.
+func (s *ChangeSetSummary) SetStatusReason(v string) *ChangeSetSummary {
+ s.StatusReason = &v
+ return s
+}
+
+// The input for the ContinueUpdateRollback action.
+type ContinueUpdateRollbackInput struct {
+ _ struct{} `type:"structure"`
+
+ // A unique identifier for this ContinueUpdateRollback request. Specify this
+ // token if you plan to retry requests so that AWS CloudFormation knows that
+ // you're not attempting to continue the rollback to a stack with the same name.
+ // You might retry ContinueUpdateRollback requests to ensure that AWS CloudFormation
+ // successfully received them.
+ ClientRequestToken *string `min:"1" type:"string"`
+
+ // A list of the logical IDs of the resources that AWS CloudFormation skips
+ // during the continue update rollback operation. You can specify only resources
+ // that are in the UPDATE_FAILED state because a rollback failed. You can't
+ // specify resources that are in the UPDATE_FAILED state for other reasons,
+ // for example, because an update was cancelled. To check why a resource update
+ // failed, use the DescribeStackResources action, and view the resource status
+ // reason.
+ //
+ // Specify this property to skip rolling back resources that AWS CloudFormation
+ // can't successfully roll back. We recommend that you troubleshoot (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html#troubleshooting-errors-update-rollback-failed)
+ // resources before skipping them. AWS CloudFormation sets the status of the
+ // specified resources to UPDATE_COMPLETE and continues to roll back the stack.
+ // After the rollback is complete, the state of the skipped resources will be
+ // inconsistent with the state of the resources in the stack template. Before
+ // performing another stack update, you must update the stack or resources to
+ // be consistent with each other. If you don't, subsequent stack updates might
+ // fail, and the stack will become unrecoverable.
+ //
+ // Specify the minimum number of resources required to successfully roll back
+ // your stack. For example, a failed resource update might cause dependent resources
+ // to fail. In this case, it might not be necessary to skip the dependent resources.
+ //
+ // To skip resources that are part of nested stacks, use the following format:
+ // NestedStackName.ResourceLogicalID. If you want to specify the logical ID
+ // of a stack resource (Type: AWS::CloudFormation::Stack) in the ResourcesToSkip
+ // list, then its corresponding embedded stack must be in one of the following
+ // states: DELETE_IN_PROGRESS, DELETE_COMPLETE, or DELETE_FAILED.
+ //
+ // Don't confuse a child stack's name with its corresponding logical ID defined
+ // in the parent stack. For an example of a continue update rollback operation
+ // with nested stacks, see Using ResourcesToSkip to recover a nested stacks
+ // hierarchy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html#nested-stacks).
+ ResourcesToSkip []*string `type:"list"`
+
+ // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM)
+ // role that AWS CloudFormation assumes to roll back the stack. AWS CloudFormation
+ // uses the role's credentials to make calls on your behalf. AWS CloudFormation
+ // always uses this role for all future operations on the stack. As long as
+ // users have permission to operate on the stack, AWS CloudFormation uses this
+ // role even if the users don't have permission to pass it. Ensure that the
+ // role grants least privilege.
+ //
+ // If you don't specify a value, AWS CloudFormation uses the role that was previously
+ // associated with the stack. If no role is available, AWS CloudFormation uses
+ // a temporary session that is generated from your user credentials.
+ RoleARN *string `min:"20" type:"string"`
+
+ // The name or the unique ID of the stack that you want to continue rolling
+ // back.
+ //
+ // Don't specify the name of a nested stack (a stack that was created by using
+ // the AWS::CloudFormation::Stack resource). Instead, use this operation on
+ // the parent stack (the stack that contains the AWS::CloudFormation::Stack
+ // resource).
+ //
+ // StackName is a required field
+ StackName *string `min:"1" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ContinueUpdateRollbackInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ContinueUpdateRollbackInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ContinueUpdateRollbackInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ContinueUpdateRollbackInput"}
+ if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
+ }
+ if s.RoleARN != nil && len(*s.RoleARN) < 20 {
+ invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20))
+ }
+ 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
+}
+
+// SetClientRequestToken sets the ClientRequestToken field's value.
+func (s *ContinueUpdateRollbackInput) SetClientRequestToken(v string) *ContinueUpdateRollbackInput {
+ s.ClientRequestToken = &v
+ return s
+}
+
+// SetResourcesToSkip sets the ResourcesToSkip field's value.
+func (s *ContinueUpdateRollbackInput) SetResourcesToSkip(v []*string) *ContinueUpdateRollbackInput {
+ s.ResourcesToSkip = v
+ return s
+}
+
+// SetRoleARN sets the RoleARN field's value.
+func (s *ContinueUpdateRollbackInput) SetRoleARN(v string) *ContinueUpdateRollbackInput {
+ s.RoleARN = &v
+ return s
+}
+
+// SetStackName sets the StackName field's value.
+func (s *ContinueUpdateRollbackInput) SetStackName(v string) *ContinueUpdateRollbackInput {
+ s.StackName = &v
+ return s
+}
+
+// The output for a ContinueUpdateRollback action.
+type ContinueUpdateRollbackOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s ContinueUpdateRollbackOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ContinueUpdateRollbackOutput) GoString() string {
+ return s.String()
+}
+
+// The input for the CreateChangeSet action.
+type CreateChangeSetInput struct {
+ _ struct{} `type:"structure"`
+
+ // In some cases, you must explicitly acknowledge that your stack template contains
+ // certain capabilities in order for AWS CloudFormation to create the stack.
+ //
+ // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM Some stack templates might include
+ // resources that can affect permissions in your AWS account; for example,
+ // by creating new AWS Identity and Access Management (IAM) users. For those
+ // stacks, you must explicitly acknowledge this by specifying one of these
+ // capabilities. The following IAM resources require you to specify either
+ // the CAPABILITY_IAM or CAPABILITY_NAMED_IAM capability. If you have IAM
+ // resources, you can specify either capability. If you have IAM resources
+ // with custom names, you must specify CAPABILITY_NAMED_IAM. If you don't
+ // specify either of these capabilities, AWS CloudFormation returns an InsufficientCapabilities
+ // error. If your stack template contains these resources, we recommend that
+ // you review all permissions associated with them and edit their permissions
+ // if necessary. AWS::IAM::AccessKey (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html)
+ // AWS::IAM::Group (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html)
+ // AWS::IAM::InstanceProfile (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html)
+ // AWS::IAM::Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html)
+ // AWS::IAM::Role (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)
+ // AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html)
+ // AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html)
+ // For more information, see Acknowledging IAM Resources in AWS CloudFormation
+ // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities).
+ //
+ // * CAPABILITY_AUTO_EXPAND Some template contain macros. Macros perform
+ // custom processing on templates; this can include simple actions like find-and-replace
+ // operations, all the way to extensive transformations of entire templates.
+ // Because of this, users typically create a change set from the processed
+ // template, so that they can review the changes resulting from the macros
+ // before actually creating the stack. If your stack template contains one
+ // or more macros, and you choose to create a stack directly from the processed
+ // template, without first reviewing the resulting changes in a change set,
+ // you must acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html)
+ // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html)
+ // transforms, which are macros hosted by AWS CloudFormation. This capacity
+ // does not apply to creating change sets, and specifying it when creating
+ // change sets has no effect. Also, change sets do not currently support
+ // nested stacks. If you want to create a stack from a stack template that
+ // contains macros and nested stacks, you must create or update the stack
+ // directly from the template using the CreateStack or UpdateStack action,
+ // and specifying this capability. For more information on macros, see Using
+ // AWS CloudFormation Macros to Perform Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html).
+ Capabilities []*string `type:"list"`
+
+ // The name of the change set. The name must be unique among all change sets
+ // that are associated with the specified stack.
+ //
+ // A change set name can contain only alphanumeric, case sensitive characters
+ // and hyphens. It must start with an alphabetic character and cannot exceed
+ // 128 characters.
+ //
+ // ChangeSetName is a required field
+ ChangeSetName *string `min:"1" type:"string" required:"true"`
+
+ // The type of change set operation. To create a change set for a new stack,
+ // specify CREATE. To create a change set for an existing stack, specify UPDATE.
+ // To create a change set for an import operation, specify IMPORT.
+ //
+ // If you create a change set for a new stack, AWS Cloudformation creates a
+ // stack with a unique stack ID, but no template or resources. The stack will
+ // be in the REVIEW_IN_PROGRESS (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html#d0e11995)
+ // state until you execute the change set.
+ //
+ // By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE
+ // type to create a change set for a new stack or the CREATE type to create
+ // a change set for an existing stack.
+ ChangeSetType *string `type:"string" enum:"ChangeSetType"`
+
+ // A unique identifier for this CreateChangeSet request. Specify this token
+ // if you plan to retry requests so that AWS CloudFormation knows that you're
+ // not attempting to create another change set with the same name. You might
+ // retry CreateChangeSet requests to ensure that AWS CloudFormation successfully
+ // received them.
+ ClientToken *string `min:"1" type:"string"`
+
+ // A description to help you identify this change set.
+ Description *string `min:"1" type:"string"`
+
+ // The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon
+ // SNS) topics that AWS CloudFormation associates with the stack. To remove
+ // all associated notification topics, specify an empty list.
+ NotificationARNs []*string `type:"list"`
+
+ // A list of Parameter structures that specify input parameters for the change
+ // set. For more information, see the Parameter data type.
+ Parameters []*Parameter `type:"list"`
+
+ // The template resource types that you have permissions to work with if you
+ // execute this change set, such as AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance.
+ //
+ // If the list of resource types doesn't include a resource type that you're
+ // updating, the stack update fails. By default, AWS CloudFormation grants permissions
+ // to all resource types. AWS Identity and Access Management (IAM) uses this
+ // parameter for condition keys in IAM policies for AWS CloudFormation. For
+ // more information, see Controlling Access with AWS Identity and Access Management
+ // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html)
+ // in the AWS CloudFormation User Guide.
+ ResourceTypes []*string `type:"list"`
+
+ // The resources to import into your stack.
+ ResourcesToImport []*ResourceToImport `type:"list"`
+
+ // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM)
+ // role that AWS CloudFormation assumes when executing the change set. AWS CloudFormation
+ // uses the role's credentials to make calls on your behalf. AWS CloudFormation
+ // uses this role for all future operations on the stack. As long as users have
+ // permission to operate on the stack, AWS CloudFormation uses this role even
+ // if the users don't have permission to pass it. Ensure that the role grants
+ // least privilege.
+ //
+ // If you don't specify a value, AWS CloudFormation uses the role that was previously
+ // associated with the stack. If no role is available, AWS CloudFormation uses
+ // a temporary session that is generated from your user credentials.
+ RoleARN *string `min:"20" type:"string"`
+
+ // The rollback triggers for AWS CloudFormation to monitor during stack creation
+ // and updating operations, and for the specified monitoring period afterwards.
+ RollbackConfiguration *RollbackConfiguration `type:"structure"`
+
+ // The name or the unique ID of the stack for which you are creating a change
+ // set. AWS CloudFormation generates the change set by comparing this stack's
+ // information with the information that you submit, such as a modified template
+ // or different parameter input values.
+ //
+ // StackName is a required field
+ StackName *string `min:"1" type:"string" required:"true"`
+
+ // Key-value pairs to associate with this stack. AWS CloudFormation also propagates
+ // these tags to resources in the stack. You can specify a maximum of 50 tags.
+ Tags []*Tag `type:"list"`
+
+ // A structure that contains the body of the revised template, with a minimum
+ // length of 1 byte and a maximum length of 51,200 bytes. AWS CloudFormation
+ // generates the change set by comparing this template with the template of
+ // the stack that you specified.
+ //
+ // Conditional: You must specify only TemplateBody or TemplateURL.
+ TemplateBody *string `min:"1" type:"string"`
+
+ // The location of the file that contains the revised template. The URL must
+ // point to a template (max size: 460,800 bytes) that is located in an S3 bucket.
+ // AWS CloudFormation generates the change set by comparing this template with
+ // the stack that you specified.
+ //
+ // Conditional: You must specify only TemplateBody or TemplateURL.
+ TemplateURL *string `min:"1" type:"string"`
+
+ // Whether to reuse the template that is associated with the stack to create
+ // the change set.
+ UsePreviousTemplate *bool `type:"boolean"`
+}
+
+// String returns the string representation
+func (s CreateChangeSetInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateChangeSetInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateChangeSetInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateChangeSetInput"}
+ if s.ChangeSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("ChangeSetName"))
+ }
+ if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
+ }
+ if s.ClientToken != nil && len(*s.ClientToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1))
+ }
+ if s.Description != nil && len(*s.Description) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Description", 1))
+ }
+ if s.RoleARN != nil && len(*s.RoleARN) < 20 {
+ invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20))
+ }
+ if s.StackName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackName"))
+ }
+ if s.StackName != nil && len(*s.StackName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
+ }
+ if s.TemplateBody != nil && len(*s.TemplateBody) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1))
+ }
+ if s.TemplateURL != nil && len(*s.TemplateURL) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1))
+ }
+ if s.ResourcesToImport != nil {
+ for i, v := range s.ResourcesToImport {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourcesToImport", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.RollbackConfiguration != nil {
+ if err := s.RollbackConfiguration.Validate(); err != nil {
+ invalidParams.AddNested("RollbackConfiguration", 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
+}
+
+// SetCapabilities sets the Capabilities field's value.
+func (s *CreateChangeSetInput) SetCapabilities(v []*string) *CreateChangeSetInput {
+ s.Capabilities = v
+ return s
+}
+
+// SetChangeSetName sets the ChangeSetName field's value.
+func (s *CreateChangeSetInput) SetChangeSetName(v string) *CreateChangeSetInput {
+ s.ChangeSetName = &v
+ return s
+}
+
+// SetChangeSetType sets the ChangeSetType field's value.
+func (s *CreateChangeSetInput) SetChangeSetType(v string) *CreateChangeSetInput {
+ s.ChangeSetType = &v
+ return s
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateChangeSetInput) SetClientToken(v string) *CreateChangeSetInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *CreateChangeSetInput) SetDescription(v string) *CreateChangeSetInput {
+ s.Description = &v
+ return s
+}
+
+// SetNotificationARNs sets the NotificationARNs field's value.
+func (s *CreateChangeSetInput) SetNotificationARNs(v []*string) *CreateChangeSetInput {
+ s.NotificationARNs = v
+ return s
+}
+
+// SetParameters sets the Parameters field's value.
+func (s *CreateChangeSetInput) SetParameters(v []*Parameter) *CreateChangeSetInput {
+ s.Parameters = v
+ return s
+}
+
+// SetResourceTypes sets the ResourceTypes field's value.
+func (s *CreateChangeSetInput) SetResourceTypes(v []*string) *CreateChangeSetInput {
+ s.ResourceTypes = v
+ return s
+}
+
+// SetResourcesToImport sets the ResourcesToImport field's value.
+func (s *CreateChangeSetInput) SetResourcesToImport(v []*ResourceToImport) *CreateChangeSetInput {
+ s.ResourcesToImport = v
+ return s
+}
+
+// SetRoleARN sets the RoleARN field's value.
+func (s *CreateChangeSetInput) SetRoleARN(v string) *CreateChangeSetInput {
+ s.RoleARN = &v
+ return s
+}
+
+// SetRollbackConfiguration sets the RollbackConfiguration field's value.
+func (s *CreateChangeSetInput) SetRollbackConfiguration(v *RollbackConfiguration) *CreateChangeSetInput {
+ s.RollbackConfiguration = v
+ return s
+}
+
+// SetStackName sets the StackName field's value.
+func (s *CreateChangeSetInput) SetStackName(v string) *CreateChangeSetInput {
+ s.StackName = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *CreateChangeSetInput) SetTags(v []*Tag) *CreateChangeSetInput {
+ s.Tags = v
+ return s
+}
+
+// SetTemplateBody sets the TemplateBody field's value.
+func (s *CreateChangeSetInput) SetTemplateBody(v string) *CreateChangeSetInput {
+ s.TemplateBody = &v
+ return s
+}
+
+// SetTemplateURL sets the TemplateURL field's value.
+func (s *CreateChangeSetInput) SetTemplateURL(v string) *CreateChangeSetInput {
+ s.TemplateURL = &v
+ return s
+}
+
+// SetUsePreviousTemplate sets the UsePreviousTemplate field's value.
+func (s *CreateChangeSetInput) SetUsePreviousTemplate(v bool) *CreateChangeSetInput {
+ s.UsePreviousTemplate = &v
+ return s
+}
+
+// The output for the CreateChangeSet action.
+type CreateChangeSetOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The Amazon Resource Name (ARN) of the change set.
+ Id *string `min:"1" type:"string"`
+
+ // The unique ID of the stack.
+ StackId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s CreateChangeSetOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateChangeSetOutput) GoString() string {
+ return s.String()
+}
+
+// SetId sets the Id field's value.
+func (s *CreateChangeSetOutput) SetId(v string) *CreateChangeSetOutput {
+ s.Id = &v
+ return s
+}
+
+// SetStackId sets the StackId field's value.
+func (s *CreateChangeSetOutput) SetStackId(v string) *CreateChangeSetOutput {
+ s.StackId = &v
+ return s
+}
+
+// The input for CreateStack action.
+type CreateStackInput struct {
+ _ struct{} `type:"structure"`
+
+ // In some cases, you must explicitly acknowledge that your stack template contains
+ // certain capabilities in order for AWS CloudFormation to create the stack.
+ //
+ // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM Some stack templates might include
+ // resources that can affect permissions in your AWS account; for example,
+ // by creating new AWS Identity and Access Management (IAM) users. For those
+ // stacks, you must explicitly acknowledge this by specifying one of these
+ // capabilities. The following IAM resources require you to specify either
+ // the CAPABILITY_IAM or CAPABILITY_NAMED_IAM capability. If you have IAM
+ // resources, you can specify either capability. If you have IAM resources
+ // with custom names, you must specify CAPABILITY_NAMED_IAM. If you don't
+ // specify either of these capabilities, AWS CloudFormation returns an InsufficientCapabilities
+ // error. If your stack template contains these resources, we recommend that
+ // you review all permissions associated with them and edit their permissions
+ // if necessary. AWS::IAM::AccessKey (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html)
+ // AWS::IAM::Group (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html)
+ // AWS::IAM::InstanceProfile (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html)
+ // AWS::IAM::Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html)
+ // AWS::IAM::Role (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)
+ // AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html)
+ // AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html)
+ // For more information, see Acknowledging IAM Resources in AWS CloudFormation
+ // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities).
+ //
+ // * CAPABILITY_AUTO_EXPAND Some template contain macros. Macros perform
+ // custom processing on templates; this can include simple actions like find-and-replace
+ // operations, all the way to extensive transformations of entire templates.
+ // Because of this, users typically create a change set from the processed
+ // template, so that they can review the changes resulting from the macros
+ // before actually creating the stack. If your stack template contains one
+ // or more macros, and you choose to create a stack directly from the processed
+ // template, without first reviewing the resulting changes in a change set,
+ // you must acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html)
+ // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html)
+ // transforms, which are macros hosted by AWS CloudFormation. Change sets
+ // do not currently support nested stacks. If you want to create a stack
+ // from a stack template that contains macros and nested stacks, you must
+ // create the stack directly from the template using this capability. You
+ // should only create stacks directly from a stack template that contains
+ // macros if you know what processing the macro performs. Each macro relies
+ // on an underlying Lambda service function for processing stack templates.
+ // Be aware that the Lambda function owner can update the function operation
+ // without AWS CloudFormation being notified. For more information, see Using
+ // AWS CloudFormation Macros to Perform Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html).
+ Capabilities []*string `type:"list"`
+
+ // A unique identifier for this CreateStack request. Specify this token if you
+ // plan to retry requests so that AWS CloudFormation knows that you're not attempting
+ // to create a stack with the same name. You might retry CreateStack requests
+ // to ensure that AWS CloudFormation successfully received them.
+ //
+ // All events triggered by a given stack operation are assigned the same client
+ // request token, which you can use to track operations. For example, if you
+ // execute a CreateStack operation with the token token1, then all the StackEvents
+ // generated by that operation will have ClientRequestToken set as token1.
+ //
+ // In the console, stack operations display the client request token on the
+ // Events tab. Stack operations that are initiated from the console use the
+ // token format Console-StackOperation-ID, which helps you easily identify the
+ // stack operation . For example, if you create a stack using the console, each
+ // stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002.
+ ClientRequestToken *string `min:"1" type:"string"`
+
+ // Set to true to disable rollback of the stack if stack creation failed. You
+ // can specify either DisableRollback or OnFailure, but not both.
+ //
+ // 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).
+ NotificationARNs []*string `type:"list"`
+
+ // Determines what action will be taken if stack creation fails. This must be
+ // one of: DO_NOTHING, ROLLBACK, or DELETE. You can specify either OnFailure
+ // or DisableRollback, but not both.
+ //
+ // Default: ROLLBACK
+ OnFailure *string `type:"string" enum:"OnFailure"`
+
+ // A list of Parameter structures that specify input parameters for the stack.
+ // For more information, see the Parameter (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html)
+ // data type.
+ Parameters []*Parameter `type:"list"`
+
+ // The template resource types that you have permissions to work with for this
+ // create stack action, such as AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance.
+ // Use the following syntax to describe template resource types: AWS::* (for
+ // all AWS resource), Custom::* (for all custom resources), Custom::logical_ID
+ // (for a specific custom resource), AWS::service_name::* (for all resources
+ // of a particular AWS service), and AWS::service_name::resource_logical_ID
+ // (for a specific AWS resource).
+ //
+ // If the list of resource types doesn't include a resource that you're creating,
+ // the stack creation fails. By default, AWS CloudFormation grants permissions
+ // to all resource types. AWS Identity and Access Management (IAM) uses this
+ // parameter for AWS CloudFormation-specific condition keys in IAM policies.
+ // For more information, see Controlling Access with AWS Identity and Access
+ // Management (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html).
+ ResourceTypes []*string `type:"list"`
+
+ // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM)
+ // role that AWS CloudFormation assumes to create the stack. AWS CloudFormation
+ // uses the role's credentials to make calls on your behalf. AWS CloudFormation
+ // always uses this role for all future operations on the stack. As long as
+ // users have permission to operate on the stack, AWS CloudFormation uses this
+ // role even if the users don't have permission to pass it. Ensure that the
+ // role grants least privilege.
+ //
+ // If you don't specify a value, AWS CloudFormation uses the role that was previously
+ // associated with the stack. If no role is available, AWS CloudFormation uses
+ // a temporary session that is generated from your user credentials.
+ RoleARN *string `min:"20" type:"string"`
+
+ // The rollback triggers for AWS CloudFormation to monitor during stack creation
+ // and updating operations, and for the specified monitoring period afterwards.
+ RollbackConfiguration *RollbackConfiguration `type:"structure"`
+
+ // The name that is associated with the stack. The name must be unique in the
+ // Region in which you are creating the stack.
+ //
+ // A stack name can contain only alphanumeric characters (case sensitive) and
+ // hyphens. It must start with an alphabetic character and cannot be longer
+ // than 128 characters.
+ //
+ // StackName is a required field
+ StackName *string `type:"string" required:"true"`
+
+ // Structure containing the stack policy body. For more information, go to Prevent
+ // Updates to Stack Resources (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html)
+ // in the AWS CloudFormation User Guide. You can specify either the StackPolicyBody
+ // or the StackPolicyURL parameter, but not both.
+ StackPolicyBody *string `min:"1" type:"string"`
+
+ // Location of a file containing the stack policy. The URL must point to a policy
+ // (maximum size: 16 KB) located in an S3 bucket in the same Region as the stack.
+ // You can specify either the StackPolicyBody or the StackPolicyURL parameter,
+ // but not both.
+ StackPolicyURL *string `min:"1" type:"string"`
+
+ // Key-value pairs to associate with this stack. AWS CloudFormation also propagates
+ // these tags to the resources created in the stack. A maximum number of 50
+ // tags can be specified.
+ Tags []*Tag `type:"list"`
+
+ // Structure containing the template body with a minimum length of 1 byte and
+ // a maximum length of 51,200 bytes. For more information, go to Template Anatomy
+ // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
+ // in the AWS CloudFormation User Guide.
+ //
+ // Conditional: You must specify either the TemplateBody or the TemplateURL
+ // parameter, but not both.
+ TemplateBody *string `min:"1" type:"string"`
+
+ // Location of file containing the template body. The URL must point to a template
+ // (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more
+ // information, go to the Template Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
+ // in the AWS CloudFormation User Guide.
+ //
+ // Conditional: You must specify either the TemplateBody or the TemplateURL
+ // parameter, but not both.
+ TemplateURL *string `min:"1" type:"string"`
+
+ // The amount of time that can pass before the stack status becomes CREATE_FAILED;
+ // if DisableRollback is not set or is set to false, the stack will be rolled
+ // back.
+ TimeoutInMinutes *int64 `min:"1" type:"integer"`
+}
+
+// String returns the string representation
+func (s CreateStackInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateStackInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateStackInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateStackInput"}
+ if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
+ }
+ if s.RoleARN != nil && len(*s.RoleARN) < 20 {
+ invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20))
+ }
+ if s.StackName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackName"))
+ }
+ if s.StackPolicyBody != nil && len(*s.StackPolicyBody) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("StackPolicyBody", 1))
+ }
+ if s.StackPolicyURL != nil && len(*s.StackPolicyURL) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("StackPolicyURL", 1))
+ }
+ if s.TemplateBody != nil && len(*s.TemplateBody) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1))
+ }
+ if s.TemplateURL != nil && len(*s.TemplateURL) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1))
+ }
+ if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 1))
+ }
+ if s.RollbackConfiguration != nil {
+ if err := s.RollbackConfiguration.Validate(); err != nil {
+ invalidParams.AddNested("RollbackConfiguration", 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
+}
+
+// SetCapabilities sets the Capabilities field's value.
+func (s *CreateStackInput) SetCapabilities(v []*string) *CreateStackInput {
+ s.Capabilities = v
+ return s
+}
+
+// SetClientRequestToken sets the ClientRequestToken field's value.
+func (s *CreateStackInput) SetClientRequestToken(v string) *CreateStackInput {
+ s.ClientRequestToken = &v
+ return s
+}
+
+// SetDisableRollback sets the DisableRollback field's value.
+func (s *CreateStackInput) SetDisableRollback(v bool) *CreateStackInput {
+ s.DisableRollback = &v
+ 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
+ return s
+}
+
+// SetOnFailure sets the OnFailure field's value.
+func (s *CreateStackInput) SetOnFailure(v string) *CreateStackInput {
+ s.OnFailure = &v
+ return s
+}
+
+// SetParameters sets the Parameters field's value.
+func (s *CreateStackInput) SetParameters(v []*Parameter) *CreateStackInput {
+ s.Parameters = v
+ return s
+}
+
+// SetResourceTypes sets the ResourceTypes field's value.
+func (s *CreateStackInput) SetResourceTypes(v []*string) *CreateStackInput {
+ s.ResourceTypes = v
+ return s
+}
+
+// SetRoleARN sets the RoleARN field's value.
+func (s *CreateStackInput) SetRoleARN(v string) *CreateStackInput {
+ s.RoleARN = &v
+ return s
+}
+
+// SetRollbackConfiguration sets the RollbackConfiguration field's value.
+func (s *CreateStackInput) SetRollbackConfiguration(v *RollbackConfiguration) *CreateStackInput {
+ s.RollbackConfiguration = v
+ return s
+}
+
+// SetStackName sets the StackName field's value.
+func (s *CreateStackInput) SetStackName(v string) *CreateStackInput {
+ s.StackName = &v
+ return s
+}
+
+// SetStackPolicyBody sets the StackPolicyBody field's value.
+func (s *CreateStackInput) SetStackPolicyBody(v string) *CreateStackInput {
+ s.StackPolicyBody = &v
+ return s
+}
+
+// SetStackPolicyURL sets the StackPolicyURL field's value.
+func (s *CreateStackInput) SetStackPolicyURL(v string) *CreateStackInput {
+ s.StackPolicyURL = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *CreateStackInput) SetTags(v []*Tag) *CreateStackInput {
+ s.Tags = v
+ return s
+}
+
+// SetTemplateBody sets the TemplateBody field's value.
+func (s *CreateStackInput) SetTemplateBody(v string) *CreateStackInput {
+ s.TemplateBody = &v
+ return s
+}
+
+// SetTemplateURL sets the TemplateURL field's value.
+func (s *CreateStackInput) SetTemplateURL(v string) *CreateStackInput {
+ s.TemplateURL = &v
+ return s
+}
+
+// SetTimeoutInMinutes sets the TimeoutInMinutes field's value.
+func (s *CreateStackInput) SetTimeoutInMinutes(v int64) *CreateStackInput {
+ s.TimeoutInMinutes = &v
+ return s
+}
+
+type CreateStackInstancesInput struct {
+ _ struct{} `type:"structure"`
+
+ // [Self-managed permissions] The names of one or more AWS accounts that you
+ // want to create stack instances in the specified Region(s) for.
+ //
+ // You can specify Accounts or DeploymentTargets, but not both.
+ Accounts []*string `type:"list"`
+
+ // [Service-managed permissions] The AWS Organizations accounts for which to
+ // create stack instances in the specified Regions.
+ //
+ // You can specify Accounts or DeploymentTargets, but not both.
+ DeploymentTargets *DeploymentTargets `type:"structure"`
+
+ // The unique identifier for this stack set operation.
+ //
+ // The operation ID also functions as an idempotency token, to ensure that AWS
+ // CloudFormation performs the stack set operation only once, even if you retry
+ // the request multiple times. You might retry stack set operation requests
+ // to ensure that AWS CloudFormation successfully received them.
+ //
+ // If you don't specify an operation ID, the SDK generates one automatically.
+ //
+ // Repeating this stack set operation with a new operation ID retries all stack
+ // instances whose status is OUTDATED.
+ OperationId *string `min:"1" type:"string" idempotencyToken:"true"`
+
+ // Preferences for how AWS CloudFormation performs this stack set operation.
+ OperationPreferences *StackSetOperationPreferences `type:"structure"`
+
+ // A list of stack set parameters whose values you want to override in the selected
+ // stack instances.
+ //
+ // Any overridden parameter values will be applied to all stack instances in
+ // the specified accounts and Regions. When specifying parameters and their
+ // values, be aware of how AWS CloudFormation sets parameter values during stack
+ // instance operations:
+ //
+ // * To override the current value for a parameter, include the parameter
+ // and specify its value.
+ //
+ // * To leave a parameter set to its present value, you can do one of the
+ // following: Do not include the parameter in the list. Include the parameter
+ // and specify UsePreviousValue as true. (You cannot specify both a value
+ // and set UsePreviousValue to true.)
+ //
+ // * To set all overridden parameter back to the values specified in the
+ // stack set, specify a parameter list but do not include any parameters.
+ //
+ // * To leave all parameters set to their present values, do not specify
+ // this property at all.
+ //
+ // During stack set updates, any parameter values overridden for a stack instance
+ // are not updated, but retain their overridden value.
+ //
+ // You can only override the parameter values that are specified in the stack
+ // set; to add or delete a parameter itself, use UpdateStackSet (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html)
+ // to update the stack set template.
+ ParameterOverrides []*Parameter `type:"list"`
+
+ // The names of one or more Regions where you want to create stack instances
+ // using the specified AWS account(s).
+ //
+ // Regions is a required field
+ Regions []*string `type:"list" required:"true"`
+
+ // The name or unique ID of the stack set that you want to create stack instances
+ // from.
+ //
+ // StackSetName is a required field
+ StackSetName *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s CreateStackInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateStackInstancesInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateStackInstancesInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateStackInstancesInput"}
+ if s.OperationId != nil && len(*s.OperationId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("OperationId", 1))
+ }
+ if s.Regions == nil {
+ invalidParams.Add(request.NewErrParamRequired("Regions"))
+ }
+ if s.StackSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+ }
+ if s.OperationPreferences != nil {
+ if err := s.OperationPreferences.Validate(); err != nil {
+ invalidParams.AddNested("OperationPreferences", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAccounts sets the Accounts field's value.
+func (s *CreateStackInstancesInput) SetAccounts(v []*string) *CreateStackInstancesInput {
+ s.Accounts = v
+ return s
+}
+
+// SetDeploymentTargets sets the DeploymentTargets field's value.
+func (s *CreateStackInstancesInput) SetDeploymentTargets(v *DeploymentTargets) *CreateStackInstancesInput {
+ s.DeploymentTargets = v
+ return s
+}
+
+// SetOperationId sets the OperationId field's value.
+func (s *CreateStackInstancesInput) SetOperationId(v string) *CreateStackInstancesInput {
+ s.OperationId = &v
+ return s
+}
+
+// SetOperationPreferences sets the OperationPreferences field's value.
+func (s *CreateStackInstancesInput) SetOperationPreferences(v *StackSetOperationPreferences) *CreateStackInstancesInput {
+ s.OperationPreferences = v
+ return s
+}
+
+// SetParameterOverrides sets the ParameterOverrides field's value.
+func (s *CreateStackInstancesInput) SetParameterOverrides(v []*Parameter) *CreateStackInstancesInput {
+ s.ParameterOverrides = v
+ return s
+}
+
+// SetRegions sets the Regions field's value.
+func (s *CreateStackInstancesInput) SetRegions(v []*string) *CreateStackInstancesInput {
+ s.Regions = v
+ return s
+}
+
+// SetStackSetName sets the StackSetName field's value.
+func (s *CreateStackInstancesInput) SetStackSetName(v string) *CreateStackInstancesInput {
+ s.StackSetName = &v
+ return s
+}
+
+type CreateStackInstancesOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The unique identifier for this stack set operation.
+ OperationId *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s CreateStackInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateStackInstancesOutput) GoString() string {
+ return s.String()
+}
+
+// SetOperationId sets the OperationId field's value.
+func (s *CreateStackInstancesOutput) SetOperationId(v string) *CreateStackInstancesOutput {
+ s.OperationId = &v
+ return s
+}
+
+// The output for a CreateStack action.
+type CreateStackOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Unique identifier of the stack.
+ StackId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s CreateStackOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateStackOutput) GoString() string {
+ return s.String()
+}
+
+// SetStackId sets the StackId field's value.
+func (s *CreateStackOutput) SetStackId(v string) *CreateStackOutput {
+ s.StackId = &v
+ return s
+}
+
+type CreateStackSetInput struct {
+ _ struct{} `type:"structure"`
+
+ // The Amazon Resource Number (ARN) of the IAM role to use to create this stack
+ // set.
+ //
+ // Specify an IAM role only if you are using customized administrator roles
+ // to control which users or groups can manage specific stack sets within the
+ // same administrator account. For more information, see Prerequisites: Granting
+ // Permissions for Stack Set Operations (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html)
+ // in the AWS CloudFormation User Guide.
+ AdministrationRoleARN *string `min:"20" type:"string"`
+
+ // Describes whether StackSets automatically deploys to AWS Organizations accounts
+ // that are added to the target organization or organizational unit (OU). Specify
+ // only if PermissionModel is SERVICE_MANAGED.
+ AutoDeployment *AutoDeployment `type:"structure"`
+
+ // In some cases, you must explicitly acknowledge that your stack set template
+ // contains certain capabilities in order for AWS CloudFormation to create the
+ // stack set and related stack instances.
+ //
+ // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM Some stack templates might include
+ // resources that can affect permissions in your AWS account; for example,
+ // by creating new AWS Identity and Access Management (IAM) users. For those
+ // stack sets, you must explicitly acknowledge this by specifying one of
+ // these capabilities. The following IAM resources require you to specify
+ // either the CAPABILITY_IAM or CAPABILITY_NAMED_IAM capability. If you have
+ // IAM resources, you can specify either capability. If you have IAM resources
+ // with custom names, you must specify CAPABILITY_NAMED_IAM. If you don't
+ // specify either of these capabilities, AWS CloudFormation returns an InsufficientCapabilities
+ // error. If your stack template contains these resources, we recommend that
+ // you review all permissions associated with them and edit their permissions
+ // if necessary. AWS::IAM::AccessKey (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html)
+ // AWS::IAM::Group (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html)
+ // AWS::IAM::InstanceProfile (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html)
+ // AWS::IAM::Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html)
+ // AWS::IAM::Role (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)
+ // AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html)
+ // AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html)
+ // For more information, see Acknowledging IAM Resources in AWS CloudFormation
+ // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities).
+ //
+ // * CAPABILITY_AUTO_EXPAND Some templates contain macros. If your stack
+ // template contains one or more macros, and you choose to create a stack
+ // directly from the processed template, without first reviewing the resulting
+ // changes in a change set, you must acknowledge this capability. For more
+ // information, see Using AWS CloudFormation Macros to Perform Custom Processing
+ // on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html).
+ // Stack sets do not currently support macros in stack templates. (This includes
+ // the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html)
+ // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html)
+ // transforms, which are macros hosted by AWS CloudFormation.) Even if you
+ // specify this capability, if you include a macro in your template the stack
+ // set operation will fail.
+ Capabilities []*string `type:"list"`
+
+ // A unique identifier for this CreateStackSet request. Specify this token if
+ // you plan to retry requests so that AWS CloudFormation knows that you're not
+ // attempting to create another stack set with the same name. You might retry
+ // CreateStackSet requests to ensure that AWS CloudFormation successfully received
+ // them.
+ //
+ // If you don't specify an operation ID, the SDK generates one automatically.
+ ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
+
+ // A description of the stack set. You can use the description to identify the
+ // stack set's purpose or other important information.
+ Description *string `min:"1" type:"string"`
+
+ // The name of the IAM execution role to use to create the stack set. If you
+ // do not specify an execution role, AWS CloudFormation uses the AWSCloudFormationStackSetExecutionRole
+ // role for the stack set operation.
+ //
+ // Specify an IAM role only if you are using customized execution roles to control
+ // which stack resources users and groups can include in their stack sets.
+ ExecutionRoleName *string `min:"1" type:"string"`
+
+ // The input parameters for the stack set template.
+ Parameters []*Parameter `type:"list"`
+
+ // Describes how the IAM roles required for stack set operations are created.
+ // By default, SELF-MANAGED is specified.
+ //
+ // * With self-managed permissions, you must create the administrator and
+ // execution roles required to deploy to target accounts. For more information,
+ // see Grant Self-Managed Stack Set Permissions (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html).
+ //
+ // * With service-managed permissions, StackSets automatically creates the
+ // IAM roles required to deploy to accounts managed by AWS Organizations.
+ // For more information, see Grant Service-Managed Stack Set Permissions
+ // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html).
+ PermissionModel *string `type:"string" enum:"PermissionModels"`
+
+ // The name to associate with the stack set. The name must be unique in the
+ // Region where you create your stack set.
+ //
+ // A stack name can contain only alphanumeric characters (case-sensitive) and
+ // hyphens. It must start with an alphabetic character and can't be longer than
+ // 128 characters.
+ //
+ // StackSetName is a required field
+ StackSetName *string `type:"string" required:"true"`
- // The name or the unique stack ID that is associated with the stack.
+ // The key-value pairs to associate with this stack set and the stacks created
+ // from it. AWS CloudFormation also propagates these tags to supported resources
+ // that are created in the stacks. A maximum number of 50 tags can be specified.
//
- // StackName is a required field
- StackName *string `type:"string" required:"true"`
+ // If you specify tags as part of a CreateStackSet action, AWS CloudFormation
+ // checks to see if you have the required IAM permission to tag resources. If
+ // you don't, the entire CreateStackSet action fails with an access denied error,
+ // and the stack set is not created.
+ Tags []*Tag `type:"list"`
+
+ // The structure that contains the template body, with a minimum length of 1
+ // byte and a maximum length of 51,200 bytes. For more information, see Template
+ // Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
+ // in the AWS CloudFormation User Guide.
+ //
+ // Conditional: You must specify either the TemplateBody or the TemplateURL
+ // parameter, but not both.
+ TemplateBody *string `min:"1" type:"string"`
+
+ // The location of the file that contains the template body. The URL must point
+ // to a template (maximum size: 460,800 bytes) that's located in an Amazon S3
+ // bucket. For more information, see Template Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
+ // in the AWS CloudFormation User Guide.
+ //
+ // Conditional: You must specify either the TemplateBody or the TemplateURL
+ // parameter, but not both.
+ TemplateURL *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s CancelUpdateStackInput) String() string {
+func (s CreateStackSetInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s CancelUpdateStackInput) GoString() string {
+func (s CreateStackSetInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *CancelUpdateStackInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CancelUpdateStackInput"}
+func (s *CreateStackSetInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateStackSetInput"}
+ if s.AdministrationRoleARN != nil && len(*s.AdministrationRoleARN) < 20 {
+ invalidParams.Add(request.NewErrParamMinLen("AdministrationRoleARN", 20))
+ }
if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
}
- if s.StackName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackName"))
+ if s.Description != nil && len(*s.Description) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Description", 1))
+ }
+ if s.ExecutionRoleName != nil && len(*s.ExecutionRoleName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleName", 1))
+ }
+ if s.StackSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+ }
+ if s.TemplateBody != nil && len(*s.TemplateBody) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1))
+ }
+ if s.TemplateURL != nil && len(*s.TemplateURL) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 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 {
@@ -4399,254 +7271,229 @@ func (s *CancelUpdateStackInput) Validate() error {
return nil
}
-// SetClientRequestToken sets the ClientRequestToken field's value.
-func (s *CancelUpdateStackInput) SetClientRequestToken(v string) *CancelUpdateStackInput {
- s.ClientRequestToken = &v
+// SetAdministrationRoleARN sets the AdministrationRoleARN field's value.
+func (s *CreateStackSetInput) SetAdministrationRoleARN(v string) *CreateStackSetInput {
+ s.AdministrationRoleARN = &v
return s
}
-// SetStackName sets the StackName field's value.
-func (s *CancelUpdateStackInput) SetStackName(v string) *CancelUpdateStackInput {
- s.StackName = &v
+// SetAutoDeployment sets the AutoDeployment field's value.
+func (s *CreateStackSetInput) SetAutoDeployment(v *AutoDeployment) *CreateStackSetInput {
+ s.AutoDeployment = v
return s
}
-type CancelUpdateStackOutput struct {
- _ struct{} `type:"structure"`
+// SetCapabilities sets the Capabilities field's value.
+func (s *CreateStackSetInput) SetCapabilities(v []*string) *CreateStackSetInput {
+ s.Capabilities = v
+ return s
}
-// String returns the string representation
-func (s CancelUpdateStackOutput) String() string {
- return awsutil.Prettify(s)
+// SetClientRequestToken sets the ClientRequestToken field's value.
+func (s *CreateStackSetInput) SetClientRequestToken(v string) *CreateStackSetInput {
+ s.ClientRequestToken = &v
+ return s
}
-// GoString returns the string representation
-func (s CancelUpdateStackOutput) GoString() string {
- return s.String()
+// SetDescription sets the Description field's value.
+func (s *CreateStackSetInput) SetDescription(v string) *CreateStackSetInput {
+ s.Description = &v
+ return s
}
-// The Change structure describes the changes AWS CloudFormation will perform
-// if you execute the change set.
-type Change struct {
- _ struct{} `type:"structure"`
+// SetExecutionRoleName sets the ExecutionRoleName field's value.
+func (s *CreateStackSetInput) SetExecutionRoleName(v string) *CreateStackSetInput {
+ s.ExecutionRoleName = &v
+ return s
+}
- // A ResourceChange structure that describes the resource and action that AWS
- // CloudFormation will perform.
- ResourceChange *ResourceChange `type:"structure"`
+// SetParameters sets the Parameters field's value.
+func (s *CreateStackSetInput) SetParameters(v []*Parameter) *CreateStackSetInput {
+ s.Parameters = v
+ return s
+}
- // The type of entity that AWS CloudFormation changes. Currently, the only entity
- // type is Resource.
- Type *string `type:"string" enum:"ChangeType"`
+// SetPermissionModel sets the PermissionModel field's value.
+func (s *CreateStackSetInput) SetPermissionModel(v string) *CreateStackSetInput {
+ s.PermissionModel = &v
+ return s
}
-// String returns the string representation
-func (s Change) String() string {
- return awsutil.Prettify(s)
+// SetStackSetName sets the StackSetName field's value.
+func (s *CreateStackSetInput) SetStackSetName(v string) *CreateStackSetInput {
+ s.StackSetName = &v
+ return s
}
-// GoString returns the string representation
-func (s Change) GoString() string {
- return s.String()
+// SetTags sets the Tags field's value.
+func (s *CreateStackSetInput) SetTags(v []*Tag) *CreateStackSetInput {
+ s.Tags = v
+ return s
}
-// SetResourceChange sets the ResourceChange field's value.
-func (s *Change) SetResourceChange(v *ResourceChange) *Change {
- s.ResourceChange = v
+// SetTemplateBody sets the TemplateBody field's value.
+func (s *CreateStackSetInput) SetTemplateBody(v string) *CreateStackSetInput {
+ s.TemplateBody = &v
return s
}
-// SetType sets the Type field's value.
-func (s *Change) SetType(v string) *Change {
- s.Type = &v
+// SetTemplateURL sets the TemplateURL field's value.
+func (s *CreateStackSetInput) SetTemplateURL(v string) *CreateStackSetInput {
+ s.TemplateURL = &v
return s
}
-// The ChangeSetSummary structure describes a change set, its status, and the
-// stack with which it's associated.
-type ChangeSetSummary struct {
+type CreateStackSetOutput struct {
_ struct{} `type:"structure"`
- // The ID of the change set.
- ChangeSetId *string `min:"1" type:"string"`
-
- // The name of the change set.
- ChangeSetName *string `min:"1" type:"string"`
-
- // The start time when the change set was created, in UTC.
- CreationTime *time.Time `type:"timestamp"`
-
- // Descriptive information about the change set.
- Description *string `min:"1" type:"string"`
-
- // If the change set execution status is AVAILABLE, you can execute the change
- // set. If you can’t execute the change set, the status indicates why. For
- // example, a change set might be in an UNAVAILABLE state because AWS CloudFormation
- // is still creating it or in an OBSOLETE state because the stack was already
- // updated.
- ExecutionStatus *string `type:"string" enum:"ExecutionStatus"`
-
- // The ID of the stack with which the change set is associated.
- StackId *string `type:"string"`
-
- // The name of the stack with which the change set is associated.
- StackName *string `type:"string"`
-
- // The state of the change set, such as CREATE_IN_PROGRESS, CREATE_COMPLETE,
- // or FAILED.
- Status *string `type:"string" enum:"ChangeSetStatus"`
-
- // A description of the change set's status. For example, if your change set
- // is in the FAILED state, AWS CloudFormation shows the error message.
- StatusReason *string `type:"string"`
+ // The ID of the stack set that you're creating.
+ StackSetId *string `type:"string"`
}
// String returns the string representation
-func (s ChangeSetSummary) String() string {
+func (s CreateStackSetOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ChangeSetSummary) GoString() string {
+func (s CreateStackSetOutput) GoString() string {
return s.String()
}
-// SetChangeSetId sets the ChangeSetId field's value.
-func (s *ChangeSetSummary) SetChangeSetId(v string) *ChangeSetSummary {
- s.ChangeSetId = &v
+// SetStackSetId sets the StackSetId field's value.
+func (s *CreateStackSetOutput) SetStackSetId(v string) *CreateStackSetOutput {
+ s.StackSetId = &v
return s
}
-// SetChangeSetName sets the ChangeSetName field's value.
-func (s *ChangeSetSummary) SetChangeSetName(v string) *ChangeSetSummary {
- s.ChangeSetName = &v
- return s
+// The input for the DeleteChangeSet action.
+type DeleteChangeSetInput struct {
+ _ struct{} `type:"structure"`
+
+ // The name or Amazon Resource Name (ARN) of the change set that you want to
+ // delete.
+ //
+ // ChangeSetName is a required field
+ ChangeSetName *string `min:"1" type:"string" required:"true"`
+
+ // If you specified the name of a change set to delete, specify the stack name
+ // or ID (ARN) that is associated with it.
+ StackName *string `min:"1" type:"string"`
}
-// SetCreationTime sets the CreationTime field's value.
-func (s *ChangeSetSummary) SetCreationTime(v time.Time) *ChangeSetSummary {
- s.CreationTime = &v
- return s
+// String returns the string representation
+func (s DeleteChangeSetInput) String() string {
+ return awsutil.Prettify(s)
}
-// SetDescription sets the Description field's value.
-func (s *ChangeSetSummary) SetDescription(v string) *ChangeSetSummary {
- s.Description = &v
- return s
+// GoString returns the string representation
+func (s DeleteChangeSetInput) GoString() string {
+ return s.String()
}
-// SetExecutionStatus sets the ExecutionStatus field's value.
-func (s *ChangeSetSummary) SetExecutionStatus(v string) *ChangeSetSummary {
- s.ExecutionStatus = &v
- return s
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteChangeSetInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteChangeSetInput"}
+ if s.ChangeSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("ChangeSetName"))
+ }
+ if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
+ }
+ if s.StackName != nil && len(*s.StackName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
}
-// SetStackId sets the StackId field's value.
-func (s *ChangeSetSummary) SetStackId(v string) *ChangeSetSummary {
- s.StackId = &v
+// SetChangeSetName sets the ChangeSetName field's value.
+func (s *DeleteChangeSetInput) SetChangeSetName(v string) *DeleteChangeSetInput {
+ s.ChangeSetName = &v
return s
}
// SetStackName sets the StackName field's value.
-func (s *ChangeSetSummary) SetStackName(v string) *ChangeSetSummary {
+func (s *DeleteChangeSetInput) SetStackName(v string) *DeleteChangeSetInput {
s.StackName = &v
return s
}
-// SetStatus sets the Status field's value.
-func (s *ChangeSetSummary) SetStatus(v string) *ChangeSetSummary {
- s.Status = &v
- return s
+// The output for the DeleteChangeSet action.
+type DeleteChangeSetOutput struct {
+ _ struct{} `type:"structure"`
}
-// SetStatusReason sets the StatusReason field's value.
-func (s *ChangeSetSummary) SetStatusReason(v string) *ChangeSetSummary {
- s.StatusReason = &v
- return s
+// String returns the string representation
+func (s DeleteChangeSetOutput) String() string {
+ return awsutil.Prettify(s)
}
-// The input for the ContinueUpdateRollback action.
-type ContinueUpdateRollbackInput struct {
- _ struct{} `type:"structure"`
+// GoString returns the string representation
+func (s DeleteChangeSetOutput) GoString() string {
+ return s.String()
+}
- // A unique identifier for this ContinueUpdateRollback request. Specify this
- // token if you plan to retry requests so that AWS CloudFormation knows that
- // you're not attempting to continue the rollback to a stack with the same name.
- // You might retry ContinueUpdateRollback requests to ensure that AWS CloudFormation
- // successfully received them.
- ClientRequestToken *string `min:"1" type:"string"`
+// The input for DeleteStack action.
+type DeleteStackInput struct {
+ _ struct{} `type:"structure"`
- // A list of the logical IDs of the resources that AWS CloudFormation skips
- // during the continue update rollback operation. You can specify only resources
- // that are in the UPDATE_FAILED state because a rollback failed. You can't
- // specify resources that are in the UPDATE_FAILED state for other reasons,
- // for example, because an update was cancelled. To check why a resource update
- // failed, use the DescribeStackResources action, and view the resource status
- // reason.
- //
- // Specify this property to skip rolling back resources that AWS CloudFormation
- // can't successfully roll back. We recommend that you troubleshoot (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html#troubleshooting-errors-update-rollback-failed)
- // resources before skipping them. AWS CloudFormation sets the status of the
- // specified resources to UPDATE_COMPLETE and continues to roll back the stack.
- // After the rollback is complete, the state of the skipped resources will be
- // inconsistent with the state of the resources in the stack template. Before
- // performing another stack update, you must update the stack or resources to
- // be consistent with each other. If you don't, subsequent stack updates might
- // fail, and the stack will become unrecoverable.
+ // A unique identifier for this DeleteStack request. Specify this token if you
+ // plan to retry requests so that AWS CloudFormation knows that you're not attempting
+ // to delete a stack with the same name. You might retry DeleteStack requests
+ // to ensure that AWS CloudFormation successfully received them.
//
- // Specify the minimum number of resources required to successfully roll back
- // your stack. For example, a failed resource update might cause dependent resources
- // to fail. In this case, it might not be necessary to skip the dependent resources.
+ // All events triggered by a given stack operation are assigned the same client
+ // request token, which you can use to track operations. For example, if you
+ // execute a CreateStack operation with the token token1, then all the StackEvents
+ // generated by that operation will have ClientRequestToken set as token1.
//
- // To skip resources that are part of nested stacks, use the following format:
- // NestedStackName.ResourceLogicalID. If you want to specify the logical ID
- // of a stack resource (Type: AWS::CloudFormation::Stack) in the ResourcesToSkip
- // list, then its corresponding embedded stack must be in one of the following
- // states: DELETE_IN_PROGRESS, DELETE_COMPLETE, or DELETE_FAILED.
+ // In the console, stack operations display the client request token on the
+ // Events tab. Stack operations that are initiated from the console use the
+ // token format Console-StackOperation-ID, which helps you easily identify the
+ // stack operation . For example, if you create a stack using the console, each
+ // stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002.
+ ClientRequestToken *string `min:"1" type:"string"`
+
+ // For stacks in the DELETE_FAILED state, a list of resource logical IDs that
+ // are associated with the resources you want to retain. During deletion, AWS
+ // CloudFormation deletes the stack but does not delete the retained resources.
//
- // Don't confuse a child stack's name with its corresponding logical ID defined
- // in the parent stack. For an example of a continue update rollback operation
- // with nested stacks, see Using ResourcesToSkip to recover a nested stacks
- // hierarchy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html#nested-stacks).
- ResourcesToSkip []*string `type:"list"`
+ // Retaining resources is useful when you cannot delete a resource, such as
+ // a non-empty S3 bucket, but you want to delete the stack.
+ RetainResources []*string `type:"list"`
// The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM)
- // role that AWS CloudFormation assumes to roll back the stack. AWS CloudFormation
- // uses the role's credentials to make calls on your behalf. AWS CloudFormation
- // always uses this role for all future operations on the stack. As long as
- // users have permission to operate on the stack, AWS CloudFormation uses this
- // role even if the users don't have permission to pass it. Ensure that the
- // role grants least privilege.
+ // role that AWS CloudFormation assumes to delete the stack. AWS CloudFormation
+ // uses the role's credentials to make calls on your behalf.
//
// If you don't specify a value, AWS CloudFormation uses the role that was previously
// associated with the stack. If no role is available, AWS CloudFormation uses
// a temporary session that is generated from your user credentials.
RoleARN *string `min:"20" type:"string"`
- // The name or the unique ID of the stack that you want to continue rolling
- // back.
- //
- // Don't specify the name of a nested stack (a stack that was created by using
- // the AWS::CloudFormation::Stack resource). Instead, use this operation on
- // the parent stack (the stack that contains the AWS::CloudFormation::Stack
- // resource).
+ // The name or the unique stack ID that is associated with the stack.
//
// StackName is a required field
- StackName *string `min:"1" type:"string" required:"true"`
+ StackName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s ContinueUpdateRollbackInput) String() string {
+func (s DeleteStackInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ContinueUpdateRollbackInput) GoString() string {
+func (s DeleteStackInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ContinueUpdateRollbackInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ContinueUpdateRollbackInput"}
+func (s *DeleteStackInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteStackInput"}
if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
}
@@ -4656,9 +7503,6 @@ func (s *ContinueUpdateRollbackInput) Validate() error {
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
@@ -4667,249 +7511,109 @@ func (s *ContinueUpdateRollbackInput) Validate() error {
}
// SetClientRequestToken sets the ClientRequestToken field's value.
-func (s *ContinueUpdateRollbackInput) SetClientRequestToken(v string) *ContinueUpdateRollbackInput {
+func (s *DeleteStackInput) SetClientRequestToken(v string) *DeleteStackInput {
s.ClientRequestToken = &v
return s
}
-// SetResourcesToSkip sets the ResourcesToSkip field's value.
-func (s *ContinueUpdateRollbackInput) SetResourcesToSkip(v []*string) *ContinueUpdateRollbackInput {
- s.ResourcesToSkip = v
+// SetRetainResources sets the RetainResources field's value.
+func (s *DeleteStackInput) SetRetainResources(v []*string) *DeleteStackInput {
+ s.RetainResources = v
return s
}
// SetRoleARN sets the RoleARN field's value.
-func (s *ContinueUpdateRollbackInput) SetRoleARN(v string) *ContinueUpdateRollbackInput {
+func (s *DeleteStackInput) SetRoleARN(v string) *DeleteStackInput {
s.RoleARN = &v
return s
}
// SetStackName sets the StackName field's value.
-func (s *ContinueUpdateRollbackInput) SetStackName(v string) *ContinueUpdateRollbackInput {
+func (s *DeleteStackInput) SetStackName(v string) *DeleteStackInput {
s.StackName = &v
return s
}
-// The output for a ContinueUpdateRollback action.
-type ContinueUpdateRollbackOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s ContinueUpdateRollbackOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ContinueUpdateRollbackOutput) GoString() string {
- return s.String()
-}
-
-// The input for the CreateChangeSet action.
-type CreateChangeSetInput struct {
+type DeleteStackInstancesInput struct {
_ struct{} `type:"structure"`
- // In some cases, you must explicity acknowledge that your stack template contains
- // certain capabilities in order for AWS CloudFormation to create the stack.
- //
- // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM Some stack templates might include
- // resources that can affect permissions in your AWS account; for example,
- // by creating new AWS Identity and Access Management (IAM) users. For those
- // stacks, you must explicitly acknowledge this by specifying one of these
- // capabilities. The following IAM resources require you to specify either
- // the CAPABILITY_IAM or CAPABILITY_NAMED_IAM capability. If you have IAM
- // resources, you can specify either capability. If you have IAM resources
- // with custom names, you must specify CAPABILITY_NAMED_IAM. If you don't
- // specify either of these capabilities, AWS CloudFormation returns an InsufficientCapabilities
- // error. If your stack template contains these resources, we recommend that
- // you review all permissions associated with them and edit their permissions
- // if necessary. AWS::IAM::AccessKey (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html)
- // AWS::IAM::Group (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html)
- // AWS::IAM::InstanceProfile (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html)
- // AWS::IAM::Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html)
- // AWS::IAM::Role (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)
- // AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html)
- // AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html)
- // For more information, see Acknowledging IAM Resources in AWS CloudFormation
- // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities).
- //
- // * CAPABILITY_AUTO_EXPAND Some template contain macros. Macros perform
- // custom processing on templates; this can include simple actions like find-and-replace
- // operations, all the way to extensive transformations of entire templates.
- // Because of this, users typically create a change set from the processed
- // template, so that they can review the changes resulting from the macros
- // before actually creating the stack. If your stack template contains one
- // or more macros, and you choose to create a stack directly from the processed
- // template, without first reviewing the resulting changes in a change set,
- // you must acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html)
- // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html)
- // transforms, which are macros hosted by AWS CloudFormation. This capacity
- // does not apply to creating change sets, and specifying it when creating
- // change sets has no effect. Also, change sets do not currently support
- // nested stacks. If you want to create a stack from a stack template that
- // contains macros and nested stacks, you must create or update the stack
- // directly from the template using the CreateStack or UpdateStack action,
- // and specifying this capability. For more information on macros, see Using
- // AWS CloudFormation Macros to Perform Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html).
- Capabilities []*string `type:"list"`
-
- // The name of the change set. The name must be unique among all change sets
- // that are associated with the specified stack.
- //
- // A change set name can contain only alphanumeric, case sensitive characters
- // and hyphens. It must start with an alphabetic character and cannot exceed
- // 128 characters.
- //
- // ChangeSetName is a required field
- ChangeSetName *string `min:"1" type:"string" required:"true"`
-
- // The type of change set operation. To create a change set for a new stack,
- // specify CREATE. To create a change set for an existing stack, specify UPDATE.
- //
- // If you create a change set for a new stack, AWS Cloudformation creates a
- // stack with a unique stack ID, but no template or resources. The stack will
- // be in the REVIEW_IN_PROGRESS (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html#d0e11995)
- // state until you execute the change set.
- //
- // By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE
- // type to create a change set for a new stack or the CREATE type to create
- // a change set for an existing stack.
- ChangeSetType *string `type:"string" enum:"ChangeSetType"`
-
- // A unique identifier for this CreateChangeSet request. Specify this token
- // if you plan to retry requests so that AWS CloudFormation knows that you're
- // not attempting to create another change set with the same name. You might
- // retry CreateChangeSet requests to ensure that AWS CloudFormation successfully
- // received them.
- ClientToken *string `min:"1" type:"string"`
-
- // A description to help you identify this change set.
- Description *string `min:"1" type:"string"`
-
- // The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon
- // SNS) topics that AWS CloudFormation associates with the stack. To remove
- // all associated notification topics, specify an empty list.
- NotificationARNs []*string `type:"list"`
-
- // A list of Parameter structures that specify input parameters for the change
- // set. For more information, see the Parameter data type.
- Parameters []*Parameter `type:"list"`
-
- // The template resource types that you have permissions to work with if you
- // execute this change set, such as AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance.
- //
- // If the list of resource types doesn't include a resource type that you're
- // updating, the stack update fails. By default, AWS CloudFormation grants permissions
- // to all resource types. AWS Identity and Access Management (IAM) uses this
- // parameter for condition keys in IAM policies for AWS CloudFormation. For
- // more information, see Controlling Access with AWS Identity and Access Management
- // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html)
- // in the AWS CloudFormation User Guide.
- ResourceTypes []*string `type:"list"`
-
- // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM)
- // role that AWS CloudFormation assumes when executing the change set. AWS CloudFormation
- // uses the role's credentials to make calls on your behalf. AWS CloudFormation
- // uses this role for all future operations on the stack. As long as users have
- // permission to operate on the stack, AWS CloudFormation uses this role even
- // if the users don't have permission to pass it. Ensure that the role grants
- // least privilege.
+ // [Self-managed permissions] The names of the AWS accounts that you want to
+ // delete stack instances for.
//
- // If you don't specify a value, AWS CloudFormation uses the role that was previously
- // associated with the stack. If no role is available, AWS CloudFormation uses
- // a temporary session that is generated from your user credentials.
- RoleARN *string `min:"20" type:"string"`
+ // You can specify Accounts or DeploymentTargets, but not both.
+ Accounts []*string `type:"list"`
- // The rollback triggers for AWS CloudFormation to monitor during stack creation
- // and updating operations, and for the specified monitoring period afterwards.
- RollbackConfiguration *RollbackConfiguration `type:"structure"`
+ // [Service-managed permissions] The AWS Organizations accounts from which to
+ // delete stack instances.
+ //
+ // You can specify Accounts or DeploymentTargets, but not both.
+ DeploymentTargets *DeploymentTargets `type:"structure"`
- // The name or the unique ID of the stack for which you are creating a change
- // set. AWS CloudFormation generates the change set by comparing this stack's
- // information with the information that you submit, such as a modified template
- // or different parameter input values.
+ // The unique identifier for this stack set operation.
//
- // StackName is a required field
- StackName *string `min:"1" type:"string" required:"true"`
+ // If you don't specify an operation ID, the SDK generates one automatically.
+ //
+ // The operation ID also functions as an idempotency token, to ensure that AWS
+ // CloudFormation performs the stack set operation only once, even if you retry
+ // the request multiple times. You can retry stack set operation requests to
+ // ensure that AWS CloudFormation successfully received them.
+ //
+ // Repeating this stack set operation with a new operation ID retries all stack
+ // instances whose status is OUTDATED.
+ OperationId *string `min:"1" type:"string" idempotencyToken:"true"`
- // Key-value pairs to associate with this stack. AWS CloudFormation also propagates
- // these tags to resources in the stack. You can specify a maximum of 50 tags.
- Tags []*Tag `type:"list"`
+ // Preferences for how AWS CloudFormation performs this stack set operation.
+ OperationPreferences *StackSetOperationPreferences `type:"structure"`
- // A structure that contains the body of the revised template, with a minimum
- // length of 1 byte and a maximum length of 51,200 bytes. AWS CloudFormation
- // generates the change set by comparing this template with the template of
- // the stack that you specified.
+ // The Regions where you want to delete stack set instances.
//
- // Conditional: You must specify only TemplateBody or TemplateURL.
- TemplateBody *string `min:"1" type:"string"`
+ // Regions is a required field
+ Regions []*string `type:"list" required:"true"`
- // The location of the file that contains the revised template. The URL must
- // point to a template (max size: 460,800 bytes) that is located in an S3 bucket.
- // AWS CloudFormation generates the change set by comparing this template with
- // the stack that you specified.
+ // Removes the stack instances from the specified stack set, but doesn't delete
+ // the stacks. You can't reassociate a retained stack or add an existing, saved
+ // stack to a new stack set.
//
- // Conditional: You must specify only TemplateBody or TemplateURL.
- TemplateURL *string `min:"1" type:"string"`
+ // For more information, see Stack set operation options (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-ops-options).
+ //
+ // RetainStacks is a required field
+ RetainStacks *bool `type:"boolean" required:"true"`
- // Whether to reuse the template that is associated with the stack to create
- // the change set.
- UsePreviousTemplate *bool `type:"boolean"`
+ // The name or unique ID of the stack set that you want to delete stack instances
+ // for.
+ //
+ // StackSetName is a required field
+ StackSetName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s CreateChangeSetInput) String() string {
+func (s DeleteStackInstancesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s CreateChangeSetInput) GoString() string {
+func (s DeleteStackInstancesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateChangeSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateChangeSetInput"}
- if s.ChangeSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeSetName"))
- }
- if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
- }
- if s.ClientToken != nil && len(*s.ClientToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1))
- }
- if s.Description != nil && len(*s.Description) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Description", 1))
- }
- if s.RoleARN != nil && len(*s.RoleARN) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20))
- }
- if s.StackName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackName"))
- }
- if s.StackName != nil && len(*s.StackName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
+func (s *DeleteStackInstancesInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteStackInstancesInput"}
+ if s.OperationId != nil && len(*s.OperationId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("OperationId", 1))
}
- if s.TemplateBody != nil && len(*s.TemplateBody) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1))
+ if s.Regions == nil {
+ invalidParams.Add(request.NewErrParamRequired("Regions"))
}
- if s.TemplateURL != nil && len(*s.TemplateURL) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1))
+ if s.RetainStacks == nil {
+ invalidParams.Add(request.NewErrParamRequired("RetainStacks"))
}
- if s.RollbackConfiguration != nil {
- if err := s.RollbackConfiguration.Validate(); err != nil {
- invalidParams.AddNested("RollbackConfiguration", err.(request.ErrInvalidParams))
- }
+ if s.StackSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackSetName"))
}
- 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 s.OperationPreferences != nil {
+ if err := s.OperationPreferences.Validate(); err != nil {
+ invalidParams.AddNested("OperationPreferences", err.(request.ErrInvalidParams))
}
}
@@ -4919,366 +7623,292 @@ func (s *CreateChangeSetInput) Validate() error {
return nil
}
-// SetCapabilities sets the Capabilities field's value.
-func (s *CreateChangeSetInput) SetCapabilities(v []*string) *CreateChangeSetInput {
- s.Capabilities = v
+// SetAccounts sets the Accounts field's value.
+func (s *DeleteStackInstancesInput) SetAccounts(v []*string) *DeleteStackInstancesInput {
+ s.Accounts = v
return s
}
-// SetChangeSetName sets the ChangeSetName field's value.
-func (s *CreateChangeSetInput) SetChangeSetName(v string) *CreateChangeSetInput {
- s.ChangeSetName = &v
+// SetDeploymentTargets sets the DeploymentTargets field's value.
+func (s *DeleteStackInstancesInput) SetDeploymentTargets(v *DeploymentTargets) *DeleteStackInstancesInput {
+ s.DeploymentTargets = v
return s
}
-// SetChangeSetType sets the ChangeSetType field's value.
-func (s *CreateChangeSetInput) SetChangeSetType(v string) *CreateChangeSetInput {
- s.ChangeSetType = &v
+// SetOperationId sets the OperationId field's value.
+func (s *DeleteStackInstancesInput) SetOperationId(v string) *DeleteStackInstancesInput {
+ s.OperationId = &v
return s
}
-// SetClientToken sets the ClientToken field's value.
-func (s *CreateChangeSetInput) SetClientToken(v string) *CreateChangeSetInput {
- s.ClientToken = &v
+// SetOperationPreferences sets the OperationPreferences field's value.
+func (s *DeleteStackInstancesInput) SetOperationPreferences(v *StackSetOperationPreferences) *DeleteStackInstancesInput {
+ s.OperationPreferences = v
return s
}
-// SetDescription sets the Description field's value.
-func (s *CreateChangeSetInput) SetDescription(v string) *CreateChangeSetInput {
- s.Description = &v
+// SetRegions sets the Regions field's value.
+func (s *DeleteStackInstancesInput) SetRegions(v []*string) *DeleteStackInstancesInput {
+ s.Regions = v
return s
}
-// SetNotificationARNs sets the NotificationARNs field's value.
-func (s *CreateChangeSetInput) SetNotificationARNs(v []*string) *CreateChangeSetInput {
- s.NotificationARNs = v
+// SetRetainStacks sets the RetainStacks field's value.
+func (s *DeleteStackInstancesInput) SetRetainStacks(v bool) *DeleteStackInstancesInput {
+ s.RetainStacks = &v
return s
}
-// SetParameters sets the Parameters field's value.
-func (s *CreateChangeSetInput) SetParameters(v []*Parameter) *CreateChangeSetInput {
- s.Parameters = v
+// SetStackSetName sets the StackSetName field's value.
+func (s *DeleteStackInstancesInput) SetStackSetName(v string) *DeleteStackInstancesInput {
+ s.StackSetName = &v
return s
}
-// SetResourceTypes sets the ResourceTypes field's value.
-func (s *CreateChangeSetInput) SetResourceTypes(v []*string) *CreateChangeSetInput {
- s.ResourceTypes = v
- return s
+type DeleteStackInstancesOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The unique identifier for this stack set operation.
+ OperationId *string `min:"1" type:"string"`
}
-// SetRoleARN sets the RoleARN field's value.
-func (s *CreateChangeSetInput) SetRoleARN(v string) *CreateChangeSetInput {
- s.RoleARN = &v
- return s
+// String returns the string representation
+func (s DeleteStackInstancesOutput) String() string {
+ return awsutil.Prettify(s)
}
-// SetRollbackConfiguration sets the RollbackConfiguration field's value.
-func (s *CreateChangeSetInput) SetRollbackConfiguration(v *RollbackConfiguration) *CreateChangeSetInput {
- s.RollbackConfiguration = v
- return s
+// GoString returns the string representation
+func (s DeleteStackInstancesOutput) GoString() string {
+ return s.String()
}
-// SetStackName sets the StackName field's value.
-func (s *CreateChangeSetInput) SetStackName(v string) *CreateChangeSetInput {
- s.StackName = &v
+// SetOperationId sets the OperationId field's value.
+func (s *DeleteStackInstancesOutput) SetOperationId(v string) *DeleteStackInstancesOutput {
+ s.OperationId = &v
return s
}
-// SetTags sets the Tags field's value.
-func (s *CreateChangeSetInput) SetTags(v []*Tag) *CreateChangeSetInput {
- s.Tags = v
- return s
+type DeleteStackOutput struct {
+ _ struct{} `type:"structure"`
}
-// SetTemplateBody sets the TemplateBody field's value.
-func (s *CreateChangeSetInput) SetTemplateBody(v string) *CreateChangeSetInput {
- s.TemplateBody = &v
- return s
+// String returns the string representation
+func (s DeleteStackOutput) String() string {
+ return awsutil.Prettify(s)
}
-// SetTemplateURL sets the TemplateURL field's value.
-func (s *CreateChangeSetInput) SetTemplateURL(v string) *CreateChangeSetInput {
- s.TemplateURL = &v
- return s
+// GoString returns the string representation
+func (s DeleteStackOutput) GoString() string {
+ return s.String()
}
-// SetUsePreviousTemplate sets the UsePreviousTemplate field's value.
-func (s *CreateChangeSetInput) SetUsePreviousTemplate(v bool) *CreateChangeSetInput {
- s.UsePreviousTemplate = &v
+type DeleteStackSetInput struct {
+ _ struct{} `type:"structure"`
+
+ // The name or unique ID of the stack set that you're deleting. You can obtain
+ // this value by running ListStackSets.
+ //
+ // StackSetName is a required field
+ StackSetName *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteStackSetInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteStackSetInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteStackSetInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteStackSetInput"}
+ if s.StackSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetStackSetName sets the StackSetName field's value.
+func (s *DeleteStackSetInput) SetStackSetName(v string) *DeleteStackSetInput {
+ s.StackSetName = &v
return s
}
-// The output for the CreateChangeSet action.
-type CreateChangeSetOutput struct {
+type DeleteStackSetOutput struct {
_ struct{} `type:"structure"`
+}
- // The Amazon Resource Name (ARN) of the change set.
- Id *string `min:"1" type:"string"`
+// String returns the string representation
+func (s DeleteStackSetOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteStackSetOutput) GoString() string {
+ return s.String()
+}
+
+// [Service-managed permissions] The AWS Organizations accounts to which StackSets
+// deploys. StackSets does not deploy stack instances to the organization master
+// account, even if the master account is in your organization or in an OU in
+// your organization.
+//
+// For update operations, you can specify either Accounts or OrganizationalUnitIds.
+// For create and delete operations, specify OrganizationalUnitIds.
+type DeploymentTargets struct {
+ _ struct{} `type:"structure"`
- // The unique ID of the stack.
- StackId *string `type:"string"`
+ // The names of one or more AWS accounts for which you want to deploy stack
+ // set updates.
+ Accounts []*string `type:"list"`
+
+ // The organization root ID or organizational unit (OU) IDs to which StackSets
+ // deploys.
+ OrganizationalUnitIds []*string `type:"list"`
}
// String returns the string representation
-func (s CreateChangeSetOutput) String() string {
+func (s DeploymentTargets) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s CreateChangeSetOutput) GoString() string {
+func (s DeploymentTargets) GoString() string {
return s.String()
}
-// SetId sets the Id field's value.
-func (s *CreateChangeSetOutput) SetId(v string) *CreateChangeSetOutput {
- s.Id = &v
+// SetAccounts sets the Accounts field's value.
+func (s *DeploymentTargets) SetAccounts(v []*string) *DeploymentTargets {
+ s.Accounts = v
return s
}
-// SetStackId sets the StackId field's value.
-func (s *CreateChangeSetOutput) SetStackId(v string) *CreateChangeSetOutput {
- s.StackId = &v
+// SetOrganizationalUnitIds sets the OrganizationalUnitIds field's value.
+func (s *DeploymentTargets) SetOrganizationalUnitIds(v []*string) *DeploymentTargets {
+ s.OrganizationalUnitIds = v
return s
}
-// The input for CreateStack action.
-type CreateStackInput struct {
+type DeregisterTypeInput struct {
_ struct{} `type:"structure"`
- // In some cases, you must explicity acknowledge that your stack template contains
- // certain capabilities in order for AWS CloudFormation to create the stack.
- //
- // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM Some stack templates might include
- // resources that can affect permissions in your AWS account; for example,
- // by creating new AWS Identity and Access Management (IAM) users. For those
- // stacks, you must explicitly acknowledge this by specifying one of these
- // capabilities. The following IAM resources require you to specify either
- // the CAPABILITY_IAM or CAPABILITY_NAMED_IAM capability. If you have IAM
- // resources, you can specify either capability. If you have IAM resources
- // with custom names, you must specify CAPABILITY_NAMED_IAM. If you don't
- // specify either of these capabilities, AWS CloudFormation returns an InsufficientCapabilities
- // error. If your stack template contains these resources, we recommend that
- // you review all permissions associated with them and edit their permissions
- // if necessary. AWS::IAM::AccessKey (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html)
- // AWS::IAM::Group (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html)
- // AWS::IAM::InstanceProfile (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html)
- // AWS::IAM::Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html)
- // AWS::IAM::Role (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)
- // AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html)
- // AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html)
- // For more information, see Acknowledging IAM Resources in AWS CloudFormation
- // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities).
- //
- // * CAPABILITY_AUTO_EXPAND Some template contain macros. Macros perform
- // custom processing on templates; this can include simple actions like find-and-replace
- // operations, all the way to extensive transformations of entire templates.
- // Because of this, users typically create a change set from the processed
- // template, so that they can review the changes resulting from the macros
- // before actually creating the stack. If your stack template contains one
- // or more macros, and you choose to create a stack directly from the processed
- // template, without first reviewing the resulting changes in a change set,
- // you must acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html)
- // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html)
- // transforms, which are macros hosted by AWS CloudFormation. Change sets
- // do not currently support nested stacks. If you want to create a stack
- // from a stack template that contains macros and nested stacks, you must
- // create the stack directly from the template using this capability. You
- // should only create stacks directly from a stack template that contains
- // macros if you know what processing the macro performs. Each macro relies
- // on an underlying Lambda service function for processing stack templates.
- // Be aware that the Lambda function owner can update the function operation
- // without AWS CloudFormation being notified. For more information, see Using
- // AWS CloudFormation Macros to Perform Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html).
- Capabilities []*string `type:"list"`
-
- // A unique identifier for this CreateStack request. Specify this token if you
- // plan to retry requests so that AWS CloudFormation knows that you're not attempting
- // to create a stack with the same name. You might retry CreateStack requests
- // to ensure that AWS CloudFormation successfully received them.
- //
- // All events triggered by a given stack operation are assigned the same client
- // request token, which you can use to track operations. For example, if you
- // execute a CreateStack operation with the token token1, then all the StackEvents
- // generated by that operation will have ClientRequestToken set as token1.
+ // The Amazon Resource Name (ARN) of the type.
//
- // In the console, stack operations display the client request token on the
- // Events tab. Stack operations that are initiated from the console use the
- // token format Console-StackOperation-ID, which helps you easily identify the
- // stack operation . For example, if you create a stack using the console, each
- // stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002.
- ClientRequestToken *string `min:"1" type:"string"`
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ Arn *string `type:"string"`
- // Set to true to disable rollback of the stack if stack creation failed. You
- // can specify either DisableRollback or OnFailure, but not both.
+ // The kind of type.
//
- // 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.
+ // Currently the only valid value is RESOURCE.
//
- // 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).
- NotificationARNs []*string `type:"list"`
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ Type *string `type:"string" enum:"RegistryType"`
- // Determines what action will be taken if stack creation fails. This must be
- // one of: DO_NOTHING, ROLLBACK, or DELETE. You can specify either OnFailure
- // or DisableRollback, but not both.
+ // The name of the type.
//
- // Default: ROLLBACK
- OnFailure *string `type:"string" enum:"OnFailure"`
-
- // A list of Parameter structures that specify input parameters for the stack.
- // For more information, see the Parameter (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html)
- // data type.
- Parameters []*Parameter `type:"list"`
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ TypeName *string `min:"10" type:"string"`
- // The template resource types that you have permissions to work with for this
- // create stack action, such as AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance.
- // Use the following syntax to describe template resource types: AWS::* (for
- // all AWS resource), Custom::* (for all custom resources), Custom::logical_ID
- // (for a specific custom resource), AWS::service_name::* (for all resources
- // of a particular AWS service), and AWS::service_name::resource_logical_ID
- // (for a specific AWS resource).
- //
- // If the list of resource types doesn't include a resource that you're creating,
- // the stack creation fails. By default, AWS CloudFormation grants permissions
- // to all resource types. AWS Identity and Access Management (IAM) uses this
- // parameter for AWS CloudFormation-specific condition keys in IAM policies.
- // For more information, see Controlling Access with AWS Identity and Access
- // Management (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html).
- ResourceTypes []*string `type:"list"`
+ // The ID of a specific version of the type. The version ID is the value at
+ // the end of the Amazon Resource Name (ARN) assigned to the type version when
+ // it is registered.
+ VersionId *string `min:"1" type:"string"`
+}
- // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM)
- // role that AWS CloudFormation assumes to create the stack. AWS CloudFormation
- // uses the role's credentials to make calls on your behalf. AWS CloudFormation
- // always uses this role for all future operations on the stack. As long as
- // users have permission to operate on the stack, AWS CloudFormation uses this
- // role even if the users don't have permission to pass it. Ensure that the
- // role grants least privilege.
- //
- // If you don't specify a value, AWS CloudFormation uses the role that was previously
- // associated with the stack. If no role is available, AWS CloudFormation uses
- // a temporary session that is generated from your user credentials.
- RoleARN *string `min:"20" type:"string"`
+// String returns the string representation
+func (s DeregisterTypeInput) String() string {
+ return awsutil.Prettify(s)
+}
- // The rollback triggers for AWS CloudFormation to monitor during stack creation
- // and updating operations, and for the specified monitoring period afterwards.
- RollbackConfiguration *RollbackConfiguration `type:"structure"`
+// GoString returns the string representation
+func (s DeregisterTypeInput) GoString() string {
+ return s.String()
+}
- // The name that is associated with the stack. The name must be unique in the
- // region in which you are creating the stack.
- //
- // A stack name can contain only alphanumeric characters (case sensitive) and
- // hyphens. It must start with an alphabetic character and cannot be longer
- // than 128 characters.
- //
- // StackName is a required field
- StackName *string `type:"string" required:"true"`
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeregisterTypeInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeregisterTypeInput"}
+ if s.TypeName != nil && len(*s.TypeName) < 10 {
+ invalidParams.Add(request.NewErrParamMinLen("TypeName", 10))
+ }
+ if s.VersionId != nil && len(*s.VersionId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
+ }
- // Structure containing the stack policy body. For more information, go to Prevent
- // Updates to Stack Resources (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html)
- // in the AWS CloudFormation User Guide. You can specify either the StackPolicyBody
- // or the StackPolicyURL parameter, but not both.
- StackPolicyBody *string `min:"1" type:"string"`
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
- // Location of a file containing the stack policy. The URL must point to a policy
- // (maximum size: 16 KB) located in an S3 bucket in the same region as the stack.
- // You can specify either the StackPolicyBody or the StackPolicyURL parameter,
- // but not both.
- StackPolicyURL *string `min:"1" type:"string"`
+// SetArn sets the Arn field's value.
+func (s *DeregisterTypeInput) SetArn(v string) *DeregisterTypeInput {
+ s.Arn = &v
+ return s
+}
- // Key-value pairs to associate with this stack. AWS CloudFormation also propagates
- // these tags to the resources created in the stack. A maximum number of 50
- // tags can be specified.
- Tags []*Tag `type:"list"`
+// SetType sets the Type field's value.
+func (s *DeregisterTypeInput) SetType(v string) *DeregisterTypeInput {
+ s.Type = &v
+ return s
+}
- // Structure containing the template body with a minimum length of 1 byte and
- // a maximum length of 51,200 bytes. For more information, go to Template Anatomy
- // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
- // in the AWS CloudFormation User Guide.
- //
- // Conditional: You must specify either the TemplateBody or the TemplateURL
- // parameter, but not both.
- TemplateBody *string `min:"1" type:"string"`
+// SetTypeName sets the TypeName field's value.
+func (s *DeregisterTypeInput) SetTypeName(v string) *DeregisterTypeInput {
+ s.TypeName = &v
+ return s
+}
- // Location of file containing the template body. The URL must point to a template
- // (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more
- // information, go to the Template Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
- // in the AWS CloudFormation User Guide.
- //
- // Conditional: You must specify either the TemplateBody or the TemplateURL
- // parameter, but not both.
- TemplateURL *string `min:"1" type:"string"`
+// SetVersionId sets the VersionId field's value.
+func (s *DeregisterTypeInput) SetVersionId(v string) *DeregisterTypeInput {
+ s.VersionId = &v
+ return s
+}
- // The amount of time that can pass before the stack status becomes CREATE_FAILED;
- // if DisableRollback is not set or is set to false, the stack will be rolled
- // back.
- TimeoutInMinutes *int64 `min:"1" type:"integer"`
+type DeregisterTypeOutput struct {
+ _ struct{} `type:"structure"`
}
// String returns the string representation
-func (s CreateStackInput) String() string {
+func (s DeregisterTypeOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s CreateStackInput) GoString() string {
+func (s DeregisterTypeOutput) GoString() string {
return s.String()
}
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateStackInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateStackInput"}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
- }
- if s.RoleARN != nil && len(*s.RoleARN) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20))
- }
- if s.StackName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackName"))
- }
- if s.StackPolicyBody != nil && len(*s.StackPolicyBody) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StackPolicyBody", 1))
- }
- if s.StackPolicyURL != nil && len(*s.StackPolicyURL) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StackPolicyURL", 1))
- }
- if s.TemplateBody != nil && len(*s.TemplateBody) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1))
- }
- if s.TemplateURL != nil && len(*s.TemplateURL) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1))
- }
- if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 1 {
- invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 1))
- }
- if s.RollbackConfiguration != nil {
- if err := s.RollbackConfiguration.Validate(); err != nil {
- invalidParams.AddNested("RollbackConfiguration", 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))
- }
- }
+// The input for the DescribeAccountLimits action.
+type DescribeAccountLimitsInput struct {
+ _ struct{} `type:"structure"`
+
+ // A string that identifies the next page of limits that you want to retrieve.
+ NextToken *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeAccountLimitsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeAccountLimitsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeAccountLimitsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeAccountLimitsInput"}
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
if invalidParams.Len() > 0 {
@@ -5287,581 +7917,581 @@ func (s *CreateStackInput) Validate() error {
return nil
}
-// SetCapabilities sets the Capabilities field's value.
-func (s *CreateStackInput) SetCapabilities(v []*string) *CreateStackInput {
- s.Capabilities = v
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeAccountLimitsInput) SetNextToken(v string) *DescribeAccountLimitsInput {
+ s.NextToken = &v
return s
}
-// SetClientRequestToken sets the ClientRequestToken field's value.
-func (s *CreateStackInput) SetClientRequestToken(v string) *CreateStackInput {
- s.ClientRequestToken = &v
- return s
-}
+// The output for the DescribeAccountLimits action.
+type DescribeAccountLimitsOutput struct {
+ _ struct{} `type:"structure"`
-// SetDisableRollback sets the DisableRollback field's value.
-func (s *CreateStackInput) SetDisableRollback(v bool) *CreateStackInput {
- s.DisableRollback = &v
- return s
-}
+ // An account limit structure that contain a list of AWS CloudFormation account
+ // limits and their values.
+ AccountLimits []*AccountLimit `type:"list"`
-// SetEnableTerminationProtection sets the EnableTerminationProtection field's value.
-func (s *CreateStackInput) SetEnableTerminationProtection(v bool) *CreateStackInput {
- s.EnableTerminationProtection = &v
- return s
+ // If the output exceeds 1 MB in size, a string that identifies the next page
+ // of limits. If no additional page exists, this value is null.
+ NextToken *string `min:"1" type:"string"`
}
-// SetNotificationARNs sets the NotificationARNs field's value.
-func (s *CreateStackInput) SetNotificationARNs(v []*string) *CreateStackInput {
- s.NotificationARNs = v
- return s
+// String returns the string representation
+func (s DescribeAccountLimitsOutput) String() string {
+ return awsutil.Prettify(s)
}
-// SetOnFailure sets the OnFailure field's value.
-func (s *CreateStackInput) SetOnFailure(v string) *CreateStackInput {
- s.OnFailure = &v
- return s
+// GoString returns the string representation
+func (s DescribeAccountLimitsOutput) GoString() string {
+ return s.String()
}
-// SetParameters sets the Parameters field's value.
-func (s *CreateStackInput) SetParameters(v []*Parameter) *CreateStackInput {
- s.Parameters = v
+// SetAccountLimits sets the AccountLimits field's value.
+func (s *DescribeAccountLimitsOutput) SetAccountLimits(v []*AccountLimit) *DescribeAccountLimitsOutput {
+ s.AccountLimits = v
return s
}
-// SetResourceTypes sets the ResourceTypes field's value.
-func (s *CreateStackInput) SetResourceTypes(v []*string) *CreateStackInput {
- s.ResourceTypes = v
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeAccountLimitsOutput) SetNextToken(v string) *DescribeAccountLimitsOutput {
+ s.NextToken = &v
return s
}
-// SetRoleARN sets the RoleARN field's value.
-func (s *CreateStackInput) SetRoleARN(v string) *CreateStackInput {
- s.RoleARN = &v
- return s
-}
+// The input for the DescribeChangeSet action.
+type DescribeChangeSetInput struct {
+ _ struct{} `type:"structure"`
-// SetRollbackConfiguration sets the RollbackConfiguration field's value.
-func (s *CreateStackInput) SetRollbackConfiguration(v *RollbackConfiguration) *CreateStackInput {
- s.RollbackConfiguration = v
- return s
-}
+ // The name or Amazon Resource Name (ARN) of the change set that you want to
+ // describe.
+ //
+ // ChangeSetName is a required field
+ ChangeSetName *string `min:"1" type:"string" required:"true"`
-// SetStackName sets the StackName field's value.
-func (s *CreateStackInput) SetStackName(v string) *CreateStackInput {
- s.StackName = &v
- return s
+ // A string (provided by the DescribeChangeSet response output) that identifies
+ // the next page of information that you want to retrieve.
+ NextToken *string `min:"1" type:"string"`
+
+ // If you specified the name of a change set, specify the stack name or ID (ARN)
+ // of the change set you want to describe.
+ StackName *string `min:"1" type:"string"`
}
-// SetStackPolicyBody sets the StackPolicyBody field's value.
-func (s *CreateStackInput) SetStackPolicyBody(v string) *CreateStackInput {
- s.StackPolicyBody = &v
- return s
+// String returns the string representation
+func (s DescribeChangeSetInput) String() string {
+ return awsutil.Prettify(s)
}
-// SetStackPolicyURL sets the StackPolicyURL field's value.
-func (s *CreateStackInput) SetStackPolicyURL(v string) *CreateStackInput {
- s.StackPolicyURL = &v
- return s
+// GoString returns the string representation
+func (s DescribeChangeSetInput) GoString() string {
+ return s.String()
}
-// SetTags sets the Tags field's value.
-func (s *CreateStackInput) SetTags(v []*Tag) *CreateStackInput {
- s.Tags = v
- return s
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeChangeSetInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeChangeSetInput"}
+ if s.ChangeSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("ChangeSetName"))
+ }
+ if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
+ }
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
+ }
+ if s.StackName != nil && len(*s.StackName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
}
-// SetTemplateBody sets the TemplateBody field's value.
-func (s *CreateStackInput) SetTemplateBody(v string) *CreateStackInput {
- s.TemplateBody = &v
+// SetChangeSetName sets the ChangeSetName field's value.
+func (s *DescribeChangeSetInput) SetChangeSetName(v string) *DescribeChangeSetInput {
+ s.ChangeSetName = &v
return s
}
-// SetTemplateURL sets the TemplateURL field's value.
-func (s *CreateStackInput) SetTemplateURL(v string) *CreateStackInput {
- s.TemplateURL = &v
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeChangeSetInput) SetNextToken(v string) *DescribeChangeSetInput {
+ s.NextToken = &v
return s
}
-// SetTimeoutInMinutes sets the TimeoutInMinutes field's value.
-func (s *CreateStackInput) SetTimeoutInMinutes(v int64) *CreateStackInput {
- s.TimeoutInMinutes = &v
+// SetStackName sets the StackName field's value.
+func (s *DescribeChangeSetInput) SetStackName(v string) *DescribeChangeSetInput {
+ s.StackName = &v
return s
}
-type CreateStackInstancesInput struct {
+// The output for the DescribeChangeSet action.
+type DescribeChangeSetOutput struct {
_ struct{} `type:"structure"`
- // The names of one or more AWS accounts that you want to create stack instances
- // in the specified region(s) for.
- //
- // Accounts is a required field
- Accounts []*string `type:"list" required:"true"`
+ // If you execute the change set, the list of capabilities that were explicitly
+ // acknowledged when the change set was created.
+ Capabilities []*string `type:"list"`
- // The unique identifier for this stack set operation.
- //
- // The operation ID also functions as an idempotency token, to ensure that AWS
- // CloudFormation performs the stack set operation only once, even if you retry
- // the request multiple times. You might retry stack set operation requests
- // to ensure that AWS CloudFormation successfully received them.
- //
- // If you don't specify an operation ID, the SDK generates one automatically.
- //
- // Repeating this stack set operation with a new operation ID retries all stack
- // instances whose status is OUTDATED.
- OperationId *string `min:"1" type:"string" idempotencyToken:"true"`
+ // The ARN of the change set.
+ ChangeSetId *string `min:"1" type:"string"`
- // Preferences for how AWS CloudFormation performs this stack set operation.
- OperationPreferences *StackSetOperationPreferences `type:"structure"`
+ // The name of the change set.
+ ChangeSetName *string `min:"1" type:"string"`
- // A list of stack set parameters whose values you want to override in the selected
- // stack instances.
- //
- // Any overridden parameter values will be applied to all stack instances in
- // the specified accounts and regions. When specifying parameters and their
- // values, be aware of how AWS CloudFormation sets parameter values during stack
- // instance operations:
- //
- // * To override the current value for a parameter, include the parameter
- // and specify its value.
- //
- // * To leave a parameter set to its present value, you can do one of the
- // following: Do not include the parameter in the list. Include the parameter
- // and specify UsePreviousValue as true. (You cannot specify both a value
- // and set UsePreviousValue to true.)
- //
- // * To set all overridden parameter back to the values specified in the
- // stack set, specify a parameter list but do not include any parameters.
- //
- // * To leave all parameters set to their present values, do not specify
- // this property at all.
- //
- // During stack set updates, any parameter values overridden for a stack instance
- // are not updated, but retain their overridden value.
- //
- // You can only override the parameter values that are specified in the stack
- // set; to add or delete a parameter itself, use UpdateStackSet (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html)
- // to update the stack set template.
- ParameterOverrides []*Parameter `type:"list"`
+ // A list of Change structures that describes the resources AWS CloudFormation
+ // changes if you execute the change set.
+ Changes []*Change `type:"list"`
- // The names of one or more regions where you want to create stack instances
- // using the specified AWS account(s).
- //
- // Regions is a required field
- Regions []*string `type:"list" required:"true"`
+ // The start time when the change set was created, in UTC.
+ CreationTime *time.Time `type:"timestamp"`
+
+ // Information about the change set.
+ Description *string `min:"1" type:"string"`
+
+ // If the change set execution status is AVAILABLE, you can execute the change
+ // set. If you can’t execute the change set, the status indicates why. For
+ // example, a change set might be in an UNAVAILABLE state because AWS CloudFormation
+ // is still creating it or in an OBSOLETE state because the stack was already
+ // updated.
+ ExecutionStatus *string `type:"string" enum:"ExecutionStatus"`
+
+ // If the output exceeds 1 MB, a string that identifies the next page of changes.
+ // If there is no additional page, this value is null.
+ NextToken *string `min:"1" type:"string"`
+
+ // The ARNs of the Amazon Simple Notification Service (Amazon SNS) topics that
+ // will be associated with the stack if you execute the change set.
+ NotificationARNs []*string `type:"list"`
+
+ // A list of Parameter structures that describes the input parameters and their
+ // values used to create the change set. For more information, see the Parameter
+ // (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html)
+ // data type.
+ Parameters []*Parameter `type:"list"`
+
+ // The rollback triggers for AWS CloudFormation to monitor during stack creation
+ // and updating operations, and for the specified monitoring period afterwards.
+ RollbackConfiguration *RollbackConfiguration `type:"structure"`
+
+ // The ARN of the stack that is associated with the change set.
+ StackId *string `type:"string"`
+
+ // The name of the stack that is associated with the change set.
+ StackName *string `type:"string"`
+
+ // The current status of the change set, such as CREATE_IN_PROGRESS, CREATE_COMPLETE,
+ // or FAILED.
+ Status *string `type:"string" enum:"ChangeSetStatus"`
+
+ // A description of the change set's status. For example, if your attempt to
+ // create a change set failed, AWS CloudFormation shows the error message.
+ StatusReason *string `type:"string"`
- // The name or unique ID of the stack set that you want to create stack instances
- // from.
- //
- // StackSetName is a required field
- StackSetName *string `type:"string" required:"true"`
+ // If you execute the change set, the tags that will be associated with the
+ // stack.
+ Tags []*Tag `type:"list"`
}
// String returns the string representation
-func (s CreateStackInstancesInput) String() string {
+func (s DescribeChangeSetOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s CreateStackInstancesInput) GoString() string {
+func (s DescribeChangeSetOutput) GoString() string {
return s.String()
}
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateStackInstancesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateStackInstancesInput"}
- if s.Accounts == nil {
- invalidParams.Add(request.NewErrParamRequired("Accounts"))
- }
- if s.OperationId != nil && len(*s.OperationId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("OperationId", 1))
- }
- if s.Regions == nil {
- invalidParams.Add(request.NewErrParamRequired("Regions"))
- }
- if s.StackSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackSetName"))
- }
- if s.OperationPreferences != nil {
- if err := s.OperationPreferences.Validate(); err != nil {
- invalidParams.AddNested("OperationPreferences", err.(request.ErrInvalidParams))
- }
- }
+// SetCapabilities sets the Capabilities field's value.
+func (s *DescribeChangeSetOutput) SetCapabilities(v []*string) *DescribeChangeSetOutput {
+ s.Capabilities = v
+ return s
+}
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
+// SetChangeSetId sets the ChangeSetId field's value.
+func (s *DescribeChangeSetOutput) SetChangeSetId(v string) *DescribeChangeSetOutput {
+ s.ChangeSetId = &v
+ return s
}
-// SetAccounts sets the Accounts field's value.
-func (s *CreateStackInstancesInput) SetAccounts(v []*string) *CreateStackInstancesInput {
- s.Accounts = v
+// SetChangeSetName sets the ChangeSetName field's value.
+func (s *DescribeChangeSetOutput) SetChangeSetName(v string) *DescribeChangeSetOutput {
+ s.ChangeSetName = &v
return s
}
-// SetOperationId sets the OperationId field's value.
-func (s *CreateStackInstancesInput) SetOperationId(v string) *CreateStackInstancesInput {
- s.OperationId = &v
+// SetChanges sets the Changes field's value.
+func (s *DescribeChangeSetOutput) SetChanges(v []*Change) *DescribeChangeSetOutput {
+ s.Changes = v
return s
}
-// SetOperationPreferences sets the OperationPreferences field's value.
-func (s *CreateStackInstancesInput) SetOperationPreferences(v *StackSetOperationPreferences) *CreateStackInstancesInput {
- s.OperationPreferences = v
+// SetCreationTime sets the CreationTime field's value.
+func (s *DescribeChangeSetOutput) SetCreationTime(v time.Time) *DescribeChangeSetOutput {
+ s.CreationTime = &v
return s
}
-// SetParameterOverrides sets the ParameterOverrides field's value.
-func (s *CreateStackInstancesInput) SetParameterOverrides(v []*Parameter) *CreateStackInstancesInput {
- s.ParameterOverrides = v
+// SetDescription sets the Description field's value.
+func (s *DescribeChangeSetOutput) SetDescription(v string) *DescribeChangeSetOutput {
+ s.Description = &v
return s
}
-// SetRegions sets the Regions field's value.
-func (s *CreateStackInstancesInput) SetRegions(v []*string) *CreateStackInstancesInput {
- s.Regions = v
+// SetExecutionStatus sets the ExecutionStatus field's value.
+func (s *DescribeChangeSetOutput) SetExecutionStatus(v string) *DescribeChangeSetOutput {
+ s.ExecutionStatus = &v
return s
}
-// SetStackSetName sets the StackSetName field's value.
-func (s *CreateStackInstancesInput) SetStackSetName(v string) *CreateStackInstancesInput {
- s.StackSetName = &v
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeChangeSetOutput) SetNextToken(v string) *DescribeChangeSetOutput {
+ s.NextToken = &v
return s
}
-type CreateStackInstancesOutput struct {
- _ struct{} `type:"structure"`
+// SetNotificationARNs sets the NotificationARNs field's value.
+func (s *DescribeChangeSetOutput) SetNotificationARNs(v []*string) *DescribeChangeSetOutput {
+ s.NotificationARNs = v
+ return s
+}
- // The unique identifier for this stack set operation.
- OperationId *string `min:"1" type:"string"`
+// SetParameters sets the Parameters field's value.
+func (s *DescribeChangeSetOutput) SetParameters(v []*Parameter) *DescribeChangeSetOutput {
+ s.Parameters = v
+ return s
}
-// String returns the string representation
-func (s CreateStackInstancesOutput) String() string {
- return awsutil.Prettify(s)
+// SetRollbackConfiguration sets the RollbackConfiguration field's value.
+func (s *DescribeChangeSetOutput) SetRollbackConfiguration(v *RollbackConfiguration) *DescribeChangeSetOutput {
+ s.RollbackConfiguration = v
+ return s
}
-// GoString returns the string representation
-func (s CreateStackInstancesOutput) GoString() string {
- return s.String()
+// SetStackId sets the StackId field's value.
+func (s *DescribeChangeSetOutput) SetStackId(v string) *DescribeChangeSetOutput {
+ s.StackId = &v
+ return s
}
-// SetOperationId sets the OperationId field's value.
-func (s *CreateStackInstancesOutput) SetOperationId(v string) *CreateStackInstancesOutput {
- s.OperationId = &v
+// SetStackName sets the StackName field's value.
+func (s *DescribeChangeSetOutput) SetStackName(v string) *DescribeChangeSetOutput {
+ s.StackName = &v
return s
}
-// The output for a CreateStack action.
-type CreateStackOutput struct {
+// SetStatus sets the Status field's value.
+func (s *DescribeChangeSetOutput) SetStatus(v string) *DescribeChangeSetOutput {
+ s.Status = &v
+ return s
+}
+
+// SetStatusReason sets the StatusReason field's value.
+func (s *DescribeChangeSetOutput) SetStatusReason(v string) *DescribeChangeSetOutput {
+ s.StatusReason = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *DescribeChangeSetOutput) SetTags(v []*Tag) *DescribeChangeSetOutput {
+ s.Tags = v
+ return s
+}
+
+type DescribeStackDriftDetectionStatusInput struct {
_ struct{} `type:"structure"`
- // Unique identifier of the stack.
- StackId *string `type:"string"`
+ // The ID of the drift detection results of this operation.
+ //
+ // AWS CloudFormation generates new results, with a new drift detection ID,
+ // each time this operation is run. However, the number of drift results AWS
+ // CloudFormation retains for any given stack, and for how long, may vary.
+ //
+ // StackDriftDetectionId is a required field
+ StackDriftDetectionId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
-func (s CreateStackOutput) String() string {
+func (s DescribeStackDriftDetectionStatusInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s CreateStackOutput) GoString() string {
+func (s DescribeStackDriftDetectionStatusInput) GoString() string {
return s.String()
}
-// SetStackId sets the StackId field's value.
-func (s *CreateStackOutput) SetStackId(v string) *CreateStackOutput {
- s.StackId = &v
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeStackDriftDetectionStatusInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeStackDriftDetectionStatusInput"}
+ if s.StackDriftDetectionId == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackDriftDetectionId"))
+ }
+ if s.StackDriftDetectionId != nil && len(*s.StackDriftDetectionId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("StackDriftDetectionId", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetStackDriftDetectionId sets the StackDriftDetectionId field's value.
+func (s *DescribeStackDriftDetectionStatusInput) SetStackDriftDetectionId(v string) *DescribeStackDriftDetectionStatusInput {
+ s.StackDriftDetectionId = &v
return s
}
-type CreateStackSetInput struct {
+type DescribeStackDriftDetectionStatusOutput struct {
_ struct{} `type:"structure"`
- // The Amazon Resource Number (ARN) of the IAM role to use to create this stack
- // set.
- //
- // Specify an IAM role only if you are using customized administrator roles
- // to control which users or groups can manage specific stack sets within the
- // same administrator account. For more information, see Prerequisites: Granting
- // Permissions for Stack Set Operations (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html)
- // in the AWS CloudFormation User Guide.
- AdministrationRoleARN *string `min:"20" type:"string"`
-
- // In some cases, you must explicity acknowledge that your stack set template
- // contains certain capabilities in order for AWS CloudFormation to create the
- // stack set and related stack instances.
+ // The status of the stack drift detection operation.
//
- // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM Some stack templates might include
- // resources that can affect permissions in your AWS account; for example,
- // by creating new AWS Identity and Access Management (IAM) users. For those
- // stack sets, you must explicitly acknowledge this by specifying one of
- // these capabilities. The following IAM resources require you to specify
- // either the CAPABILITY_IAM or CAPABILITY_NAMED_IAM capability. If you have
- // IAM resources, you can specify either capability. If you have IAM resources
- // with custom names, you must specify CAPABILITY_NAMED_IAM. If you don't
- // specify either of these capabilities, AWS CloudFormation returns an InsufficientCapabilities
- // error. If your stack template contains these resources, we recommend that
- // you review all permissions associated with them and edit their permissions
- // if necessary. AWS::IAM::AccessKey (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html)
- // AWS::IAM::Group (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html)
- // AWS::IAM::InstanceProfile (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html)
- // AWS::IAM::Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html)
- // AWS::IAM::Role (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)
- // AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html)
- // AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html)
- // For more information, see Acknowledging IAM Resources in AWS CloudFormation
- // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities).
+ // * DETECTION_COMPLETE: The stack drift detection operation has successfully
+ // completed for all resources in the stack that support drift detection.
+ // (Resources that do not currently support stack detection remain unchecked.)
+ // If you specified logical resource IDs for AWS CloudFormation to use as
+ // a filter for the stack drift detection operation, only the resources with
+ // those logical IDs are checked for drift.
//
- // * CAPABILITY_AUTO_EXPAND Some templates contain macros. If your stack
- // template contains one or more macros, and you choose to create a stack
- // directly from the processed template, without first reviewing the resulting
- // changes in a change set, you must acknowledge this capability. For more
- // information, see Using AWS CloudFormation Macros to Perform Custom Processing
- // on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html).
- // Stack sets do not currently support macros in stack templates. (This includes
- // the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html)
- // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html)
- // transforms, which are macros hosted by AWS CloudFormation.) Even if you
- // specify this capability, if you include a macro in your template the stack
- // set operation will fail.
- Capabilities []*string `type:"list"`
-
- // A unique identifier for this CreateStackSet request. Specify this token if
- // you plan to retry requests so that AWS CloudFormation knows that you're not
- // attempting to create another stack set with the same name. You might retry
- // CreateStackSet requests to ensure that AWS CloudFormation successfully received
- // them.
+ // * DETECTION_FAILED: The stack drift detection operation has failed for
+ // at least one resource in the stack. Results will be available for resources
+ // on which AWS CloudFormation successfully completed drift detection.
//
- // If you don't specify an operation ID, the SDK generates one automatically.
- ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
-
- // A description of the stack set. You can use the description to identify the
- // stack set's purpose or other important information.
- Description *string `min:"1" type:"string"`
-
- // The name of the IAM execution role to use to create the stack set. If you
- // do not specify an execution role, AWS CloudFormation uses the AWSCloudFormationStackSetExecutionRole
- // role for the stack set operation.
+ // * DETECTION_IN_PROGRESS: The stack drift detection operation is currently
+ // in progress.
//
- // Specify an IAM role only if you are using customized execution roles to control
- // which stack resources users and groups can include in their stack sets.
- ExecutionRoleName *string `min:"1" type:"string"`
+ // DetectionStatus is a required field
+ DetectionStatus *string `type:"string" required:"true" enum:"StackDriftDetectionStatus"`
- // The input parameters for the stack set template.
- Parameters []*Parameter `type:"list"`
+ // The reason the stack drift detection operation has its current status.
+ DetectionStatusReason *string `type:"string"`
- // The name to associate with the stack set. The name must be unique in the
- // region where you create your stack set.
+ // Total number of stack resources that have drifted. This is NULL until the
+ // drift detection operation reaches a status of DETECTION_COMPLETE. This value
+ // will be 0 for stacks whose drift status is IN_SYNC.
+ DriftedStackResourceCount *int64 `type:"integer"`
+
+ // The ID of the drift detection results of this operation.
//
- // A stack name can contain only alphanumeric characters (case-sensitive) and
- // hyphens. It must start with an alphabetic character and can't be longer than
- // 128 characters.
+ // AWS CloudFormation generates new results, with a new drift detection ID,
+ // each time this operation is run. However, the number of reports AWS CloudFormation
+ // retains for any given stack, and for how long, may vary.
//
- // StackSetName is a required field
- StackSetName *string `type:"string" required:"true"`
+ // StackDriftDetectionId is a required field
+ StackDriftDetectionId *string `min:"1" type:"string" required:"true"`
- // The key-value pairs to associate with this stack set and the stacks created
- // from it. AWS CloudFormation also propagates these tags to supported resources
- // that are created in the stacks. A maximum number of 50 tags can be specified.
+ // Status of the stack's actual configuration compared to its expected configuration.
//
- // If you specify tags as part of a CreateStackSet action, AWS CloudFormation
- // checks to see if you have the required IAM permission to tag resources. If
- // you don't, the entire CreateStackSet action fails with an access denied error,
- // and the stack set is not created.
- Tags []*Tag `type:"list"`
+ // * DRIFTED: The stack differs from its expected template configuration.
+ // A stack is considered to have drifted if one or more of its resources
+ // have drifted.
+ //
+ // * NOT_CHECKED: AWS CloudFormation has not checked if the stack differs
+ // from its expected template configuration.
+ //
+ // * IN_SYNC: The stack's actual configuration matches its expected template
+ // configuration.
+ //
+ // * UNKNOWN: This value is reserved for future use.
+ StackDriftStatus *string `type:"string" enum:"StackDriftStatus"`
- // The structure that contains the template body, with a minimum length of 1
- // byte and a maximum length of 51,200 bytes. For more information, see Template
- // Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
- // in the AWS CloudFormation User Guide.
+ // The ID of the stack.
//
- // Conditional: You must specify either the TemplateBody or the TemplateURL
- // parameter, but not both.
- TemplateBody *string `min:"1" type:"string"`
+ // StackId is a required field
+ StackId *string `type:"string" required:"true"`
- // The location of the file that contains the template body. The URL must point
- // to a template (maximum size: 460,800 bytes) that's located in an Amazon S3
- // bucket. For more information, see Template Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
- // in the AWS CloudFormation User Guide.
+ // Time at which the stack drift detection operation was initiated.
//
- // Conditional: You must specify either the TemplateBody or the TemplateURL
- // parameter, but not both.
- TemplateURL *string `min:"1" type:"string"`
+ // Timestamp is a required field
+ Timestamp *time.Time `type:"timestamp" required:"true"`
}
// String returns the string representation
-func (s CreateStackSetInput) String() string {
+func (s DescribeStackDriftDetectionStatusOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s CreateStackSetInput) GoString() string {
+func (s DescribeStackDriftDetectionStatusOutput) GoString() string {
return s.String()
}
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateStackSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateStackSetInput"}
- if s.AdministrationRoleARN != nil && len(*s.AdministrationRoleARN) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("AdministrationRoleARN", 20))
- }
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
- }
- if s.Description != nil && len(*s.Description) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Description", 1))
- }
- if s.ExecutionRoleName != nil && len(*s.ExecutionRoleName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleName", 1))
- }
- if s.StackSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackSetName"))
- }
- if s.TemplateBody != nil && len(*s.TemplateBody) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1))
- }
- if s.TemplateURL != nil && len(*s.TemplateURL) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 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
+// SetDetectionStatus sets the DetectionStatus field's value.
+func (s *DescribeStackDriftDetectionStatusOutput) SetDetectionStatus(v string) *DescribeStackDriftDetectionStatusOutput {
+ s.DetectionStatus = &v
+ return s
}
-// SetAdministrationRoleARN sets the AdministrationRoleARN field's value.
-func (s *CreateStackSetInput) SetAdministrationRoleARN(v string) *CreateStackSetInput {
- s.AdministrationRoleARN = &v
+// SetDetectionStatusReason sets the DetectionStatusReason field's value.
+func (s *DescribeStackDriftDetectionStatusOutput) SetDetectionStatusReason(v string) *DescribeStackDriftDetectionStatusOutput {
+ s.DetectionStatusReason = &v
return s
}
-// SetCapabilities sets the Capabilities field's value.
-func (s *CreateStackSetInput) SetCapabilities(v []*string) *CreateStackSetInput {
- s.Capabilities = v
+// SetDriftedStackResourceCount sets the DriftedStackResourceCount field's value.
+func (s *DescribeStackDriftDetectionStatusOutput) SetDriftedStackResourceCount(v int64) *DescribeStackDriftDetectionStatusOutput {
+ s.DriftedStackResourceCount = &v
return s
}
-// SetClientRequestToken sets the ClientRequestToken field's value.
-func (s *CreateStackSetInput) SetClientRequestToken(v string) *CreateStackSetInput {
- s.ClientRequestToken = &v
+// SetStackDriftDetectionId sets the StackDriftDetectionId field's value.
+func (s *DescribeStackDriftDetectionStatusOutput) SetStackDriftDetectionId(v string) *DescribeStackDriftDetectionStatusOutput {
+ s.StackDriftDetectionId = &v
return s
}
-// SetDescription sets the Description field's value.
-func (s *CreateStackSetInput) SetDescription(v string) *CreateStackSetInput {
- s.Description = &v
+// SetStackDriftStatus sets the StackDriftStatus field's value.
+func (s *DescribeStackDriftDetectionStatusOutput) SetStackDriftStatus(v string) *DescribeStackDriftDetectionStatusOutput {
+ s.StackDriftStatus = &v
return s
}
-// SetExecutionRoleName sets the ExecutionRoleName field's value.
-func (s *CreateStackSetInput) SetExecutionRoleName(v string) *CreateStackSetInput {
- s.ExecutionRoleName = &v
+// SetStackId sets the StackId field's value.
+func (s *DescribeStackDriftDetectionStatusOutput) SetStackId(v string) *DescribeStackDriftDetectionStatusOutput {
+ s.StackId = &v
return s
}
-// SetParameters sets the Parameters field's value.
-func (s *CreateStackSetInput) SetParameters(v []*Parameter) *CreateStackSetInput {
- s.Parameters = v
+// SetTimestamp sets the Timestamp field's value.
+func (s *DescribeStackDriftDetectionStatusOutput) SetTimestamp(v time.Time) *DescribeStackDriftDetectionStatusOutput {
+ s.Timestamp = &v
return s
}
-// SetStackSetName sets the StackSetName field's value.
-func (s *CreateStackSetInput) SetStackSetName(v string) *CreateStackSetInput {
- s.StackSetName = &v
- return s
+// The input for DescribeStackEvents action.
+type DescribeStackEventsInput struct {
+ _ struct{} `type:"structure"`
+
+ // A string that identifies the next page of events that you want to retrieve.
+ NextToken *string `min:"1" type:"string"`
+
+ // The name or the unique stack ID that is associated with the stack, which
+ // are not always interchangeable:
+ //
+ // * Running stacks: You can specify either the stack's name or its unique
+ // stack ID.
+ //
+ // * Deleted stacks: You must specify the unique stack ID.
+ //
+ // Default: There is no default value.
+ StackName *string `type:"string"`
}
-// SetTags sets the Tags field's value.
-func (s *CreateStackSetInput) SetTags(v []*Tag) *CreateStackSetInput {
- s.Tags = v
- return s
+// String returns the string representation
+func (s DescribeStackEventsInput) String() string {
+ return awsutil.Prettify(s)
}
-// SetTemplateBody sets the TemplateBody field's value.
-func (s *CreateStackSetInput) SetTemplateBody(v string) *CreateStackSetInput {
- s.TemplateBody = &v
+// GoString returns the string representation
+func (s DescribeStackEventsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeStackEventsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeStackEventsInput"}
+ 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 *DescribeStackEventsInput) SetNextToken(v string) *DescribeStackEventsInput {
+ s.NextToken = &v
return s
}
-// SetTemplateURL sets the TemplateURL field's value.
-func (s *CreateStackSetInput) SetTemplateURL(v string) *CreateStackSetInput {
- s.TemplateURL = &v
+// SetStackName sets the StackName field's value.
+func (s *DescribeStackEventsInput) SetStackName(v string) *DescribeStackEventsInput {
+ s.StackName = &v
return s
}
-type CreateStackSetOutput struct {
+// The output for a DescribeStackEvents action.
+type DescribeStackEventsOutput struct {
_ struct{} `type:"structure"`
- // The ID of the stack set that you're creating.
- StackSetId *string `type:"string"`
+ // If the output exceeds 1 MB in size, a string that identifies the next page
+ // of events. If no additional page exists, this value is null.
+ NextToken *string `min:"1" type:"string"`
+
+ // A list of StackEvents structures.
+ StackEvents []*StackEvent `type:"list"`
}
// String returns the string representation
-func (s CreateStackSetOutput) String() string {
+func (s DescribeStackEventsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s CreateStackSetOutput) GoString() string {
+func (s DescribeStackEventsOutput) GoString() string {
return s.String()
}
-// SetStackSetId sets the StackSetId field's value.
-func (s *CreateStackSetOutput) SetStackSetId(v string) *CreateStackSetOutput {
- s.StackSetId = &v
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeStackEventsOutput) SetNextToken(v string) *DescribeStackEventsOutput {
+ s.NextToken = &v
return s
}
-// The input for the DeleteChangeSet action.
-type DeleteChangeSetInput struct {
+// SetStackEvents sets the StackEvents field's value.
+func (s *DescribeStackEventsOutput) SetStackEvents(v []*StackEvent) *DescribeStackEventsOutput {
+ s.StackEvents = v
+ return s
+}
+
+type DescribeStackInstanceInput struct {
_ struct{} `type:"structure"`
- // The name or Amazon Resource Name (ARN) of the change set that you want to
- // delete.
+ // The ID of an AWS account that's associated with this stack instance.
//
- // ChangeSetName is a required field
- ChangeSetName *string `min:"1" type:"string" required:"true"`
+ // StackInstanceAccount is a required field
+ StackInstanceAccount *string `type:"string" required:"true"`
- // If you specified the name of a change set to delete, specify the stack name
- // or ID (ARN) that is associated with it.
- StackName *string `min:"1" type:"string"`
+ // The name of a Region that's associated with this stack instance.
+ //
+ // StackInstanceRegion is a required field
+ StackInstanceRegion *string `type:"string" required:"true"`
+
+ // The name or the unique stack ID of the stack set that you want to get stack
+ // instance information for.
+ //
+ // StackSetName is a required field
+ StackSetName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s DeleteChangeSetInput) String() string {
+func (s DescribeStackInstanceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DeleteChangeSetInput) GoString() string {
+func (s DescribeStackInstanceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteChangeSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteChangeSetInput"}
- if s.ChangeSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeSetName"))
+func (s *DescribeStackInstanceInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeStackInstanceInput"}
+ if s.StackInstanceAccount == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackInstanceAccount"))
}
- if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
+ if s.StackInstanceRegion == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackInstanceRegion"))
}
- if s.StackName != nil && len(*s.StackName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
+ if s.StackSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackSetName"))
}
if invalidParams.Len() > 0 {
@@ -5870,99 +8500,108 @@ func (s *DeleteChangeSetInput) Validate() error {
return nil
}
-// SetChangeSetName sets the ChangeSetName field's value.
-func (s *DeleteChangeSetInput) SetChangeSetName(v string) *DeleteChangeSetInput {
- s.ChangeSetName = &v
+// SetStackInstanceAccount sets the StackInstanceAccount field's value.
+func (s *DescribeStackInstanceInput) SetStackInstanceAccount(v string) *DescribeStackInstanceInput {
+ s.StackInstanceAccount = &v
return s
}
-// SetStackName sets the StackName field's value.
-func (s *DeleteChangeSetInput) SetStackName(v string) *DeleteChangeSetInput {
- s.StackName = &v
+// SetStackInstanceRegion sets the StackInstanceRegion field's value.
+func (s *DescribeStackInstanceInput) SetStackInstanceRegion(v string) *DescribeStackInstanceInput {
+ s.StackInstanceRegion = &v
return s
}
-// The output for the DeleteChangeSet action.
-type DeleteChangeSetOutput struct {
+// SetStackSetName sets the StackSetName field's value.
+func (s *DescribeStackInstanceInput) SetStackSetName(v string) *DescribeStackInstanceInput {
+ s.StackSetName = &v
+ return s
+}
+
+type DescribeStackInstanceOutput struct {
_ struct{} `type:"structure"`
+
+ // The stack instance that matches the specified request parameters.
+ StackInstance *StackInstance `type:"structure"`
}
// String returns the string representation
-func (s DeleteChangeSetOutput) String() string {
+func (s DescribeStackInstanceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DeleteChangeSetOutput) GoString() string {
+func (s DescribeStackInstanceOutput) GoString() string {
return s.String()
}
-// The input for DeleteStack action.
-type DeleteStackInput struct {
+// SetStackInstance sets the StackInstance field's value.
+func (s *DescribeStackInstanceOutput) SetStackInstance(v *StackInstance) *DescribeStackInstanceOutput {
+ s.StackInstance = v
+ return s
+}
+
+type DescribeStackResourceDriftsInput struct {
_ struct{} `type:"structure"`
- // A unique identifier for this DeleteStack request. Specify this token if you
- // plan to retry requests so that AWS CloudFormation knows that you're not attempting
- // to delete a stack with the same name. You might retry DeleteStack requests
- // to ensure that AWS CloudFormation successfully received them.
- //
- // All events triggered by a given stack operation are assigned the same client
- // request token, which you can use to track operations. For example, if you
- // execute a CreateStack operation with the token token1, then all the StackEvents
- // generated by that operation will have ClientRequestToken set as token1.
- //
- // In the console, stack operations display the client request token on the
- // Events tab. Stack operations that are initiated from the console use the
- // token format Console-StackOperation-ID, which helps you easily identify the
- // stack operation . For example, if you create a stack using the console, each
- // stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002.
- ClientRequestToken *string `min:"1" type:"string"`
+ // The maximum number of results to be returned with a single call. If the number
+ // of available results exceeds this maximum, the response includes a NextToken
+ // value that you can assign to the NextToken request parameter to get the next
+ // set of results.
+ MaxResults *int64 `min:"1" type:"integer"`
- // For stacks in the DELETE_FAILED state, a list of resource logical IDs that
- // are associated with the resources you want to retain. During deletion, AWS
- // CloudFormation deletes the stack but does not delete the retained resources.
- //
- // Retaining resources is useful when you cannot delete a resource, such as
- // a non-empty S3 bucket, but you want to delete the stack.
- RetainResources []*string `type:"list"`
+ // A string that identifies the next page of stack resource drift results.
+ NextToken *string `min:"1" type:"string"`
- // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM)
- // role that AWS CloudFormation assumes to delete the stack. AWS CloudFormation
- // uses the role's credentials to make calls on your behalf.
+ // The name of the stack for which you want drift information.
//
- // If you don't specify a value, AWS CloudFormation uses the role that was previously
- // associated with the stack. If no role is available, AWS CloudFormation uses
- // a temporary session that is generated from your user credentials.
- RoleARN *string `min:"20" type:"string"`
+ // StackName is a required field
+ StackName *string `min:"1" type:"string" required:"true"`
- // The name or the unique stack ID that is associated with the stack.
+ // The resource drift status values to use as filters for the resource drift
+ // results returned.
//
- // StackName is a required field
- StackName *string `type:"string" required:"true"`
+ // * DELETED: The resource differs from its expected template configuration
+ // in that the resource has been deleted.
+ //
+ // * MODIFIED: One or more resource properties differ from their expected
+ // template values.
+ //
+ // * IN_SYNC: The resources's actual configuration matches its expected template
+ // configuration.
+ //
+ // * NOT_CHECKED: AWS CloudFormation does not currently return this value.
+ StackResourceDriftStatusFilters []*string `min:"1" type:"list"`
}
// String returns the string representation
-func (s DeleteStackInput) String() string {
+func (s DescribeStackResourceDriftsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DeleteStackInput) GoString() string {
+func (s DescribeStackResourceDriftsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteStackInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteStackInput"}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
+func (s *DescribeStackResourceDriftsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeStackResourceDriftsInput"}
+ if s.MaxResults != nil && *s.MaxResults < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
- if s.RoleARN != nil && len(*s.RoleARN) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20))
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
if s.StackName == nil {
invalidParams.Add(request.NewErrParamRequired("StackName"))
}
+ if s.StackName != nil && len(*s.StackName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
+ }
+ if s.StackResourceDriftStatusFilters != nil && len(s.StackResourceDriftStatusFilters) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("StackResourceDriftStatusFilters", 1))
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -5970,107 +8609,118 @@ func (s *DeleteStackInput) Validate() error {
return nil
}
-// SetClientRequestToken sets the ClientRequestToken field's value.
-func (s *DeleteStackInput) SetClientRequestToken(v string) *DeleteStackInput {
- s.ClientRequestToken = &v
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeStackResourceDriftsInput) SetMaxResults(v int64) *DescribeStackResourceDriftsInput {
+ s.MaxResults = &v
return s
}
-// SetRetainResources sets the RetainResources field's value.
-func (s *DeleteStackInput) SetRetainResources(v []*string) *DeleteStackInput {
- s.RetainResources = v
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeStackResourceDriftsInput) SetNextToken(v string) *DescribeStackResourceDriftsInput {
+ s.NextToken = &v
return s
}
-// SetRoleARN sets the RoleARN field's value.
-func (s *DeleteStackInput) SetRoleARN(v string) *DeleteStackInput {
- s.RoleARN = &v
+// SetStackName sets the StackName field's value.
+func (s *DescribeStackResourceDriftsInput) SetStackName(v string) *DescribeStackResourceDriftsInput {
+ s.StackName = &v
return s
}
-// SetStackName sets the StackName field's value.
-func (s *DeleteStackInput) SetStackName(v string) *DeleteStackInput {
- s.StackName = &v
+// SetStackResourceDriftStatusFilters sets the StackResourceDriftStatusFilters field's value.
+func (s *DescribeStackResourceDriftsInput) SetStackResourceDriftStatusFilters(v []*string) *DescribeStackResourceDriftsInput {
+ s.StackResourceDriftStatusFilters = v
return s
}
-type DeleteStackInstancesInput struct {
+type DescribeStackResourceDriftsOutput struct {
_ struct{} `type:"structure"`
- // The names of the AWS accounts that you want to delete stack instances for.
- //
- // Accounts is a required field
- Accounts []*string `type:"list" required:"true"`
+ // If the request doesn't return all of the remaining results, NextToken is
+ // set to a token. To retrieve the next set of results, call DescribeStackResourceDrifts
+ // again and assign that token to the request object's NextToken parameter.
+ // If the request returns all results, NextToken is set to null.
+ NextToken *string `min:"1" type:"string"`
- // The unique identifier for this stack set operation.
- //
- // If you don't specify an operation ID, the SDK generates one automatically.
+ // Drift information for the resources that have been checked for drift in the
+ // specified stack. This includes actual and expected configuration values for
+ // resources where AWS CloudFormation detects drift.
//
- // The operation ID also functions as an idempotency token, to ensure that AWS
- // CloudFormation performs the stack set operation only once, even if you retry
- // the request multiple times. You can retry stack set operation requests to
- // ensure that AWS CloudFormation successfully received them.
+ // For a given stack, there will be one StackResourceDrift for each stack resource
+ // that has been checked for drift. Resources that have not yet been checked
+ // for drift are not included. Resources that do not currently support drift
+ // detection are not checked, and so not included. For a list of resources that
+ // support drift detection, see Resources that Support Drift Detection (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html).
//
- // Repeating this stack set operation with a new operation ID retries all stack
- // instances whose status is OUTDATED.
- OperationId *string `min:"1" type:"string" idempotencyToken:"true"`
+ // StackResourceDrifts is a required field
+ StackResourceDrifts []*StackResourceDrift `type:"list" required:"true"`
+}
- // Preferences for how AWS CloudFormation performs this stack set operation.
- OperationPreferences *StackSetOperationPreferences `type:"structure"`
+// String returns the string representation
+func (s DescribeStackResourceDriftsOutput) String() string {
+ return awsutil.Prettify(s)
+}
- // The regions where you want to delete stack set instances.
- //
- // Regions is a required field
- Regions []*string `type:"list" required:"true"`
+// GoString returns the string representation
+func (s DescribeStackResourceDriftsOutput) GoString() string {
+ return s.String()
+}
- // Removes the stack instances from the specified stack set, but doesn't delete
- // the stacks. You can't reassociate a retained stack or add an existing, saved
- // stack to a new stack set.
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeStackResourceDriftsOutput) SetNextToken(v string) *DescribeStackResourceDriftsOutput {
+ s.NextToken = &v
+ return s
+}
+
+// SetStackResourceDrifts sets the StackResourceDrifts field's value.
+func (s *DescribeStackResourceDriftsOutput) SetStackResourceDrifts(v []*StackResourceDrift) *DescribeStackResourceDriftsOutput {
+ s.StackResourceDrifts = v
+ return s
+}
+
+// The input for DescribeStackResource action.
+type DescribeStackResourceInput struct {
+ _ struct{} `type:"structure"`
+
+ // The logical name of the resource as specified in the template.
//
- // For more information, see Stack set operation options (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-ops-options).
+ // Default: There is no default value.
//
- // RetainStacks is a required field
- RetainStacks *bool `type:"boolean" required:"true"`
+ // LogicalResourceId is a required field
+ LogicalResourceId *string `type:"string" required:"true"`
- // The name or unique ID of the stack set that you want to delete stack instances
- // for.
+ // The name or the unique stack ID that is associated with the stack, which
+ // are not always interchangeable:
//
- // StackSetName is a required field
- StackSetName *string `type:"string" required:"true"`
+ // * Running stacks: You can specify either the stack's name or its unique
+ // stack ID.
+ //
+ // * Deleted stacks: You must specify the unique stack ID.
+ //
+ // Default: There is no default value.
+ //
+ // StackName is a required field
+ StackName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s DeleteStackInstancesInput) String() string {
+func (s DescribeStackResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DeleteStackInstancesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteStackInstancesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteStackInstancesInput"}
- if s.Accounts == nil {
- invalidParams.Add(request.NewErrParamRequired("Accounts"))
- }
- if s.OperationId != nil && len(*s.OperationId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("OperationId", 1))
- }
- if s.Regions == nil {
- invalidParams.Add(request.NewErrParamRequired("Regions"))
- }
- if s.RetainStacks == nil {
- invalidParams.Add(request.NewErrParamRequired("RetainStacks"))
- }
- if s.StackSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+func (s DescribeStackResourceInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeStackResourceInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeStackResourceInput"}
+ if s.LogicalResourceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("LogicalResourceId"))
}
- if s.OperationPreferences != nil {
- if err := s.OperationPreferences.Validate(); err != nil {
- invalidParams.AddNested("OperationPreferences", err.(request.ErrInvalidParams))
- }
+ if s.StackName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackName"))
}
if invalidParams.Len() > 0 {
@@ -6079,102 +8729,155 @@ func (s *DeleteStackInstancesInput) Validate() error {
return nil
}
-// SetAccounts sets the Accounts field's value.
-func (s *DeleteStackInstancesInput) SetAccounts(v []*string) *DeleteStackInstancesInput {
- s.Accounts = v
+// SetLogicalResourceId sets the LogicalResourceId field's value.
+func (s *DescribeStackResourceInput) SetLogicalResourceId(v string) *DescribeStackResourceInput {
+ s.LogicalResourceId = &v
return s
}
-// SetOperationId sets the OperationId field's value.
-func (s *DeleteStackInstancesInput) SetOperationId(v string) *DeleteStackInstancesInput {
- s.OperationId = &v
+// SetStackName sets the StackName field's value.
+func (s *DescribeStackResourceInput) SetStackName(v string) *DescribeStackResourceInput {
+ s.StackName = &v
return s
}
-// SetOperationPreferences sets the OperationPreferences field's value.
-func (s *DeleteStackInstancesInput) SetOperationPreferences(v *StackSetOperationPreferences) *DeleteStackInstancesInput {
- s.OperationPreferences = v
- return s
+// The output for a DescribeStackResource action.
+type DescribeStackResourceOutput struct {
+ _ struct{} `type:"structure"`
+
+ // A StackResourceDetail structure containing the description of the specified
+ // resource in the specified stack.
+ StackResourceDetail *StackResourceDetail `type:"structure"`
}
-// SetRegions sets the Regions field's value.
-func (s *DeleteStackInstancesInput) SetRegions(v []*string) *DeleteStackInstancesInput {
- s.Regions = v
- return s
+// String returns the string representation
+func (s DescribeStackResourceOutput) String() string {
+ return awsutil.Prettify(s)
}
-// SetRetainStacks sets the RetainStacks field's value.
-func (s *DeleteStackInstancesInput) SetRetainStacks(v bool) *DeleteStackInstancesInput {
- s.RetainStacks = &v
- return s
+// GoString returns the string representation
+func (s DescribeStackResourceOutput) GoString() string {
+ return s.String()
}
-// SetStackSetName sets the StackSetName field's value.
-func (s *DeleteStackInstancesInput) SetStackSetName(v string) *DeleteStackInstancesInput {
- s.StackSetName = &v
+// SetStackResourceDetail sets the StackResourceDetail field's value.
+func (s *DescribeStackResourceOutput) SetStackResourceDetail(v *StackResourceDetail) *DescribeStackResourceOutput {
+ s.StackResourceDetail = v
return s
}
-type DeleteStackInstancesOutput struct {
+// The input for DescribeStackResources action.
+type DescribeStackResourcesInput struct {
_ struct{} `type:"structure"`
- // The unique identifier for this stack set operation.
- OperationId *string `min:"1" type:"string"`
+ // The logical name of the resource as specified in the template.
+ //
+ // Default: There is no default value.
+ LogicalResourceId *string `type:"string"`
+
+ // The name or unique identifier that corresponds to a physical instance ID
+ // of a resource supported by AWS CloudFormation.
+ //
+ // For example, for an Amazon Elastic Compute Cloud (EC2) instance, PhysicalResourceId
+ // corresponds to the InstanceId. You can pass the EC2 InstanceId to DescribeStackResources
+ // to find which stack the instance belongs to and what other resources are
+ // part of the stack.
+ //
+ // Required: Conditional. If you do not specify PhysicalResourceId, you must
+ // specify StackName.
+ //
+ // Default: There is no default value.
+ PhysicalResourceId *string `type:"string"`
+
+ // The name or the unique stack ID that is associated with the stack, which
+ // are not always interchangeable:
+ //
+ // * Running stacks: You can specify either the stack's name or its unique
+ // stack ID.
+ //
+ // * Deleted stacks: You must specify the unique stack ID.
+ //
+ // Default: There is no default value.
+ //
+ // Required: Conditional. If you do not specify StackName, you must specify
+ // PhysicalResourceId.
+ StackName *string `type:"string"`
}
// String returns the string representation
-func (s DeleteStackInstancesOutput) String() string {
+func (s DescribeStackResourcesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DeleteStackInstancesOutput) GoString() string {
+func (s DescribeStackResourcesInput) GoString() string {
return s.String()
}
-// SetOperationId sets the OperationId field's value.
-func (s *DeleteStackInstancesOutput) SetOperationId(v string) *DeleteStackInstancesOutput {
- s.OperationId = &v
+// SetLogicalResourceId sets the LogicalResourceId field's value.
+func (s *DescribeStackResourcesInput) SetLogicalResourceId(v string) *DescribeStackResourcesInput {
+ s.LogicalResourceId = &v
return s
}
-type DeleteStackOutput struct {
+// SetPhysicalResourceId sets the PhysicalResourceId field's value.
+func (s *DescribeStackResourcesInput) SetPhysicalResourceId(v string) *DescribeStackResourcesInput {
+ s.PhysicalResourceId = &v
+ return s
+}
+
+// SetStackName sets the StackName field's value.
+func (s *DescribeStackResourcesInput) SetStackName(v string) *DescribeStackResourcesInput {
+ s.StackName = &v
+ return s
+}
+
+// The output for a DescribeStackResources action.
+type DescribeStackResourcesOutput struct {
_ struct{} `type:"structure"`
+
+ // A list of StackResource structures.
+ StackResources []*StackResource `type:"list"`
}
// String returns the string representation
-func (s DeleteStackOutput) String() string {
+func (s DescribeStackResourcesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DeleteStackOutput) GoString() string {
+func (s DescribeStackResourcesOutput) GoString() string {
return s.String()
}
-type DeleteStackSetInput struct {
+// SetStackResources sets the StackResources field's value.
+func (s *DescribeStackResourcesOutput) SetStackResources(v []*StackResource) *DescribeStackResourcesOutput {
+ s.StackResources = v
+ return s
+}
+
+type DescribeStackSetInput struct {
_ struct{} `type:"structure"`
- // The name or unique ID of the stack set that you're deleting. You can obtain
- // this value by running ListStackSets.
+ // The name or unique ID of the stack set whose description you want.
//
// StackSetName is a required field
StackSetName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s DeleteStackSetInput) String() string {
+func (s DescribeStackSetInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DeleteStackSetInput) GoString() string {
+func (s DescribeStackSetInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteStackSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteStackSetInput"}
+func (s *DescribeStackSetInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeStackSetInput"}
if s.StackSetName == nil {
invalidParams.Add(request.NewErrParamRequired("StackSetName"))
}
@@ -6186,48 +8889,46 @@ func (s *DeleteStackSetInput) Validate() error {
}
// SetStackSetName sets the StackSetName field's value.
-func (s *DeleteStackSetInput) SetStackSetName(v string) *DeleteStackSetInput {
+func (s *DescribeStackSetInput) SetStackSetName(v string) *DescribeStackSetInput {
s.StackSetName = &v
return s
}
-type DeleteStackSetOutput struct {
+type DescribeStackSetOperationInput struct {
_ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteStackSetOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteStackSetOutput) GoString() string {
- return s.String()
-}
-// The input for the DescribeAccountLimits action.
-type DescribeAccountLimitsInput struct {
- _ struct{} `type:"structure"`
+ // The unique ID of the stack set operation.
+ //
+ // OperationId is a required field
+ OperationId *string `min:"1" type:"string" required:"true"`
- // A string that identifies the next page of limits that you want to retrieve.
- NextToken *string `min:"1" type:"string"`
+ // The name or the unique stack ID of the stack set for the stack operation.
+ //
+ // StackSetName is a required field
+ StackSetName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s DescribeAccountLimitsInput) String() string {
+func (s DescribeStackSetOperationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeAccountLimitsInput) GoString() string {
+func (s DescribeStackSetOperationInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeAccountLimitsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeAccountLimitsInput"}
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
+func (s *DescribeStackSetOperationInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeStackSetOperationInput"}
+ if s.OperationId == nil {
+ invalidParams.Add(request.NewErrParamRequired("OperationId"))
+ }
+ if s.OperationId != nil && len(*s.OperationId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("OperationId", 1))
+ }
+ if s.StackSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackSetName"))
}
if invalidParams.Len() > 0 {
@@ -6236,91 +8937,99 @@ func (s *DescribeAccountLimitsInput) Validate() error {
return nil
}
-// SetNextToken sets the NextToken field's value.
-func (s *DescribeAccountLimitsInput) SetNextToken(v string) *DescribeAccountLimitsInput {
- s.NextToken = &v
+// SetOperationId sets the OperationId field's value.
+func (s *DescribeStackSetOperationInput) SetOperationId(v string) *DescribeStackSetOperationInput {
+ s.OperationId = &v
return s
}
-// The output for the DescribeAccountLimits action.
-type DescribeAccountLimitsOutput struct {
- _ struct{} `type:"structure"`
+// SetStackSetName sets the StackSetName field's value.
+func (s *DescribeStackSetOperationInput) SetStackSetName(v string) *DescribeStackSetOperationInput {
+ s.StackSetName = &v
+ return s
+}
- // An account limit structure that contain a list of AWS CloudFormation account
- // limits and their values.
- AccountLimits []*AccountLimit `type:"list"`
+type DescribeStackSetOperationOutput struct {
+ _ struct{} `type:"structure"`
- // If the output exceeds 1 MB in size, a string that identifies the next page
- // of limits. If no additional page exists, this value is null.
- NextToken *string `min:"1" type:"string"`
+ // The specified stack set operation.
+ StackSetOperation *StackSetOperation `type:"structure"`
}
// String returns the string representation
-func (s DescribeAccountLimitsOutput) String() string {
+func (s DescribeStackSetOperationOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeAccountLimitsOutput) GoString() string {
+func (s DescribeStackSetOperationOutput) GoString() string {
return s.String()
}
-// SetAccountLimits sets the AccountLimits field's value.
-func (s *DescribeAccountLimitsOutput) SetAccountLimits(v []*AccountLimit) *DescribeAccountLimitsOutput {
- s.AccountLimits = v
+// SetStackSetOperation sets the StackSetOperation field's value.
+func (s *DescribeStackSetOperationOutput) SetStackSetOperation(v *StackSetOperation) *DescribeStackSetOperationOutput {
+ s.StackSetOperation = v
return s
}
-// SetNextToken sets the NextToken field's value.
-func (s *DescribeAccountLimitsOutput) SetNextToken(v string) *DescribeAccountLimitsOutput {
- s.NextToken = &v
- return s
+type DescribeStackSetOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The specified stack set.
+ StackSet *StackSet `type:"structure"`
}
-// The input for the DescribeChangeSet action.
-type DescribeChangeSetInput struct {
- _ struct{} `type:"structure"`
+// String returns the string representation
+func (s DescribeStackSetOutput) String() string {
+ return awsutil.Prettify(s)
+}
- // The name or Amazon Resource Name (ARN) of the change set that you want to
- // describe.
- //
- // ChangeSetName is a required field
- ChangeSetName *string `min:"1" type:"string" required:"true"`
+// GoString returns the string representation
+func (s DescribeStackSetOutput) GoString() string {
+ return s.String()
+}
+
+// SetStackSet sets the StackSet field's value.
+func (s *DescribeStackSetOutput) SetStackSet(v *StackSet) *DescribeStackSetOutput {
+ s.StackSet = v
+ return s
+}
- // A string (provided by the DescribeChangeSet response output) that identifies
- // the next page of information that you want to retrieve.
+// The input for DescribeStacks action.
+type DescribeStacksInput struct {
+ _ struct{} `type:"structure"`
+
+ // A string that identifies the next page of stacks that you want to retrieve.
NextToken *string `min:"1" type:"string"`
- // If you specified the name of a change set, specify the stack name or ID (ARN)
- // of the change set you want to describe.
- StackName *string `min:"1" type:"string"`
+ // The name or the unique stack ID that is associated with the stack, which
+ // are not always interchangeable:
+ //
+ // * Running stacks: You can specify either the stack's name or its unique
+ // stack ID.
+ //
+ // * Deleted stacks: You must specify the unique stack ID.
+ //
+ // Default: There is no default value.
+ StackName *string `type:"string"`
}
// String returns the string representation
-func (s DescribeChangeSetInput) String() string {
+func (s DescribeStacksInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeChangeSetInput) GoString() string {
+func (s DescribeStacksInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeChangeSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeChangeSetInput"}
- if s.ChangeSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeSetName"))
- }
- if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
- }
+func (s *DescribeStacksInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeStacksInput"}
if s.NextToken != nil && len(*s.NextToken) < 1 {
invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
- if s.StackName != nil && len(*s.StackName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
- }
if invalidParams.Len() > 0 {
return invalidParams
@@ -6328,229 +9037,99 @@ func (s *DescribeChangeSetInput) Validate() error {
return nil
}
-// SetChangeSetName sets the ChangeSetName field's value.
-func (s *DescribeChangeSetInput) SetChangeSetName(v string) *DescribeChangeSetInput {
- s.ChangeSetName = &v
- return s
-}
-
// SetNextToken sets the NextToken field's value.
-func (s *DescribeChangeSetInput) SetNextToken(v string) *DescribeChangeSetInput {
+func (s *DescribeStacksInput) SetNextToken(v string) *DescribeStacksInput {
s.NextToken = &v
return s
}
// SetStackName sets the StackName field's value.
-func (s *DescribeChangeSetInput) SetStackName(v string) *DescribeChangeSetInput {
+func (s *DescribeStacksInput) SetStackName(v string) *DescribeStacksInput {
s.StackName = &v
return s
}
-// The output for the DescribeChangeSet action.
-type DescribeChangeSetOutput struct {
+// The output for a DescribeStacks action.
+type DescribeStacksOutput struct {
_ struct{} `type:"structure"`
- // If you execute the change set, the list of capabilities that were explicitly
- // acknowledged when the change set was created.
- Capabilities []*string `type:"list"`
-
- // The ARN of the change set.
- ChangeSetId *string `min:"1" type:"string"`
-
- // The name of the change set.
- ChangeSetName *string `min:"1" type:"string"`
-
- // A list of Change structures that describes the resources AWS CloudFormation
- // changes if you execute the change set.
- Changes []*Change `type:"list"`
-
- // The start time when the change set was created, in UTC.
- CreationTime *time.Time `type:"timestamp"`
-
- // Information about the change set.
- Description *string `min:"1" type:"string"`
-
- // If the change set execution status is AVAILABLE, you can execute the change
- // set. If you can’t execute the change set, the status indicates why. For
- // example, a change set might be in an UNAVAILABLE state because AWS CloudFormation
- // is still creating it or in an OBSOLETE state because the stack was already
- // updated.
- ExecutionStatus *string `type:"string" enum:"ExecutionStatus"`
-
- // If the output exceeds 1 MB, a string that identifies the next page of changes.
- // If there is no additional page, this value is null.
+ // If the output exceeds 1 MB in size, a string that identifies the next page
+ // of stacks. If no additional page exists, this value is null.
NextToken *string `min:"1" type:"string"`
- // The ARNs of the Amazon Simple Notification Service (Amazon SNS) topics that
- // will be associated with the stack if you execute the change set.
- NotificationARNs []*string `type:"list"`
-
- // A list of Parameter structures that describes the input parameters and their
- // values used to create the change set. For more information, see the Parameter
- // (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html)
- // data type.
- Parameters []*Parameter `type:"list"`
-
- // The rollback triggers for AWS CloudFormation to monitor during stack creation
- // and updating operations, and for the specified monitoring period afterwards.
- RollbackConfiguration *RollbackConfiguration `type:"structure"`
-
- // The ARN of the stack that is associated with the change set.
- StackId *string `type:"string"`
-
- // The name of the stack that is associated with the change set.
- StackName *string `type:"string"`
-
- // The current status of the change set, such as CREATE_IN_PROGRESS, CREATE_COMPLETE,
- // or FAILED.
- Status *string `type:"string" enum:"ChangeSetStatus"`
-
- // A description of the change set's status. For example, if your attempt to
- // create a change set failed, AWS CloudFormation shows the error message.
- StatusReason *string `type:"string"`
-
- // If you execute the change set, the tags that will be associated with the
- // stack.
- Tags []*Tag `type:"list"`
+ // A list of stack structures.
+ Stacks []*Stack `type:"list"`
}
// String returns the string representation
-func (s DescribeChangeSetOutput) String() string {
+func (s DescribeStacksOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeChangeSetOutput) GoString() string {
+func (s DescribeStacksOutput) GoString() string {
return s.String()
}
-// SetCapabilities sets the Capabilities field's value.
-func (s *DescribeChangeSetOutput) SetCapabilities(v []*string) *DescribeChangeSetOutput {
- s.Capabilities = v
- return s
-}
-
-// SetChangeSetId sets the ChangeSetId field's value.
-func (s *DescribeChangeSetOutput) SetChangeSetId(v string) *DescribeChangeSetOutput {
- s.ChangeSetId = &v
- return s
-}
-
-// SetChangeSetName sets the ChangeSetName field's value.
-func (s *DescribeChangeSetOutput) SetChangeSetName(v string) *DescribeChangeSetOutput {
- s.ChangeSetName = &v
- return s
-}
-
-// SetChanges sets the Changes field's value.
-func (s *DescribeChangeSetOutput) SetChanges(v []*Change) *DescribeChangeSetOutput {
- s.Changes = v
- return s
-}
-
-// SetCreationTime sets the CreationTime field's value.
-func (s *DescribeChangeSetOutput) SetCreationTime(v time.Time) *DescribeChangeSetOutput {
- s.CreationTime = &v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *DescribeChangeSetOutput) SetDescription(v string) *DescribeChangeSetOutput {
- s.Description = &v
- return s
-}
-
-// SetExecutionStatus sets the ExecutionStatus field's value.
-func (s *DescribeChangeSetOutput) SetExecutionStatus(v string) *DescribeChangeSetOutput {
- s.ExecutionStatus = &v
- return s
-}
-
// SetNextToken sets the NextToken field's value.
-func (s *DescribeChangeSetOutput) SetNextToken(v string) *DescribeChangeSetOutput {
+func (s *DescribeStacksOutput) SetNextToken(v string) *DescribeStacksOutput {
s.NextToken = &v
return s
}
-// SetNotificationARNs sets the NotificationARNs field's value.
-func (s *DescribeChangeSetOutput) SetNotificationARNs(v []*string) *DescribeChangeSetOutput {
- s.NotificationARNs = v
- return s
-}
-
-// SetParameters sets the Parameters field's value.
-func (s *DescribeChangeSetOutput) SetParameters(v []*Parameter) *DescribeChangeSetOutput {
- s.Parameters = v
- return s
-}
-
-// SetRollbackConfiguration sets the RollbackConfiguration field's value.
-func (s *DescribeChangeSetOutput) SetRollbackConfiguration(v *RollbackConfiguration) *DescribeChangeSetOutput {
- s.RollbackConfiguration = v
- return s
-}
-
-// SetStackId sets the StackId field's value.
-func (s *DescribeChangeSetOutput) SetStackId(v string) *DescribeChangeSetOutput {
- s.StackId = &v
- return s
-}
-
-// SetStackName sets the StackName field's value.
-func (s *DescribeChangeSetOutput) SetStackName(v string) *DescribeChangeSetOutput {
- s.StackName = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *DescribeChangeSetOutput) SetStatus(v string) *DescribeChangeSetOutput {
- s.Status = &v
+// SetStacks sets the Stacks field's value.
+func (s *DescribeStacksOutput) SetStacks(v []*Stack) *DescribeStacksOutput {
+ s.Stacks = v
return s
}
-// SetStatusReason sets the StatusReason field's value.
-func (s *DescribeChangeSetOutput) SetStatusReason(v string) *DescribeChangeSetOutput {
- s.StatusReason = &v
- return s
-}
+type DescribeTypeInput struct {
+ _ struct{} `type:"structure"`
-// SetTags sets the Tags field's value.
-func (s *DescribeChangeSetOutput) SetTags(v []*Tag) *DescribeChangeSetOutput {
- s.Tags = v
- return s
-}
+ // The Amazon Resource Name (ARN) of the type.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ Arn *string `type:"string"`
-type DescribeStackDriftDetectionStatusInput struct {
- _ struct{} `type:"structure"`
+ // The kind of type.
+ //
+ // Currently the only valid value is RESOURCE.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ Type *string `type:"string" enum:"RegistryType"`
- // The ID of the drift detection results of this operation.
+ // The name of the type.
//
- // AWS CloudFormation generates new results, with a new drift detection ID,
- // each time this operation is run. However, the number of drift results AWS
- // CloudFormation retains for any given stack, and for how long, may vary.
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ TypeName *string `min:"10" type:"string"`
+
+ // The ID of a specific version of the type. The version ID is the value at
+ // the end of the Amazon Resource Name (ARN) assigned to the type version when
+ // it is registered.
//
- // StackDriftDetectionId is a required field
- StackDriftDetectionId *string `min:"1" type:"string" required:"true"`
+ // If you specify a VersionId, DescribeType returns information about that specific
+ // type version. Otherwise, it returns information about the default type version.
+ VersionId *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s DescribeStackDriftDetectionStatusInput) String() string {
+func (s DescribeTypeInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackDriftDetectionStatusInput) GoString() string {
+func (s DescribeTypeInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeStackDriftDetectionStatusInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeStackDriftDetectionStatusInput"}
- if s.StackDriftDetectionId == nil {
- invalidParams.Add(request.NewErrParamRequired("StackDriftDetectionId"))
+func (s *DescribeTypeInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeTypeInput"}
+ if s.TypeName != nil && len(*s.TypeName) < 10 {
+ invalidParams.Add(request.NewErrParamMinLen("TypeName", 10))
}
- if s.StackDriftDetectionId != nil && len(*s.StackDriftDetectionId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StackDriftDetectionId", 1))
+ if s.VersionId != nil && len(*s.VersionId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
}
if invalidParams.Len() > 0 {
@@ -6559,258 +9138,261 @@ func (s *DescribeStackDriftDetectionStatusInput) Validate() error {
return nil
}
-// SetStackDriftDetectionId sets the StackDriftDetectionId field's value.
-func (s *DescribeStackDriftDetectionStatusInput) SetStackDriftDetectionId(v string) *DescribeStackDriftDetectionStatusInput {
- s.StackDriftDetectionId = &v
+// SetArn sets the Arn field's value.
+func (s *DescribeTypeInput) SetArn(v string) *DescribeTypeInput {
+ s.Arn = &v
return s
}
-type DescribeStackDriftDetectionStatusOutput struct {
+// SetType sets the Type field's value.
+func (s *DescribeTypeInput) SetType(v string) *DescribeTypeInput {
+ s.Type = &v
+ return s
+}
+
+// SetTypeName sets the TypeName field's value.
+func (s *DescribeTypeInput) SetTypeName(v string) *DescribeTypeInput {
+ s.TypeName = &v
+ return s
+}
+
+// SetVersionId sets the VersionId field's value.
+func (s *DescribeTypeInput) SetVersionId(v string) *DescribeTypeInput {
+ s.VersionId = &v
+ return s
+}
+
+type DescribeTypeOutput struct {
_ struct{} `type:"structure"`
- // The status of the stack drift detection operation.
- //
- // * DETECTION_COMPLETE: The stack drift detection operation has successfully
- // completed for all resources in the stack that support drift detection.
- // (Resources that do not currently support stack detection remain unchecked.)
- // If you specified logical resource IDs for AWS CloudFormation to use as
- // a filter for the stack drift detection operation, only the resources with
- // those logical IDs are checked for drift.
+ // The Amazon Resource Name (ARN) of the type.
+ Arn *string `type:"string"`
+
+ // The ID of the default version of the type. The default version is used when
+ // the type version is not specified.
//
- // * DETECTION_FAILED: The stack drift detection operation has failed for
- // at least one resource in the stack. Results will be available for resources
- // on which AWS CloudFormation successfully completed drift detection.
+ // To set the default version of a type, use SetTypeDefaultVersion .
+ DefaultVersionId *string `min:"1" type:"string"`
+
+ // The deprecation status of the type.
//
- // * DETECTION_IN_PROGRESS: The stack drift detection operation is currently
- // in progress.
+ // Valid values include:
//
- // DetectionStatus is a required field
- DetectionStatus *string `type:"string" required:"true" enum:"StackDriftDetectionStatus"`
+ // * LIVE: The type is registered and can be used in CloudFormation operations,
+ // dependent on its provisioning behavior and visibility scope.
+ //
+ // * DEPRECATED: The type has been deregistered and can no longer be used
+ // in CloudFormation operations.
+ DeprecatedStatus *string `type:"string" enum:"DeprecatedStatus"`
- // The reason the stack drift detection operation has its current status.
- DetectionStatusReason *string `type:"string"`
+ // The description of the registered type.
+ Description *string `min:"1" type:"string"`
- // Total number of stack resources that have drifted. This is NULL until the
- // drift detection operation reaches a status of DETECTION_COMPLETE. This value
- // will be 0 for stacks whose drift status is IN_SYNC.
- DriftedStackResourceCount *int64 `type:"integer"`
+ // The URL of a page providing detailed documentation for this type.
+ DocumentationUrl *string `type:"string"`
- // The ID of the drift detection results of this operation.
- //
- // AWS CloudFormation generates new results, with a new drift detection ID,
- // each time this operation is run. However, the number of reports AWS CloudFormation
- // retains for any given stack, and for how long, may vary.
- //
- // StackDriftDetectionId is a required field
- StackDriftDetectionId *string `min:"1" type:"string" required:"true"`
+ // The Amazon Resource Name (ARN) of the IAM execution role used to register
+ // the type. If your resource type calls AWS APIs in any of its handlers, you
+ // must create an IAM execution role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)
+ // that includes the necessary permissions to call those AWS APIs, and provision
+ // that execution role in your account. CloudFormation then assumes that execution
+ // role to provide your resource type with the appropriate credentials.
+ ExecutionRoleArn *string `min:"1" type:"string"`
- // Status of the stack's actual configuration compared to its expected configuration.
+ // Whether the specified type version is set as the default version.
+ IsDefaultVersion *bool `type:"boolean"`
+
+ // When the specified type version was registered.
+ LastUpdated *time.Time `type:"timestamp"`
+
+ // Contains logging configuration information for a type.
+ LoggingConfig *LoggingConfig `type:"structure"`
+
+ // The provisioning behavior of the type. AWS CloudFormation determines the
+ // provisioning type during registration, based on the types of handlers in
+ // the schema handler package submitted.
//
- // * DRIFTED: The stack differs from its expected template configuration.
- // A stack is considered to have drifted if one or more of its resources
- // have drifted.
+ // Valid values include:
//
- // * NOT_CHECKED: AWS CloudFormation has not checked if the stack differs
- // from its expected template configuration.
+ // * FULLY_MUTABLE: The type includes an update handler to process updates
+ // to the type during stack update operations.
//
- // * IN_SYNC: The stack's actual configuration matches its expected template
- // configuration.
+ // * IMMUTABLE: The type does not include an update handler, so the type
+ // cannot be updated and must instead be replaced during stack update operations.
//
- // * UNKNOWN: This value is reserved for future use.
- StackDriftStatus *string `type:"string" enum:"StackDriftStatus"`
+ // * NON_PROVISIONABLE: The type does not include all of the following handlers,
+ // and therefore cannot actually be provisioned. create read delete
+ ProvisioningType *string `type:"string" enum:"ProvisioningType"`
- // The ID of the stack.
+ // The schema that defines the type.
//
- // StackId is a required field
- StackId *string `type:"string" required:"true"`
+ // For more information on type schemas, see Resource Provider Schema (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html)
+ // in the CloudFormation CLI User Guide.
+ Schema *string `min:"1" type:"string"`
- // Time at which the stack drift detection operation was initiated.
+ // The URL of the source code for the type.
+ SourceUrl *string `type:"string"`
+
+ // When the specified type version was registered.
+ TimeCreated *time.Time `type:"timestamp"`
+
+ // The kind of type.
//
- // Timestamp is a required field
- Timestamp *time.Time `type:"timestamp" required:"true"`
+ // Currently the only valid value is RESOURCE.
+ Type *string `type:"string" enum:"RegistryType"`
+
+ // The name of the registered type.
+ TypeName *string `min:"10" type:"string"`
+
+ // The scope at which the type is visible and usable in CloudFormation operations.
+ //
+ // Valid values include:
+ //
+ // * PRIVATE: The type is only visible and usable within the account in which
+ // it is registered. Currently, AWS CloudFormation marks any types you register
+ // as PRIVATE.
+ //
+ // * PUBLIC: The type is publically visible and usable within any Amazon
+ // account.
+ Visibility *string `type:"string" enum:"Visibility"`
}
// String returns the string representation
-func (s DescribeStackDriftDetectionStatusOutput) String() string {
+func (s DescribeTypeOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackDriftDetectionStatusOutput) GoString() string {
+func (s DescribeTypeOutput) GoString() string {
return s.String()
}
-// SetDetectionStatus sets the DetectionStatus field's value.
-func (s *DescribeStackDriftDetectionStatusOutput) SetDetectionStatus(v string) *DescribeStackDriftDetectionStatusOutput {
- s.DetectionStatus = &v
+// SetArn sets the Arn field's value.
+func (s *DescribeTypeOutput) SetArn(v string) *DescribeTypeOutput {
+ s.Arn = &v
return s
}
-// SetDetectionStatusReason sets the DetectionStatusReason field's value.
-func (s *DescribeStackDriftDetectionStatusOutput) SetDetectionStatusReason(v string) *DescribeStackDriftDetectionStatusOutput {
- s.DetectionStatusReason = &v
+// SetDefaultVersionId sets the DefaultVersionId field's value.
+func (s *DescribeTypeOutput) SetDefaultVersionId(v string) *DescribeTypeOutput {
+ s.DefaultVersionId = &v
return s
}
-// SetDriftedStackResourceCount sets the DriftedStackResourceCount field's value.
-func (s *DescribeStackDriftDetectionStatusOutput) SetDriftedStackResourceCount(v int64) *DescribeStackDriftDetectionStatusOutput {
- s.DriftedStackResourceCount = &v
+// SetDeprecatedStatus sets the DeprecatedStatus field's value.
+func (s *DescribeTypeOutput) SetDeprecatedStatus(v string) *DescribeTypeOutput {
+ s.DeprecatedStatus = &v
return s
}
-// SetStackDriftDetectionId sets the StackDriftDetectionId field's value.
-func (s *DescribeStackDriftDetectionStatusOutput) SetStackDriftDetectionId(v string) *DescribeStackDriftDetectionStatusOutput {
- s.StackDriftDetectionId = &v
+// SetDescription sets the Description field's value.
+func (s *DescribeTypeOutput) SetDescription(v string) *DescribeTypeOutput {
+ s.Description = &v
return s
}
-// SetStackDriftStatus sets the StackDriftStatus field's value.
-func (s *DescribeStackDriftDetectionStatusOutput) SetStackDriftStatus(v string) *DescribeStackDriftDetectionStatusOutput {
- s.StackDriftStatus = &v
+// SetDocumentationUrl sets the DocumentationUrl field's value.
+func (s *DescribeTypeOutput) SetDocumentationUrl(v string) *DescribeTypeOutput {
+ s.DocumentationUrl = &v
return s
}
-// SetStackId sets the StackId field's value.
-func (s *DescribeStackDriftDetectionStatusOutput) SetStackId(v string) *DescribeStackDriftDetectionStatusOutput {
- s.StackId = &v
+// SetExecutionRoleArn sets the ExecutionRoleArn field's value.
+func (s *DescribeTypeOutput) SetExecutionRoleArn(v string) *DescribeTypeOutput {
+ s.ExecutionRoleArn = &v
return s
}
-// SetTimestamp sets the Timestamp field's value.
-func (s *DescribeStackDriftDetectionStatusOutput) SetTimestamp(v time.Time) *DescribeStackDriftDetectionStatusOutput {
- s.Timestamp = &v
+// SetIsDefaultVersion sets the IsDefaultVersion field's value.
+func (s *DescribeTypeOutput) SetIsDefaultVersion(v bool) *DescribeTypeOutput {
+ s.IsDefaultVersion = &v
return s
}
-// The input for DescribeStackEvents action.
-type DescribeStackEventsInput struct {
- _ struct{} `type:"structure"`
-
- // A string that identifies the next page of events that you want to retrieve.
- NextToken *string `min:"1" type:"string"`
-
- // The name or the unique stack ID that is associated with the stack, which
- // are not always interchangeable:
- //
- // * Running stacks: You can specify either the stack's name or its unique
- // stack ID.
- //
- // * Deleted stacks: You must specify the unique stack ID.
- //
- // Default: There is no default value.
- StackName *string `type:"string"`
-}
-
-// String returns the string representation
-func (s DescribeStackEventsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeStackEventsInput) GoString() string {
- return s.String()
+// SetLastUpdated sets the LastUpdated field's value.
+func (s *DescribeTypeOutput) SetLastUpdated(v time.Time) *DescribeTypeOutput {
+ s.LastUpdated = &v
+ return s
}
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeStackEventsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeStackEventsInput"}
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
+// SetLoggingConfig sets the LoggingConfig field's value.
+func (s *DescribeTypeOutput) SetLoggingConfig(v *LoggingConfig) *DescribeTypeOutput {
+ s.LoggingConfig = v
+ return s
}
-// SetNextToken sets the NextToken field's value.
-func (s *DescribeStackEventsInput) SetNextToken(v string) *DescribeStackEventsInput {
- s.NextToken = &v
+// SetProvisioningType sets the ProvisioningType field's value.
+func (s *DescribeTypeOutput) SetProvisioningType(v string) *DescribeTypeOutput {
+ s.ProvisioningType = &v
return s
}
-// SetStackName sets the StackName field's value.
-func (s *DescribeStackEventsInput) SetStackName(v string) *DescribeStackEventsInput {
- s.StackName = &v
+// SetSchema sets the Schema field's value.
+func (s *DescribeTypeOutput) SetSchema(v string) *DescribeTypeOutput {
+ s.Schema = &v
return s
}
-// The output for a DescribeStackEvents action.
-type DescribeStackEventsOutput struct {
- _ struct{} `type:"structure"`
-
- // If the output exceeds 1 MB in size, a string that identifies the next page
- // of events. If no additional page exists, this value is null.
- NextToken *string `min:"1" type:"string"`
-
- // A list of StackEvents structures.
- StackEvents []*StackEvent `type:"list"`
+// SetSourceUrl sets the SourceUrl field's value.
+func (s *DescribeTypeOutput) SetSourceUrl(v string) *DescribeTypeOutput {
+ s.SourceUrl = &v
+ return s
}
-// String returns the string representation
-func (s DescribeStackEventsOutput) String() string {
- return awsutil.Prettify(s)
+// SetTimeCreated sets the TimeCreated field's value.
+func (s *DescribeTypeOutput) SetTimeCreated(v time.Time) *DescribeTypeOutput {
+ s.TimeCreated = &v
+ return s
}
-// GoString returns the string representation
-func (s DescribeStackEventsOutput) GoString() string {
- return s.String()
+// SetType sets the Type field's value.
+func (s *DescribeTypeOutput) SetType(v string) *DescribeTypeOutput {
+ s.Type = &v
+ return s
}
-// SetNextToken sets the NextToken field's value.
-func (s *DescribeStackEventsOutput) SetNextToken(v string) *DescribeStackEventsOutput {
- s.NextToken = &v
+// SetTypeName sets the TypeName field's value.
+func (s *DescribeTypeOutput) SetTypeName(v string) *DescribeTypeOutput {
+ s.TypeName = &v
return s
}
-// SetStackEvents sets the StackEvents field's value.
-func (s *DescribeStackEventsOutput) SetStackEvents(v []*StackEvent) *DescribeStackEventsOutput {
- s.StackEvents = v
+// SetVisibility sets the Visibility field's value.
+func (s *DescribeTypeOutput) SetVisibility(v string) *DescribeTypeOutput {
+ s.Visibility = &v
return s
}
-type DescribeStackInstanceInput struct {
+type DescribeTypeRegistrationInput struct {
_ struct{} `type:"structure"`
- // The ID of an AWS account that's associated with this stack instance.
- //
- // StackInstanceAccount is a required field
- StackInstanceAccount *string `type:"string" required:"true"`
-
- // The name of a region that's associated with this stack instance.
+ // The identifier for this registration request.
//
- // StackInstanceRegion is a required field
- StackInstanceRegion *string `type:"string" required:"true"`
-
- // The name or the unique stack ID of the stack set that you want to get stack
- // instance information for.
+ // This registration token is generated by CloudFormation when you initiate
+ // a registration request using RegisterType .
//
- // StackSetName is a required field
- StackSetName *string `type:"string" required:"true"`
+ // RegistrationToken is a required field
+ RegistrationToken *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
-func (s DescribeStackInstanceInput) String() string {
+func (s DescribeTypeRegistrationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackInstanceInput) GoString() string {
+func (s DescribeTypeRegistrationInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeStackInstanceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeStackInstanceInput"}
- if s.StackInstanceAccount == nil {
- invalidParams.Add(request.NewErrParamRequired("StackInstanceAccount"))
- }
- if s.StackInstanceRegion == nil {
- invalidParams.Add(request.NewErrParamRequired("StackInstanceRegion"))
+func (s *DescribeTypeRegistrationInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeTypeRegistrationInput"}
+ if s.RegistrationToken == nil {
+ invalidParams.Add(request.NewErrParamRequired("RegistrationToken"))
}
- if s.StackSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+ if s.RegistrationToken != nil && len(*s.RegistrationToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("RegistrationToken", 1))
}
if invalidParams.Len() > 0 {
@@ -6819,98 +9401,96 @@ func (s *DescribeStackInstanceInput) Validate() error {
return nil
}
-// SetStackInstanceAccount sets the StackInstanceAccount field's value.
-func (s *DescribeStackInstanceInput) SetStackInstanceAccount(v string) *DescribeStackInstanceInput {
- s.StackInstanceAccount = &v
+// SetRegistrationToken sets the RegistrationToken field's value.
+func (s *DescribeTypeRegistrationInput) SetRegistrationToken(v string) *DescribeTypeRegistrationInput {
+ s.RegistrationToken = &v
return s
}
-// SetStackInstanceRegion sets the StackInstanceRegion field's value.
-func (s *DescribeStackInstanceInput) SetStackInstanceRegion(v string) *DescribeStackInstanceInput {
- s.StackInstanceRegion = &v
- return s
-}
+type DescribeTypeRegistrationOutput struct {
+ _ struct{} `type:"structure"`
-// SetStackSetName sets the StackSetName field's value.
-func (s *DescribeStackInstanceInput) SetStackSetName(v string) *DescribeStackInstanceInput {
- s.StackSetName = &v
- return s
-}
+ // The description of the type registration request.
+ Description *string `min:"1" type:"string"`
-type DescribeStackInstanceOutput struct {
- _ struct{} `type:"structure"`
+ // The current status of the type registration request.
+ ProgressStatus *string `type:"string" enum:"RegistrationStatus"`
- // The stack instance that matches the specified request parameters.
- StackInstance *StackInstance `type:"structure"`
+ // The Amazon Resource Name (ARN) of the type being registered.
+ //
+ // For registration requests with a ProgressStatus of other than COMPLETE, this
+ // will be null.
+ TypeArn *string `type:"string"`
+
+ // The Amazon Resource Name (ARN) of this specific version of the type being
+ // registered.
+ //
+ // For registration requests with a ProgressStatus of other than COMPLETE, this
+ // will be null.
+ TypeVersionArn *string `type:"string"`
}
// String returns the string representation
-func (s DescribeStackInstanceOutput) String() string {
+func (s DescribeTypeRegistrationOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackInstanceOutput) GoString() string {
+func (s DescribeTypeRegistrationOutput) GoString() string {
return s.String()
}
-// SetStackInstance sets the StackInstance field's value.
-func (s *DescribeStackInstanceOutput) SetStackInstance(v *StackInstance) *DescribeStackInstanceOutput {
- s.StackInstance = v
+// SetDescription sets the Description field's value.
+func (s *DescribeTypeRegistrationOutput) SetDescription(v string) *DescribeTypeRegistrationOutput {
+ s.Description = &v
return s
}
-type DescribeStackResourceDriftsInput struct {
- _ struct{} `type:"structure"`
+// SetProgressStatus sets the ProgressStatus field's value.
+func (s *DescribeTypeRegistrationOutput) SetProgressStatus(v string) *DescribeTypeRegistrationOutput {
+ s.ProgressStatus = &v
+ return s
+}
- // The maximum number of results to be returned with a single call. If the number
- // of available results exceeds this maximum, the response includes a NextToken
- // value that you can assign to the NextToken request parameter to get the next
- // set of results.
- MaxResults *int64 `min:"1" type:"integer"`
+// SetTypeArn sets the TypeArn field's value.
+func (s *DescribeTypeRegistrationOutput) SetTypeArn(v string) *DescribeTypeRegistrationOutput {
+ s.TypeArn = &v
+ return s
+}
- // A string that identifies the next page of stack resource drift results.
- NextToken *string `min:"1" type:"string"`
+// SetTypeVersionArn sets the TypeVersionArn field's value.
+func (s *DescribeTypeRegistrationOutput) SetTypeVersionArn(v string) *DescribeTypeRegistrationOutput {
+ s.TypeVersionArn = &v
+ return s
+}
- // The name of the stack for which you want drift information.
+type DetectStackDriftInput struct {
+ _ struct{} `type:"structure"`
+
+ // The logical names of any resources you want to use as filters.
+ LogicalResourceIds []*string `min:"1" type:"list"`
+
+ // The name of the stack for which you want to detect drift.
//
// StackName is a required field
StackName *string `min:"1" type:"string" required:"true"`
-
- // The resource drift status values to use as filters for the resource drift
- // results returned.
- //
- // * DELETED: The resource differs from its expected template configuration
- // in that the resource has been deleted.
- //
- // * MODIFIED: One or more resource properties differ from their expected
- // template values.
- //
- // * IN_SYNC: The resources's actual configuration matches its expected template
- // configuration.
- //
- // * NOT_CHECKED: AWS CloudFormation does not currently return this value.
- StackResourceDriftStatusFilters []*string `min:"1" type:"list"`
}
// String returns the string representation
-func (s DescribeStackResourceDriftsInput) String() string {
+func (s DetectStackDriftInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackResourceDriftsInput) GoString() string {
+func (s DetectStackDriftInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeStackResourceDriftsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeStackResourceDriftsInput"}
- 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))
+func (s *DetectStackDriftInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DetectStackDriftInput"}
+ if s.LogicalResourceIds != nil && len(s.LogicalResourceIds) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("LogicalResourceIds", 1))
}
if s.StackName == nil {
invalidParams.Add(request.NewErrParamRequired("StackName"))
@@ -6918,9 +9498,6 @@ func (s *DescribeStackResourceDriftsInput) Validate() error {
if s.StackName != nil && len(*s.StackName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
}
- if s.StackResourceDriftStatusFilters != nil && len(s.StackResourceDriftStatusFilters) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StackResourceDriftStatusFilters", 1))
- }
if invalidParams.Len() > 0 {
return invalidParams
@@ -6928,119 +9505,83 @@ func (s *DescribeStackResourceDriftsInput) Validate() error {
return nil
}
-// SetMaxResults sets the MaxResults field's value.
-func (s *DescribeStackResourceDriftsInput) SetMaxResults(v int64) *DescribeStackResourceDriftsInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *DescribeStackResourceDriftsInput) SetNextToken(v string) *DescribeStackResourceDriftsInput {
- s.NextToken = &v
+// SetLogicalResourceIds sets the LogicalResourceIds field's value.
+func (s *DetectStackDriftInput) SetLogicalResourceIds(v []*string) *DetectStackDriftInput {
+ s.LogicalResourceIds = v
return s
}
// SetStackName sets the StackName field's value.
-func (s *DescribeStackResourceDriftsInput) SetStackName(v string) *DescribeStackResourceDriftsInput {
+func (s *DetectStackDriftInput) SetStackName(v string) *DetectStackDriftInput {
s.StackName = &v
return s
}
-// SetStackResourceDriftStatusFilters sets the StackResourceDriftStatusFilters field's value.
-func (s *DescribeStackResourceDriftsInput) SetStackResourceDriftStatusFilters(v []*string) *DescribeStackResourceDriftsInput {
- s.StackResourceDriftStatusFilters = v
- return s
-}
-
-type DescribeStackResourceDriftsOutput struct {
+type DetectStackDriftOutput struct {
_ struct{} `type:"structure"`
- // If the request doesn't return all of the remaining results, NextToken is
- // set to a token. To retrieve the next set of results, call DescribeStackResourceDrifts
- // again and assign that token to the request object's NextToken parameter.
- // If the request returns all results, NextToken is set to null.
- NextToken *string `min:"1" type:"string"`
-
- // Drift information for the resources that have been checked for drift in the
- // specified stack. This includes actual and expected configuration values for
- // resources where AWS CloudFormation detects drift.
+ // The ID of the drift detection results of this operation.
//
- // For a given stack, there will be one StackResourceDrift for each stack resource
- // that has been checked for drift. Resources that have not yet been checked
- // for drift are not included. Resources that do not currently support drift
- // detection are not checked, and so not included. For a list of resources that
- // support drift detection, see Resources that Support Drift Detection (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html).
+ // AWS CloudFormation generates new results, with a new drift detection ID,
+ // each time this operation is run. However, the number of drift results AWS
+ // CloudFormation retains for any given stack, and for how long, may vary.
//
- // StackResourceDrifts is a required field
- StackResourceDrifts []*StackResourceDrift `type:"list" required:"true"`
+ // StackDriftDetectionId is a required field
+ StackDriftDetectionId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
-func (s DescribeStackResourceDriftsOutput) String() string {
+func (s DetectStackDriftOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackResourceDriftsOutput) GoString() string {
+func (s DetectStackDriftOutput) GoString() string {
return s.String()
}
-// SetNextToken sets the NextToken field's value.
-func (s *DescribeStackResourceDriftsOutput) SetNextToken(v string) *DescribeStackResourceDriftsOutput {
- s.NextToken = &v
- return s
-}
-
-// SetStackResourceDrifts sets the StackResourceDrifts field's value.
-func (s *DescribeStackResourceDriftsOutput) SetStackResourceDrifts(v []*StackResourceDrift) *DescribeStackResourceDriftsOutput {
- s.StackResourceDrifts = v
+// SetStackDriftDetectionId sets the StackDriftDetectionId field's value.
+func (s *DetectStackDriftOutput) SetStackDriftDetectionId(v string) *DetectStackDriftOutput {
+ s.StackDriftDetectionId = &v
return s
}
-// The input for DescribeStackResource action.
-type DescribeStackResourceInput struct {
+type DetectStackResourceDriftInput struct {
_ struct{} `type:"structure"`
- // The logical name of the resource as specified in the template.
- //
- // Default: There is no default value.
+ // The logical name of the resource for which to return drift information.
//
// LogicalResourceId is a required field
LogicalResourceId *string `type:"string" required:"true"`
- // The name or the unique stack ID that is associated with the stack, which
- // are not always interchangeable:
- //
- // * Running stacks: You can specify either the stack's name or its unique
- // stack ID.
- //
- // * Deleted stacks: You must specify the unique stack ID.
- //
- // Default: There is no default value.
+ // The name of the stack to which the resource belongs.
//
// StackName is a required field
- StackName *string `type:"string" required:"true"`
+ StackName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
-func (s DescribeStackResourceInput) String() string {
+func (s DetectStackResourceDriftInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackResourceInput) GoString() string {
+func (s DetectStackResourceDriftInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeStackResourceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeStackResourceInput"}
+func (s *DetectStackResourceDriftInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DetectStackResourceDriftInput"}
if s.LogicalResourceId == nil {
invalidParams.Add(request.NewErrParamRequired("LogicalResourceId"))
}
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
@@ -7049,205 +9590,182 @@ func (s *DescribeStackResourceInput) Validate() error {
}
// SetLogicalResourceId sets the LogicalResourceId field's value.
-func (s *DescribeStackResourceInput) SetLogicalResourceId(v string) *DescribeStackResourceInput {
+func (s *DetectStackResourceDriftInput) SetLogicalResourceId(v string) *DetectStackResourceDriftInput {
s.LogicalResourceId = &v
return s
}
// SetStackName sets the StackName field's value.
-func (s *DescribeStackResourceInput) SetStackName(v string) *DescribeStackResourceInput {
+func (s *DetectStackResourceDriftInput) SetStackName(v string) *DetectStackResourceDriftInput {
s.StackName = &v
return s
}
-// The output for a DescribeStackResource action.
-type DescribeStackResourceOutput struct {
+type DetectStackResourceDriftOutput struct {
_ struct{} `type:"structure"`
- // A StackResourceDetail structure containing the description of the specified
- // resource in the specified stack.
- StackResourceDetail *StackResourceDetail `type:"structure"`
+ // Information about whether the resource's actual configuration has drifted
+ // from its expected template configuration, including actual and expected property
+ // values and any differences detected.
+ //
+ // StackResourceDrift is a required field
+ StackResourceDrift *StackResourceDrift `type:"structure" required:"true"`
}
// String returns the string representation
-func (s DescribeStackResourceOutput) String() string {
+func (s DetectStackResourceDriftOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackResourceOutput) GoString() string {
+func (s DetectStackResourceDriftOutput) GoString() string {
return s.String()
}
-// SetStackResourceDetail sets the StackResourceDetail field's value.
-func (s *DescribeStackResourceOutput) SetStackResourceDetail(v *StackResourceDetail) *DescribeStackResourceOutput {
- s.StackResourceDetail = v
+// SetStackResourceDrift sets the StackResourceDrift field's value.
+func (s *DetectStackResourceDriftOutput) SetStackResourceDrift(v *StackResourceDrift) *DetectStackResourceDriftOutput {
+ s.StackResourceDrift = v
return s
}
-// The input for DescribeStackResources action.
-type DescribeStackResourcesInput struct {
+type DetectStackSetDriftInput struct {
_ struct{} `type:"structure"`
- // The logical name of the resource as specified in the template.
- //
- // Default: There is no default value.
- LogicalResourceId *string `type:"string"`
+ // The ID of the stack set operation.
+ OperationId *string `min:"1" type:"string" idempotencyToken:"true"`
- // The name or unique identifier that corresponds to a physical instance ID
- // of a resource supported by AWS CloudFormation.
- //
- // For example, for an Amazon Elastic Compute Cloud (EC2) instance, PhysicalResourceId
- // corresponds to the InstanceId. You can pass the EC2 InstanceId to DescribeStackResources
- // to find which stack the instance belongs to and what other resources are
- // part of the stack.
- //
- // Required: Conditional. If you do not specify PhysicalResourceId, you must
- // specify StackName.
+ // The user-specified preferences for how AWS CloudFormation performs a stack
+ // set operation.
//
- // Default: There is no default value.
- PhysicalResourceId *string `type:"string"`
+ // For more information on maximum concurrent accounts and failure tolerance,
+ // see Stack set operation options (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-ops-options).
+ OperationPreferences *StackSetOperationPreferences `type:"structure"`
- // The name or the unique stack ID that is associated with the stack, which
- // are not always interchangeable:
- //
- // * Running stacks: You can specify either the stack's name or its unique
- // stack ID.
- //
- // * Deleted stacks: You must specify the unique stack ID.
+ // The name of the stack set on which to perform the drift detection operation.
//
- // Default: There is no default value.
- //
- // Required: Conditional. If you do not specify StackName, you must specify
- // PhysicalResourceId.
- StackName *string `type:"string"`
+ // StackSetName is a required field
+ StackSetName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s DescribeStackResourcesInput) String() string {
+func (s DetectStackSetDriftInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackResourcesInput) GoString() string {
+func (s DetectStackSetDriftInput) GoString() string {
return s.String()
}
-// SetLogicalResourceId sets the LogicalResourceId field's value.
-func (s *DescribeStackResourcesInput) SetLogicalResourceId(v string) *DescribeStackResourcesInput {
- s.LogicalResourceId = &v
- return s
-}
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DetectStackSetDriftInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DetectStackSetDriftInput"}
+ if s.OperationId != nil && len(*s.OperationId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("OperationId", 1))
+ }
+ if s.StackSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+ }
+ if s.OperationPreferences != nil {
+ if err := s.OperationPreferences.Validate(); err != nil {
+ invalidParams.AddNested("OperationPreferences", err.(request.ErrInvalidParams))
+ }
+ }
-// SetPhysicalResourceId sets the PhysicalResourceId field's value.
-func (s *DescribeStackResourcesInput) SetPhysicalResourceId(v string) *DescribeStackResourcesInput {
- s.PhysicalResourceId = &v
- return s
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
}
-// SetStackName sets the StackName field's value.
-func (s *DescribeStackResourcesInput) SetStackName(v string) *DescribeStackResourcesInput {
- s.StackName = &v
+// SetOperationId sets the OperationId field's value.
+func (s *DetectStackSetDriftInput) SetOperationId(v string) *DetectStackSetDriftInput {
+ s.OperationId = &v
return s
}
-// The output for a DescribeStackResources action.
-type DescribeStackResourcesOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of StackResource structures.
- StackResources []*StackResource `type:"list"`
-}
-
-// String returns the string representation
-func (s DescribeStackResourcesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeStackResourcesOutput) GoString() string {
- return s.String()
+// SetOperationPreferences sets the OperationPreferences field's value.
+func (s *DetectStackSetDriftInput) SetOperationPreferences(v *StackSetOperationPreferences) *DetectStackSetDriftInput {
+ s.OperationPreferences = v
+ return s
}
-// SetStackResources sets the StackResources field's value.
-func (s *DescribeStackResourcesOutput) SetStackResources(v []*StackResource) *DescribeStackResourcesOutput {
- s.StackResources = v
+// SetStackSetName sets the StackSetName field's value.
+func (s *DetectStackSetDriftInput) SetStackSetName(v string) *DetectStackSetDriftInput {
+ s.StackSetName = &v
return s
}
-type DescribeStackSetInput struct {
+type DetectStackSetDriftOutput struct {
_ struct{} `type:"structure"`
- // The name or unique ID of the stack set whose description you want.
+ // The ID of the drift detection stack set operation.
//
- // StackSetName is a required field
- StackSetName *string `type:"string" required:"true"`
+ // you can use this operation id with DescribeStackSetOperation to monitor the
+ // progress of the drift detection operation.
+ OperationId *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s DescribeStackSetInput) String() string {
+func (s DetectStackSetDriftOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackSetInput) GoString() string {
+func (s DetectStackSetDriftOutput) GoString() string {
return s.String()
}
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeStackSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeStackSetInput"}
- if s.StackSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackSetName"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetStackSetName sets the StackSetName field's value.
-func (s *DescribeStackSetInput) SetStackSetName(v string) *DescribeStackSetInput {
- s.StackSetName = &v
+// SetOperationId sets the OperationId field's value.
+func (s *DetectStackSetDriftOutput) SetOperationId(v string) *DetectStackSetDriftOutput {
+ s.OperationId = &v
return s
}
-type DescribeStackSetOperationInput struct {
+// The input for an EstimateTemplateCost action.
+type EstimateTemplateCostInput struct {
_ struct{} `type:"structure"`
- // The unique ID of the stack set operation.
+ // A list of Parameter structures that specify input parameters.
+ Parameters []*Parameter `type:"list"`
+
+ // Structure containing the template body with a minimum length of 1 byte and
+ // a maximum length of 51,200 bytes. (For more information, go to Template Anatomy
+ // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
+ // in the AWS CloudFormation User Guide.)
//
- // OperationId is a required field
- OperationId *string `min:"1" type:"string" required:"true"`
+ // Conditional: You must pass TemplateBody or TemplateURL. If both are passed,
+ // only TemplateBody is used.
+ TemplateBody *string `min:"1" type:"string"`
- // The name or the unique stack ID of the stack set for the stack operation.
+ // Location of file containing the template body. The URL must point to a template
+ // that is located in an Amazon S3 bucket. For more information, go to Template
+ // Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
+ // in the AWS CloudFormation User Guide.
//
- // StackSetName is a required field
- StackSetName *string `type:"string" required:"true"`
+ // Conditional: You must pass TemplateURL or TemplateBody. If both are passed,
+ // only TemplateBody is used.
+ TemplateURL *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s DescribeStackSetOperationInput) String() string {
+func (s EstimateTemplateCostInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackSetOperationInput) GoString() string {
+func (s EstimateTemplateCostInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeStackSetOperationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeStackSetOperationInput"}
- if s.OperationId == nil {
- invalidParams.Add(request.NewErrParamRequired("OperationId"))
- }
- if s.OperationId != nil && len(*s.OperationId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("OperationId", 1))
+func (s *EstimateTemplateCostInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "EstimateTemplateCostInput"}
+ if s.TemplateBody != nil && len(*s.TemplateBody) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1))
}
- if s.StackSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+ if s.TemplateURL != nil && len(*s.TemplateURL) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1))
}
if invalidParams.Len() > 0 {
@@ -7256,98 +9774,95 @@ func (s *DescribeStackSetOperationInput) Validate() error {
return nil
}
-// SetOperationId sets the OperationId field's value.
-func (s *DescribeStackSetOperationInput) SetOperationId(v string) *DescribeStackSetOperationInput {
- s.OperationId = &v
+// SetParameters sets the Parameters field's value.
+func (s *EstimateTemplateCostInput) SetParameters(v []*Parameter) *EstimateTemplateCostInput {
+ s.Parameters = v
return s
}
-// SetStackSetName sets the StackSetName field's value.
-func (s *DescribeStackSetOperationInput) SetStackSetName(v string) *DescribeStackSetOperationInput {
- s.StackSetName = &v
+// SetTemplateBody sets the TemplateBody field's value.
+func (s *EstimateTemplateCostInput) SetTemplateBody(v string) *EstimateTemplateCostInput {
+ s.TemplateBody = &v
return s
}
-type DescribeStackSetOperationOutput struct {
- _ struct{} `type:"structure"`
-
- // The specified stack set operation.
- StackSetOperation *StackSetOperation `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeStackSetOperationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeStackSetOperationOutput) GoString() string {
- return s.String()
-}
-
-// SetStackSetOperation sets the StackSetOperation field's value.
-func (s *DescribeStackSetOperationOutput) SetStackSetOperation(v *StackSetOperation) *DescribeStackSetOperationOutput {
- s.StackSetOperation = v
+// SetTemplateURL sets the TemplateURL field's value.
+func (s *EstimateTemplateCostInput) SetTemplateURL(v string) *EstimateTemplateCostInput {
+ s.TemplateURL = &v
return s
}
-type DescribeStackSetOutput struct {
+// The output for a EstimateTemplateCost action.
+type EstimateTemplateCostOutput struct {
_ struct{} `type:"structure"`
- // The specified stack set.
- StackSet *StackSet `type:"structure"`
+ // An AWS Simple Monthly Calculator URL with a query string that describes the
+ // resources required to run the template.
+ Url *string `type:"string"`
}
// String returns the string representation
-func (s DescribeStackSetOutput) String() string {
+func (s EstimateTemplateCostOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStackSetOutput) GoString() string {
+func (s EstimateTemplateCostOutput) GoString() string {
return s.String()
}
-// SetStackSet sets the StackSet field's value.
-func (s *DescribeStackSetOutput) SetStackSet(v *StackSet) *DescribeStackSetOutput {
- s.StackSet = v
+// SetUrl sets the Url field's value.
+func (s *EstimateTemplateCostOutput) SetUrl(v string) *EstimateTemplateCostOutput {
+ s.Url = &v
return s
}
-// The input for DescribeStacks action.
-type DescribeStacksInput struct {
+// The input for the ExecuteChangeSet action.
+type ExecuteChangeSetInput struct {
_ struct{} `type:"structure"`
- // A string that identifies the next page of stacks that you want to retrieve.
- NextToken *string `min:"1" type:"string"`
-
- // The name or the unique stack ID that is associated with the stack, which
- // are not always interchangeable:
- //
- // * Running stacks: You can specify either the stack's name or its unique
- // stack ID.
- //
- // * Deleted stacks: You must specify the unique stack ID.
+ // The name or ARN of the change set that you want use to update the specified
+ // stack.
//
- // Default: There is no default value.
- StackName *string `type:"string"`
+ // ChangeSetName is a required field
+ ChangeSetName *string `min:"1" type:"string" required:"true"`
+
+ // A unique identifier for this ExecuteChangeSet request. Specify this token
+ // if you plan to retry requests so that AWS CloudFormation knows that you're
+ // not attempting to execute a change set to update a stack with the same name.
+ // You might retry ExecuteChangeSet requests to ensure that AWS CloudFormation
+ // successfully received them.
+ ClientRequestToken *string `min:"1" type:"string"`
+
+ // If you specified the name of a change set, specify the stack name or ID (ARN)
+ // that is associated with the change set you want to execute.
+ StackName *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s DescribeStacksInput) String() string {
+func (s ExecuteChangeSetInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStacksInput) GoString() string {
+func (s ExecuteChangeSetInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeStacksInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeStacksInput"}
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
+func (s *ExecuteChangeSetInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ExecuteChangeSetInput"}
+ if s.ChangeSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("ChangeSetName"))
+ }
+ if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
+ }
+ if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
+ }
+ if s.StackName != nil && len(*s.StackName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
}
if invalidParams.Len() > 0 {
@@ -7356,86 +9871,111 @@ func (s *DescribeStacksInput) Validate() error {
return nil
}
-// SetNextToken sets the NextToken field's value.
-func (s *DescribeStacksInput) SetNextToken(v string) *DescribeStacksInput {
- s.NextToken = &v
+// SetChangeSetName sets the ChangeSetName field's value.
+func (s *ExecuteChangeSetInput) SetChangeSetName(v string) *ExecuteChangeSetInput {
+ s.ChangeSetName = &v
+ return s
+}
+
+// SetClientRequestToken sets the ClientRequestToken field's value.
+func (s *ExecuteChangeSetInput) SetClientRequestToken(v string) *ExecuteChangeSetInput {
+ s.ClientRequestToken = &v
return s
}
// SetStackName sets the StackName field's value.
-func (s *DescribeStacksInput) SetStackName(v string) *DescribeStacksInput {
+func (s *ExecuteChangeSetInput) SetStackName(v string) *ExecuteChangeSetInput {
s.StackName = &v
return s
}
-// The output for a DescribeStacks action.
-type DescribeStacksOutput struct {
+// The output for the ExecuteChangeSet action.
+type ExecuteChangeSetOutput struct {
_ struct{} `type:"structure"`
+}
- // If the output exceeds 1 MB in size, a string that identifies the next page
- // of stacks. If no additional page exists, this value is null.
- NextToken *string `min:"1" type:"string"`
+// String returns the string representation
+func (s ExecuteChangeSetOutput) String() string {
+ return awsutil.Prettify(s)
+}
- // A list of stack structures.
- Stacks []*Stack `type:"list"`
+// GoString returns the string representation
+func (s ExecuteChangeSetOutput) GoString() string {
+ return s.String()
+}
+
+// The Export structure describes the exported output values for a stack.
+type Export struct {
+ _ struct{} `type:"structure"`
+
+ // The stack that contains the exported output name and value.
+ ExportingStackId *string `type:"string"`
+
+ // The name of exported output value. Use this name and the Fn::ImportValue
+ // function to import the associated value into other stacks. The name is defined
+ // in the Export field in the associated stack's Outputs section.
+ Name *string `type:"string"`
+
+ // The value of the exported output, such as a resource physical ID. This value
+ // is defined in the Export field in the associated stack's Outputs section.
+ Value *string `type:"string"`
}
// String returns the string representation
-func (s DescribeStacksOutput) String() string {
+func (s Export) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DescribeStacksOutput) GoString() string {
+func (s Export) GoString() string {
return s.String()
}
-// SetNextToken sets the NextToken field's value.
-func (s *DescribeStacksOutput) SetNextToken(v string) *DescribeStacksOutput {
- s.NextToken = &v
+// SetExportingStackId sets the ExportingStackId field's value.
+func (s *Export) SetExportingStackId(v string) *Export {
+ s.ExportingStackId = &v
return s
}
-// SetStacks sets the Stacks field's value.
-func (s *DescribeStacksOutput) SetStacks(v []*Stack) *DescribeStacksOutput {
- s.Stacks = v
+// SetName sets the Name field's value.
+func (s *Export) SetName(v string) *Export {
+ s.Name = &v
return s
}
-type DetectStackDriftInput struct {
- _ struct{} `type:"structure"`
+// SetValue sets the Value field's value.
+func (s *Export) SetValue(v string) *Export {
+ s.Value = &v
+ return s
+}
- // The logical names of any resources you want to use as filters.
- LogicalResourceIds []*string `min:"1" type:"list"`
+// The input for the GetStackPolicy action.
+type GetStackPolicyInput struct {
+ _ struct{} `type:"structure"`
- // The name of the stack for which you want to detect drift.
+ // The name or unique stack ID that is associated with the stack whose policy
+ // you want to get.
//
// StackName is a required field
- StackName *string `min:"1" type:"string" required:"true"`
+ StackName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s DetectStackDriftInput) String() string {
+func (s GetStackPolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DetectStackDriftInput) GoString() string {
+func (s GetStackPolicyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DetectStackDriftInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DetectStackDriftInput"}
- if s.LogicalResourceIds != nil && len(s.LogicalResourceIds) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogicalResourceIds", 1))
- }
+func (s *GetStackPolicyInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "GetStackPolicyInput"}
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
@@ -7443,82 +9983,83 @@ func (s *DetectStackDriftInput) Validate() error {
return nil
}
-// SetLogicalResourceIds sets the LogicalResourceIds field's value.
-func (s *DetectStackDriftInput) SetLogicalResourceIds(v []*string) *DetectStackDriftInput {
- s.LogicalResourceIds = v
- return s
-}
-
// SetStackName sets the StackName field's value.
-func (s *DetectStackDriftInput) SetStackName(v string) *DetectStackDriftInput {
+func (s *GetStackPolicyInput) SetStackName(v string) *GetStackPolicyInput {
s.StackName = &v
return s
}
-type DetectStackDriftOutput struct {
+// The output for the GetStackPolicy action.
+type GetStackPolicyOutput struct {
_ struct{} `type:"structure"`
- // The ID of the drift detection results of this operation.
- //
- // AWS CloudFormation generates new results, with a new drift detection ID,
- // each time this operation is run. However, the number of drift results AWS
- // CloudFormation retains for any given stack, and for how long, may vary.
- //
- // StackDriftDetectionId is a required field
- StackDriftDetectionId *string `min:"1" type:"string" required:"true"`
+ // Structure containing the stack policy body. (For more information, go to
+ // Prevent Updates to Stack Resources (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html)
+ // in the AWS CloudFormation User Guide.)
+ StackPolicyBody *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s DetectStackDriftOutput) String() string {
+func (s GetStackPolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DetectStackDriftOutput) GoString() string {
+func (s GetStackPolicyOutput) GoString() string {
return s.String()
}
-// SetStackDriftDetectionId sets the StackDriftDetectionId field's value.
-func (s *DetectStackDriftOutput) SetStackDriftDetectionId(v string) *DetectStackDriftOutput {
- s.StackDriftDetectionId = &v
+// SetStackPolicyBody sets the StackPolicyBody field's value.
+func (s *GetStackPolicyOutput) SetStackPolicyBody(v string) *GetStackPolicyOutput {
+ s.StackPolicyBody = &v
return s
}
-type DetectStackResourceDriftInput struct {
+// The input for a GetTemplate action.
+type GetTemplateInput struct {
_ struct{} `type:"structure"`
- // The logical name of the resource for which to return drift information.
+ // The name or Amazon Resource Name (ARN) of a change set for which AWS CloudFormation
+ // returns the associated template. If you specify a name, you must also specify
+ // the StackName.
+ ChangeSetName *string `min:"1" type:"string"`
+
+ // The name or the unique stack ID that is associated with the stack, which
+ // are not always interchangeable:
//
- // LogicalResourceId is a required field
- LogicalResourceId *string `type:"string" required:"true"`
+ // * Running stacks: You can specify either the stack's name or its unique
+ // stack ID.
+ //
+ // * Deleted stacks: You must specify the unique stack ID.
+ //
+ // Default: There is no default value.
+ StackName *string `type:"string"`
- // The name of the stack to which the resource belongs.
+ // For templates that include transforms, the stage of the template that AWS
+ // CloudFormation returns. To get the user-submitted template, specify Original.
+ // To get the template after AWS CloudFormation has processed all transforms,
+ // specify Processed.
//
- // StackName is a required field
- StackName *string `min:"1" type:"string" required:"true"`
+ // If the template doesn't include transforms, Original and Processed return
+ // the same template. By default, AWS CloudFormation specifies Original.
+ TemplateStage *string `type:"string" enum:"TemplateStage"`
}
// String returns the string representation
-func (s DetectStackResourceDriftInput) String() string {
+func (s GetTemplateInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DetectStackResourceDriftInput) GoString() string {
+func (s GetTemplateInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *DetectStackResourceDriftInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DetectStackResourceDriftInput"}
- if s.LogicalResourceId == nil {
- invalidParams.Add(request.NewErrParamRequired("LogicalResourceId"))
- }
- if s.StackName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackName"))
- }
- if s.StackName != nil && len(*s.StackName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
+func (s *GetTemplateInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "GetTemplateInput"}
+ if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
}
if invalidParams.Len() > 0 {
@@ -7527,84 +10068,119 @@ func (s *DetectStackResourceDriftInput) Validate() error {
return nil
}
-// SetLogicalResourceId sets the LogicalResourceId field's value.
-func (s *DetectStackResourceDriftInput) SetLogicalResourceId(v string) *DetectStackResourceDriftInput {
- s.LogicalResourceId = &v
+// SetChangeSetName sets the ChangeSetName field's value.
+func (s *GetTemplateInput) SetChangeSetName(v string) *GetTemplateInput {
+ s.ChangeSetName = &v
return s
}
// SetStackName sets the StackName field's value.
-func (s *DetectStackResourceDriftInput) SetStackName(v string) *DetectStackResourceDriftInput {
+func (s *GetTemplateInput) SetStackName(v string) *GetTemplateInput {
s.StackName = &v
return s
}
-type DetectStackResourceDriftOutput struct {
+// SetTemplateStage sets the TemplateStage field's value.
+func (s *GetTemplateInput) SetTemplateStage(v string) *GetTemplateInput {
+ s.TemplateStage = &v
+ return s
+}
+
+// The output for GetTemplate action.
+type GetTemplateOutput struct {
_ struct{} `type:"structure"`
- // Information about whether the resource's actual configuration has drifted
- // from its expected template configuration, including actual and expected property
- // values and any differences detected.
+ // The stage of the template that you can retrieve. For stacks, the Original
+ // and Processed templates are always available. For change sets, the Original
+ // template is always available. After AWS CloudFormation finishes creating
+ // the change set, the Processed template becomes available.
+ StagesAvailable []*string `type:"list"`
+
+ // Structure containing the template body. (For more information, go to Template
+ // Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
+ // in the AWS CloudFormation User Guide.)
//
- // StackResourceDrift is a required field
- StackResourceDrift *StackResourceDrift `type:"structure" required:"true"`
+ // AWS CloudFormation returns the same template that was used when the stack
+ // was created.
+ TemplateBody *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s DetectStackResourceDriftOutput) String() string {
+func (s GetTemplateOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s DetectStackResourceDriftOutput) GoString() string {
+func (s GetTemplateOutput) GoString() string {
return s.String()
}
-// SetStackResourceDrift sets the StackResourceDrift field's value.
-func (s *DetectStackResourceDriftOutput) SetStackResourceDrift(v *StackResourceDrift) *DetectStackResourceDriftOutput {
- s.StackResourceDrift = v
+// SetStagesAvailable sets the StagesAvailable field's value.
+func (s *GetTemplateOutput) SetStagesAvailable(v []*string) *GetTemplateOutput {
+ s.StagesAvailable = v
return s
}
-// The input for an EstimateTemplateCost action.
-type EstimateTemplateCostInput struct {
+// SetTemplateBody sets the TemplateBody field's value.
+func (s *GetTemplateOutput) SetTemplateBody(v string) *GetTemplateOutput {
+ s.TemplateBody = &v
+ return s
+}
+
+// The input for the GetTemplateSummary action.
+type GetTemplateSummaryInput struct {
_ struct{} `type:"structure"`
- // A list of Parameter structures that specify input parameters.
- Parameters []*Parameter `type:"list"`
+ // The name or the stack ID that is associated with the stack, which are not
+ // always interchangeable. For running stacks, you can specify either the stack's
+ // name or its unique stack ID. For deleted stack, you must specify the unique
+ // stack ID.
+ //
+ // Conditional: You must specify only one of the following parameters: StackName,
+ // StackSetName, TemplateBody, or TemplateURL.
+ StackName *string `min:"1" type:"string"`
+
+ // The name or unique ID of the stack set from which the stack was created.
+ //
+ // Conditional: You must specify only one of the following parameters: StackName,
+ // StackSetName, TemplateBody, or TemplateURL.
+ StackSetName *string `type:"string"`
// Structure containing the template body with a minimum length of 1 byte and
- // a maximum length of 51,200 bytes. (For more information, go to Template Anatomy
- // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
- // in the AWS CloudFormation User Guide.)
+ // a maximum length of 51,200 bytes. For more information about templates, see
+ // Template Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
+ // in the AWS CloudFormation User Guide.
//
- // Conditional: You must pass TemplateBody or TemplateURL. If both are passed,
- // only TemplateBody is used.
+ // Conditional: You must specify only one of the following parameters: StackName,
+ // StackSetName, TemplateBody, or TemplateURL.
TemplateBody *string `min:"1" type:"string"`
// Location of file containing the template body. The URL must point to a template
- // that is located in an Amazon S3 bucket. For more information, go to Template
- // Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
+ // (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more
+ // information about templates, see Template Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
// in the AWS CloudFormation User Guide.
//
- // Conditional: You must pass TemplateURL or TemplateBody. If both are passed,
- // only TemplateBody is used.
+ // Conditional: You must specify only one of the following parameters: StackName,
+ // StackSetName, TemplateBody, or TemplateURL.
TemplateURL *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s EstimateTemplateCostInput) String() string {
+func (s GetTemplateSummaryInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s EstimateTemplateCostInput) GoString() string {
+func (s GetTemplateSummaryInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *EstimateTemplateCostInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EstimateTemplateCostInput"}
+func (s *GetTemplateSummaryInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "GetTemplateSummaryInput"}
+ if s.StackName != nil && len(*s.StackName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
+ }
if s.TemplateBody != nil && len(*s.TemplateBody) < 1 {
invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1))
}
@@ -7618,92 +10194,173 @@ func (s *EstimateTemplateCostInput) Validate() error {
return nil
}
-// SetParameters sets the Parameters field's value.
-func (s *EstimateTemplateCostInput) SetParameters(v []*Parameter) *EstimateTemplateCostInput {
- s.Parameters = v
+// SetStackName sets the StackName field's value.
+func (s *GetTemplateSummaryInput) SetStackName(v string) *GetTemplateSummaryInput {
+ s.StackName = &v
+ return s
+}
+
+// SetStackSetName sets the StackSetName field's value.
+func (s *GetTemplateSummaryInput) SetStackSetName(v string) *GetTemplateSummaryInput {
+ s.StackSetName = &v
return s
}
// SetTemplateBody sets the TemplateBody field's value.
-func (s *EstimateTemplateCostInput) SetTemplateBody(v string) *EstimateTemplateCostInput {
+func (s *GetTemplateSummaryInput) SetTemplateBody(v string) *GetTemplateSummaryInput {
s.TemplateBody = &v
return s
}
// SetTemplateURL sets the TemplateURL field's value.
-func (s *EstimateTemplateCostInput) SetTemplateURL(v string) *EstimateTemplateCostInput {
+func (s *GetTemplateSummaryInput) SetTemplateURL(v string) *GetTemplateSummaryInput {
s.TemplateURL = &v
return s
}
-// The output for a EstimateTemplateCost action.
-type EstimateTemplateCostOutput struct {
+// The output for the GetTemplateSummary action.
+type GetTemplateSummaryOutput struct {
_ struct{} `type:"structure"`
- // An AWS Simple Monthly Calculator URL with a query string that describes the
- // resources required to run the template.
- Url *string `type:"string"`
+ // The capabilities found within the template. If your template contains IAM
+ // resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value
+ // for this parameter when you use the CreateStack or UpdateStack actions with
+ // your template; otherwise, those actions return an InsufficientCapabilities
+ // error.
+ //
+ // For more information, see Acknowledging IAM Resources in AWS CloudFormation
+ // Templates (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities).
+ Capabilities []*string `type:"list"`
+
+ // The list of resources that generated the values in the Capabilities response
+ // element.
+ CapabilitiesReason *string `type:"string"`
+
+ // A list of the transforms that are declared in the template.
+ DeclaredTransforms []*string `type:"list"`
+
+ // The value that is defined in the Description property of the template.
+ Description *string `min:"1" type:"string"`
+
+ // The value that is defined for the Metadata property of the template.
+ Metadata *string `type:"string"`
+
+ // A list of parameter declarations that describe various properties for each
+ // parameter.
+ Parameters []*ParameterDeclaration `type:"list"`
+
+ // A list of resource identifier summaries that describe the target resources
+ // of an import operation and the properties you can provide during the import
+ // to identify the target resources. For example, BucketName is a possible identifier
+ // property for an AWS::S3::Bucket resource.
+ ResourceIdentifierSummaries []*ResourceIdentifierSummary `type:"list"`
+
+ // A list of all the template resource types that are defined in the template,
+ // such as AWS::EC2::Instance, AWS::Dynamo::Table, and Custom::MyCustomInstance.
+ ResourceTypes []*string `type:"list"`
+
+ // The AWS template format version, which identifies the capabilities of the
+ // template.
+ Version *string `type:"string"`
}
// String returns the string representation
-func (s EstimateTemplateCostOutput) String() string {
+func (s GetTemplateSummaryOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s EstimateTemplateCostOutput) GoString() string {
+func (s GetTemplateSummaryOutput) GoString() string {
return s.String()
}
-// SetUrl sets the Url field's value.
-func (s *EstimateTemplateCostOutput) SetUrl(v string) *EstimateTemplateCostOutput {
- s.Url = &v
+// SetCapabilities sets the Capabilities field's value.
+func (s *GetTemplateSummaryOutput) SetCapabilities(v []*string) *GetTemplateSummaryOutput {
+ s.Capabilities = v
+ return s
+}
+
+// SetCapabilitiesReason sets the CapabilitiesReason field's value.
+func (s *GetTemplateSummaryOutput) SetCapabilitiesReason(v string) *GetTemplateSummaryOutput {
+ s.CapabilitiesReason = &v
+ return s
+}
+
+// SetDeclaredTransforms sets the DeclaredTransforms field's value.
+func (s *GetTemplateSummaryOutput) SetDeclaredTransforms(v []*string) *GetTemplateSummaryOutput {
+ s.DeclaredTransforms = v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *GetTemplateSummaryOutput) SetDescription(v string) *GetTemplateSummaryOutput {
+ s.Description = &v
+ return s
+}
+
+// SetMetadata sets the Metadata field's value.
+func (s *GetTemplateSummaryOutput) SetMetadata(v string) *GetTemplateSummaryOutput {
+ s.Metadata = &v
+ return s
+}
+
+// SetParameters sets the Parameters field's value.
+func (s *GetTemplateSummaryOutput) SetParameters(v []*ParameterDeclaration) *GetTemplateSummaryOutput {
+ s.Parameters = v
+ return s
+}
+
+// SetResourceIdentifierSummaries sets the ResourceIdentifierSummaries field's value.
+func (s *GetTemplateSummaryOutput) SetResourceIdentifierSummaries(v []*ResourceIdentifierSummary) *GetTemplateSummaryOutput {
+ s.ResourceIdentifierSummaries = v
+ return s
+}
+
+// SetResourceTypes sets the ResourceTypes field's value.
+func (s *GetTemplateSummaryOutput) SetResourceTypes(v []*string) *GetTemplateSummaryOutput {
+ s.ResourceTypes = v
+ return s
+}
+
+// SetVersion sets the Version field's value.
+func (s *GetTemplateSummaryOutput) SetVersion(v string) *GetTemplateSummaryOutput {
+ s.Version = &v
return s
}
-// The input for the ExecuteChangeSet action.
-type ExecuteChangeSetInput struct {
+// The input for the ListChangeSets action.
+type ListChangeSetsInput struct {
_ struct{} `type:"structure"`
- // The name or ARN of the change set that you want use to update the specified
- // stack.
- //
- // ChangeSetName is a required field
- ChangeSetName *string `min:"1" type:"string" required:"true"`
-
- // A unique identifier for this ExecuteChangeSet request. Specify this token
- // if you plan to retry requests so that AWS CloudFormation knows that you're
- // not attempting to execute a change set to update a stack with the same name.
- // You might retry ExecuteChangeSet requests to ensure that AWS CloudFormation
- // successfully received them.
- ClientRequestToken *string `min:"1" type:"string"`
+ // A string (provided by the ListChangeSets response output) that identifies
+ // the next page of change sets that you want to retrieve.
+ NextToken *string `min:"1" type:"string"`
- // If you specified the name of a change set, specify the stack name or ID (ARN)
- // that is associated with the change set you want to execute.
- StackName *string `min:"1" type:"string"`
+ // The name or the Amazon Resource Name (ARN) of the stack for which you want
+ // to list change sets.
+ //
+ // StackName is a required field
+ StackName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
-func (s ExecuteChangeSetInput) String() string {
+func (s ListChangeSetsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ExecuteChangeSetInput) GoString() string {
+func (s ListChangeSetsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ExecuteChangeSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ExecuteChangeSetInput"}
- if s.ChangeSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeSetName"))
- }
- if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
+func (s *ListChangeSetsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListChangeSetsInput"}
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
+ if s.StackName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackName"))
}
if s.StackName != nil && len(*s.StackName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
@@ -7715,110 +10372,76 @@ func (s *ExecuteChangeSetInput) Validate() error {
return nil
}
-// SetChangeSetName sets the ChangeSetName field's value.
-func (s *ExecuteChangeSetInput) SetChangeSetName(v string) *ExecuteChangeSetInput {
- s.ChangeSetName = &v
- return s
-}
-
-// SetClientRequestToken sets the ClientRequestToken field's value.
-func (s *ExecuteChangeSetInput) SetClientRequestToken(v string) *ExecuteChangeSetInput {
- s.ClientRequestToken = &v
+// SetNextToken sets the NextToken field's value.
+func (s *ListChangeSetsInput) SetNextToken(v string) *ListChangeSetsInput {
+ s.NextToken = &v
return s
}
// SetStackName sets the StackName field's value.
-func (s *ExecuteChangeSetInput) SetStackName(v string) *ExecuteChangeSetInput {
+func (s *ListChangeSetsInput) SetStackName(v string) *ListChangeSetsInput {
s.StackName = &v
return s
}
-// The output for the ExecuteChangeSet action.
-type ExecuteChangeSetOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s ExecuteChangeSetOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ExecuteChangeSetOutput) GoString() string {
- return s.String()
-}
-
-// The Export structure describes the exported output values for a stack.
-type Export struct {
+// The output for the ListChangeSets action.
+type ListChangeSetsOutput struct {
_ struct{} `type:"structure"`
- // The stack that contains the exported output name and value.
- ExportingStackId *string `type:"string"`
-
- // The name of exported output value. Use this name and the Fn::ImportValue
- // function to import the associated value into other stacks. The name is defined
- // in the Export field in the associated stack's Outputs section.
- Name *string `type:"string"`
+ // If the output exceeds 1 MB, a string that identifies the next page of change
+ // sets. If there is no additional page, this value is null.
+ NextToken *string `min:"1" type:"string"`
- // The value of the exported output, such as a resource physical ID. This value
- // is defined in the Export field in the associated stack's Outputs section.
- Value *string `type:"string"`
+ // A list of ChangeSetSummary structures that provides the ID and status of
+ // each change set for the specified stack.
+ Summaries []*ChangeSetSummary `type:"list"`
}
// String returns the string representation
-func (s Export) String() string {
+func (s ListChangeSetsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s Export) GoString() string {
+func (s ListChangeSetsOutput) GoString() string {
return s.String()
}
-// SetExportingStackId sets the ExportingStackId field's value.
-func (s *Export) SetExportingStackId(v string) *Export {
- s.ExportingStackId = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *Export) SetName(v string) *Export {
- s.Name = &v
+// SetNextToken sets the NextToken field's value.
+func (s *ListChangeSetsOutput) SetNextToken(v string) *ListChangeSetsOutput {
+ s.NextToken = &v
return s
}
-// SetValue sets the Value field's value.
-func (s *Export) SetValue(v string) *Export {
- s.Value = &v
+// SetSummaries sets the Summaries field's value.
+func (s *ListChangeSetsOutput) SetSummaries(v []*ChangeSetSummary) *ListChangeSetsOutput {
+ s.Summaries = v
return s
}
-// The input for the GetStackPolicy action.
-type GetStackPolicyInput struct {
+type ListExportsInput struct {
_ struct{} `type:"structure"`
- // The name or unique stack ID that is associated with the stack whose policy
- // you want to get.
- //
- // StackName is a required field
- StackName *string `type:"string" required:"true"`
+ // A string (provided by the ListExports response output) that identifies the
+ // next page of exported output values that you asked to retrieve.
+ NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s GetStackPolicyInput) String() string {
+func (s ListExportsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s GetStackPolicyInput) GoString() string {
+func (s ListExportsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetStackPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetStackPolicyInput"}
- if s.StackName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackName"))
+func (s *ListExportsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListExportsInput"}
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
if invalidParams.Len() > 0 {
@@ -7827,83 +10450,77 @@ func (s *GetStackPolicyInput) Validate() error {
return nil
}
-// SetStackName sets the StackName field's value.
-func (s *GetStackPolicyInput) SetStackName(v string) *GetStackPolicyInput {
- s.StackName = &v
+// SetNextToken sets the NextToken field's value.
+func (s *ListExportsInput) SetNextToken(v string) *ListExportsInput {
+ s.NextToken = &v
return s
}
-// The output for the GetStackPolicy action.
-type GetStackPolicyOutput struct {
+type ListExportsOutput struct {
_ struct{} `type:"structure"`
- // Structure containing the stack policy body. (For more information, go to
- // Prevent Updates to Stack Resources (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html)
- // in the AWS CloudFormation User Guide.)
- StackPolicyBody *string `min:"1" type:"string"`
+ // The output for the ListExports action.
+ Exports []*Export `type:"list"`
+
+ // If the output exceeds 100 exported output values, a string that identifies
+ // the next page of exports. If there is no additional page, this value is null.
+ NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s GetStackPolicyOutput) String() string {
+func (s ListExportsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s GetStackPolicyOutput) GoString() string {
+func (s ListExportsOutput) GoString() string {
return s.String()
}
-// SetStackPolicyBody sets the StackPolicyBody field's value.
-func (s *GetStackPolicyOutput) SetStackPolicyBody(v string) *GetStackPolicyOutput {
- s.StackPolicyBody = &v
+// SetExports sets the Exports field's value.
+func (s *ListExportsOutput) SetExports(v []*Export) *ListExportsOutput {
+ s.Exports = v
return s
}
-// The input for a GetTemplate action.
-type GetTemplateInput struct {
- _ struct{} `type:"structure"`
+// SetNextToken sets the NextToken field's value.
+func (s *ListExportsOutput) SetNextToken(v string) *ListExportsOutput {
+ s.NextToken = &v
+ return s
+}
- // The name or Amazon Resource Name (ARN) of a change set for which AWS CloudFormation
- // returns the associated template. If you specify a name, you must also specify
- // the StackName.
- ChangeSetName *string `min:"1" type:"string"`
+type ListImportsInput struct {
+ _ struct{} `type:"structure"`
- // The name or the unique stack ID that is associated with the stack, which
- // are not always interchangeable:
- //
- // * Running stacks: You can specify either the stack's name or its unique
- // stack ID.
- //
- // * Deleted stacks: You must specify the unique stack ID.
+ // The name of the exported output value. AWS CloudFormation returns the stack
+ // names that are importing this value.
//
- // Default: There is no default value.
- StackName *string `type:"string"`
+ // ExportName is a required field
+ ExportName *string `type:"string" required:"true"`
- // For templates that include transforms, the stage of the template that AWS
- // CloudFormation returns. To get the user-submitted template, specify Original.
- // To get the template after AWS CloudFormation has processed all transforms,
- // specify Processed.
- //
- // If the template doesn't include transforms, Original and Processed return
- // the same template. By default, AWS CloudFormation specifies Original.
- TemplateStage *string `type:"string" enum:"TemplateStage"`
+ // A string (provided by the ListImports response output) that identifies the
+ // next page of stacks that are importing the specified exported output value.
+ NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s GetTemplateInput) String() string {
+func (s ListImportsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s GetTemplateInput) GoString() string {
+func (s ListImportsInput) 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.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
+func (s *ListImportsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListImportsInput"}
+ if s.ExportName == nil {
+ invalidParams.Add(request.NewErrParamRequired("ExportName"))
+ }
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
if invalidParams.Len() > 0 {
@@ -7912,124 +10529,101 @@ func (s *GetTemplateInput) Validate() error {
return nil
}
-// SetChangeSetName sets the ChangeSetName field's value.
-func (s *GetTemplateInput) SetChangeSetName(v string) *GetTemplateInput {
- s.ChangeSetName = &v
- return s
-}
-
-// SetStackName sets the StackName field's value.
-func (s *GetTemplateInput) SetStackName(v string) *GetTemplateInput {
- s.StackName = &v
+// SetExportName sets the ExportName field's value.
+func (s *ListImportsInput) SetExportName(v string) *ListImportsInput {
+ s.ExportName = &v
return s
}
-// SetTemplateStage sets the TemplateStage field's value.
-func (s *GetTemplateInput) SetTemplateStage(v string) *GetTemplateInput {
- s.TemplateStage = &v
+// SetNextToken sets the NextToken field's value.
+func (s *ListImportsInput) SetNextToken(v string) *ListImportsInput {
+ s.NextToken = &v
return s
}
-// The output for GetTemplate action.
-type GetTemplateOutput struct {
+type ListImportsOutput struct {
_ struct{} `type:"structure"`
- // The stage of the template that you can retrieve. For stacks, the Original
- // and Processed templates are always available. For change sets, the Original
- // template is always available. After AWS CloudFormation finishes creating
- // the change set, the Processed template becomes available.
- StagesAvailable []*string `type:"list"`
+ // A list of stack names that are importing the specified exported output value.
+ Imports []*string `type:"list"`
- // Structure containing the template body. (For more information, go to Template
- // Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
- // in the AWS CloudFormation User Guide.)
- //
- // AWS CloudFormation returns the same template that was used when the stack
- // was created.
- TemplateBody *string `min:"1" type:"string"`
+ // A string that identifies the next page of exports. If there is no additional
+ // page, this value is null.
+ NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
-func (s GetTemplateOutput) String() string {
+func (s ListImportsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s GetTemplateOutput) GoString() string {
+func (s ListImportsOutput) GoString() string {
return s.String()
}
-// SetStagesAvailable sets the StagesAvailable field's value.
-func (s *GetTemplateOutput) SetStagesAvailable(v []*string) *GetTemplateOutput {
- s.StagesAvailable = v
+// SetImports sets the Imports field's value.
+func (s *ListImportsOutput) SetImports(v []*string) *ListImportsOutput {
+ s.Imports = v
return s
}
-// SetTemplateBody sets the TemplateBody field's value.
-func (s *GetTemplateOutput) SetTemplateBody(v string) *GetTemplateOutput {
- s.TemplateBody = &v
+// SetNextToken sets the NextToken field's value.
+func (s *ListImportsOutput) SetNextToken(v string) *ListImportsOutput {
+ s.NextToken = &v
return s
}
-// The input for the GetTemplateSummary action.
-type GetTemplateSummaryInput struct {
+type ListStackInstancesInput struct {
_ struct{} `type:"structure"`
- // The name or the stack ID that is associated with the stack, which are not
- // always interchangeable. For running stacks, you can specify either the stack's
- // name or its unique stack ID. For deleted stack, you must specify the unique
- // stack ID.
- //
- // Conditional: You must specify only one of the following parameters: StackName,
- // StackSetName, TemplateBody, or TemplateURL.
- StackName *string `min:"1" type:"string"`
+ // The maximum number of results to be returned with a single call. If the number
+ // of available results exceeds this maximum, the response includes a NextToken
+ // value that you can assign to the NextToken request parameter to get the next
+ // set of results.
+ MaxResults *int64 `min:"1" type:"integer"`
- // The name or unique ID of the stack set from which the stack was created.
- //
- // Conditional: You must specify only one of the following parameters: StackName,
- // StackSetName, TemplateBody, or TemplateURL.
- StackSetName *string `type:"string"`
+ // If the previous request didn't return all of the remaining results, the response's
+ // NextToken parameter value is set to a token. To retrieve the next set of
+ // results, call ListStackInstances again and assign that token to the request
+ // object's NextToken parameter. If there are no remaining results, the previous
+ // response object's NextToken parameter is set to null.
+ NextToken *string `min:"1" type:"string"`
- // Structure containing the template body with a minimum length of 1 byte and
- // a maximum length of 51,200 bytes. For more information about templates, see
- // Template Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
- // in the AWS CloudFormation User Guide.
- //
- // Conditional: You must specify only one of the following parameters: StackName,
- // StackSetName, TemplateBody, or TemplateURL.
- TemplateBody *string `min:"1" type:"string"`
+ // The name of the AWS account that you want to list stack instances for.
+ StackInstanceAccount *string `type:"string"`
- // Location of file containing the template body. The URL must point to a template
- // (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more
- // information about templates, see Template Anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)
- // in the AWS CloudFormation User Guide.
+ // The name of the Region where you want to list stack instances.
+ StackInstanceRegion *string `type:"string"`
+
+ // The name or unique ID of the stack set that you want to list stack instances
+ // for.
//
- // Conditional: You must specify only one of the following parameters: StackName,
- // StackSetName, TemplateBody, or TemplateURL.
- TemplateURL *string `min:"1" type:"string"`
+ // StackSetName is a required field
+ StackSetName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s GetTemplateSummaryInput) String() string {
+func (s ListStackInstancesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s GetTemplateSummaryInput) GoString() string {
+func (s ListStackInstancesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetTemplateSummaryInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetTemplateSummaryInput"}
- if s.StackName != nil && len(*s.StackName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StackName", 1))
+func (s *ListStackInstancesInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListStackInstancesInput"}
+ if s.MaxResults != nil && *s.MaxResults < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
- if s.TemplateBody != nil && len(*s.TemplateBody) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1))
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
- if s.TemplateURL != nil && len(*s.TemplateURL) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1))
+ if s.StackSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackSetName"))
}
if invalidParams.Len() > 0 {
@@ -8038,165 +10632,113 @@ func (s *GetTemplateSummaryInput) Validate() error {
return nil
}
-// SetStackName sets the StackName field's value.
-func (s *GetTemplateSummaryInput) SetStackName(v string) *GetTemplateSummaryInput {
- s.StackName = &v
+// SetMaxResults sets the MaxResults field's value.
+func (s *ListStackInstancesInput) SetMaxResults(v int64) *ListStackInstancesInput {
+ s.MaxResults = &v
return s
}
-// SetStackSetName sets the StackSetName field's value.
-func (s *GetTemplateSummaryInput) SetStackSetName(v string) *GetTemplateSummaryInput {
- s.StackSetName = &v
+// SetNextToken sets the NextToken field's value.
+func (s *ListStackInstancesInput) SetNextToken(v string) *ListStackInstancesInput {
+ s.NextToken = &v
return s
}
-// SetTemplateBody sets the TemplateBody field's value.
-func (s *GetTemplateSummaryInput) SetTemplateBody(v string) *GetTemplateSummaryInput {
- s.TemplateBody = &v
+// SetStackInstanceAccount sets the StackInstanceAccount field's value.
+func (s *ListStackInstancesInput) SetStackInstanceAccount(v string) *ListStackInstancesInput {
+ s.StackInstanceAccount = &v
return s
}
-// SetTemplateURL sets the TemplateURL field's value.
-func (s *GetTemplateSummaryInput) SetTemplateURL(v string) *GetTemplateSummaryInput {
- s.TemplateURL = &v
+// SetStackInstanceRegion sets the StackInstanceRegion field's value.
+func (s *ListStackInstancesInput) SetStackInstanceRegion(v string) *ListStackInstancesInput {
+ s.StackInstanceRegion = &v
return s
}
-// The output for the GetTemplateSummary action.
-type GetTemplateSummaryOutput struct {
- _ struct{} `type:"structure"`
-
- // The capabilities found within the template. If your template contains IAM
- // resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value
- // for this parameter when you use the CreateStack or UpdateStack actions with
- // your template; otherwise, those actions return an InsufficientCapabilities
- // error.
- //
- // For more information, see Acknowledging IAM Resources in AWS CloudFormation
- // Templates (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities).
- Capabilities []*string `type:"list"`
-
- // The list of resources that generated the values in the Capabilities response
- // element.
- CapabilitiesReason *string `type:"string"`
-
- // A list of the transforms that are declared in the template.
- DeclaredTransforms []*string `type:"list"`
-
- // The value that is defined in the Description property of the template.
- Description *string `min:"1" type:"string"`
-
- // The value that is defined for the Metadata property of the template.
- Metadata *string `type:"string"`
+// SetStackSetName sets the StackSetName field's value.
+func (s *ListStackInstancesInput) SetStackSetName(v string) *ListStackInstancesInput {
+ s.StackSetName = &v
+ return s
+}
- // A list of parameter declarations that describe various properties for each
- // parameter.
- Parameters []*ParameterDeclaration `type:"list"`
+type ListStackInstancesOutput struct {
+ _ struct{} `type:"structure"`
- // A list of all the template resource types that are defined in the template,
- // such as AWS::EC2::Instance, AWS::Dynamo::Table, and Custom::MyCustomInstance.
- ResourceTypes []*string `type:"list"`
+ // If the request doesn't return all of the remaining results, NextToken is
+ // set to a token. To retrieve the next set of results, call ListStackInstances
+ // again and assign that token to the request object's NextToken parameter.
+ // If the request returns all results, NextToken is set to null.
+ NextToken *string `min:"1" type:"string"`
- // The AWS template format version, which identifies the capabilities of the
- // template.
- Version *string `type:"string"`
+ // A list of StackInstanceSummary structures that contain information about
+ // the specified stack instances.
+ Summaries []*StackInstanceSummary `type:"list"`
}
// String returns the string representation
-func (s GetTemplateSummaryOutput) String() string {
+func (s ListStackInstancesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s GetTemplateSummaryOutput) GoString() string {
+func (s ListStackInstancesOutput) GoString() string {
return s.String()
}
-// SetCapabilities sets the Capabilities field's value.
-func (s *GetTemplateSummaryOutput) SetCapabilities(v []*string) *GetTemplateSummaryOutput {
- s.Capabilities = v
- return s
-}
-
-// SetCapabilitiesReason sets the CapabilitiesReason field's value.
-func (s *GetTemplateSummaryOutput) SetCapabilitiesReason(v string) *GetTemplateSummaryOutput {
- s.CapabilitiesReason = &v
- return s
-}
-
-// SetDeclaredTransforms sets the DeclaredTransforms field's value.
-func (s *GetTemplateSummaryOutput) SetDeclaredTransforms(v []*string) *GetTemplateSummaryOutput {
- s.DeclaredTransforms = v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *GetTemplateSummaryOutput) SetDescription(v string) *GetTemplateSummaryOutput {
- s.Description = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *GetTemplateSummaryOutput) SetMetadata(v string) *GetTemplateSummaryOutput {
- s.Metadata = &v
- return s
-}
-
-// SetParameters sets the Parameters field's value.
-func (s *GetTemplateSummaryOutput) SetParameters(v []*ParameterDeclaration) *GetTemplateSummaryOutput {
- s.Parameters = v
- return s
-}
-
-// SetResourceTypes sets the ResourceTypes field's value.
-func (s *GetTemplateSummaryOutput) SetResourceTypes(v []*string) *GetTemplateSummaryOutput {
- s.ResourceTypes = v
+// SetNextToken sets the NextToken field's value.
+func (s *ListStackInstancesOutput) SetNextToken(v string) *ListStackInstancesOutput {
+ s.NextToken = &v
return s
}
-// SetVersion sets the Version field's value.
-func (s *GetTemplateSummaryOutput) SetVersion(v string) *GetTemplateSummaryOutput {
- s.Version = &v
+// SetSummaries sets the Summaries field's value.
+func (s *ListStackInstancesOutput) SetSummaries(v []*StackInstanceSummary) *ListStackInstancesOutput {
+ s.Summaries = v
return s
}
-// The input for the ListChangeSets action.
-type ListChangeSetsInput struct {
+// The input for the ListStackResource action.
+type ListStackResourcesInput struct {
_ struct{} `type:"structure"`
- // A string (provided by the ListChangeSets response output) that identifies
- // the next page of change sets that you want to retrieve.
+ // A string that identifies the next page of stack resources that you want to
+ // retrieve.
NextToken *string `min:"1" type:"string"`
- // The name or the Amazon Resource Name (ARN) of the stack for which you want
- // to list change sets.
+ // The name or the unique stack ID that is associated with the stack, which
+ // are not always interchangeable:
+ //
+ // * Running stacks: You can specify either the stack's name or its unique
+ // stack ID.
+ //
+ // * Deleted stacks: You must specify the unique stack ID.
+ //
+ // Default: There is no default value.
//
// StackName is a required field
- StackName *string `min:"1" type:"string" required:"true"`
+ StackName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s ListChangeSetsInput) String() string {
+func (s ListStackResourcesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListChangeSetsInput) GoString() string {
+func (s ListStackResourcesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListChangeSetsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListChangeSetsInput"}
+func (s *ListStackResourcesInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListStackResourcesInput"}
if s.NextToken != nil && len(*s.NextToken) < 1 {
invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
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
@@ -8205,76 +10747,107 @@ func (s *ListChangeSetsInput) Validate() error {
}
// SetNextToken sets the NextToken field's value.
-func (s *ListChangeSetsInput) SetNextToken(v string) *ListChangeSetsInput {
+func (s *ListStackResourcesInput) SetNextToken(v string) *ListStackResourcesInput {
s.NextToken = &v
return s
}
// SetStackName sets the StackName field's value.
-func (s *ListChangeSetsInput) SetStackName(v string) *ListChangeSetsInput {
+func (s *ListStackResourcesInput) SetStackName(v string) *ListStackResourcesInput {
s.StackName = &v
return s
}
-// The output for the ListChangeSets action.
-type ListChangeSetsOutput struct {
+// The output for a ListStackResources action.
+type ListStackResourcesOutput struct {
_ struct{} `type:"structure"`
- // If the output exceeds 1 MB, a string that identifies the next page of change
- // sets. If there is no additional page, this value is null.
+ // If the output exceeds 1 MB, a string that identifies the next page of stack
+ // resources. If no additional page exists, this value is null.
NextToken *string `min:"1" type:"string"`
- // A list of ChangeSetSummary structures that provides the ID and status of
- // each change set for the specified stack.
- Summaries []*ChangeSetSummary `type:"list"`
+ // A list of StackResourceSummary structures.
+ StackResourceSummaries []*StackResourceSummary `type:"list"`
}
// String returns the string representation
-func (s ListChangeSetsOutput) String() string {
+func (s ListStackResourcesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListChangeSetsOutput) GoString() string {
+func (s ListStackResourcesOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
-func (s *ListChangeSetsOutput) SetNextToken(v string) *ListChangeSetsOutput {
+func (s *ListStackResourcesOutput) SetNextToken(v string) *ListStackResourcesOutput {
s.NextToken = &v
return s
}
-// SetSummaries sets the Summaries field's value.
-func (s *ListChangeSetsOutput) SetSummaries(v []*ChangeSetSummary) *ListChangeSetsOutput {
- s.Summaries = v
+// SetStackResourceSummaries sets the StackResourceSummaries field's value.
+func (s *ListStackResourcesOutput) SetStackResourceSummaries(v []*StackResourceSummary) *ListStackResourcesOutput {
+ s.StackResourceSummaries = v
return s
}
-type ListExportsInput struct {
+type ListStackSetOperationResultsInput struct {
_ struct{} `type:"structure"`
- // A string (provided by the ListExports response output) that identifies the
- // next page of exported output values that you asked to retrieve.
+ // The maximum number of results to be returned with a single call. If the number
+ // of available results exceeds this maximum, the response includes a NextToken
+ // value that you can assign to the NextToken request parameter to get the next
+ // set of results.
+ MaxResults *int64 `min:"1" type:"integer"`
+
+ // If the previous request didn't return all of the remaining results, the response
+ // object's NextToken parameter value is set to a token. To retrieve the next
+ // set of results, call ListStackSetOperationResults again and assign that token
+ // to the request object's NextToken parameter. If there are no remaining results,
+ // the previous response object's NextToken parameter is set to null.
NextToken *string `min:"1" type:"string"`
+
+ // The ID of the stack set operation.
+ //
+ // OperationId is a required field
+ OperationId *string `min:"1" type:"string" required:"true"`
+
+ // The name or unique ID of the stack set that you want to get operation results
+ // for.
+ //
+ // StackSetName is a required field
+ StackSetName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s ListExportsInput) String() string {
+func (s ListStackSetOperationResultsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListExportsInput) GoString() string {
+func (s ListStackSetOperationResultsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListExportsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListExportsInput"}
+func (s *ListStackSetOperationResultsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListStackSetOperationResultsInput"}
+ 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.OperationId == nil {
+ invalidParams.Add(request.NewErrParamRequired("OperationId"))
+ }
+ if s.OperationId != nil && len(*s.OperationId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("OperationId", 1))
+ }
+ if s.StackSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -8282,78 +10855,112 @@ func (s *ListExportsInput) Validate() error {
return nil
}
+// SetMaxResults sets the MaxResults field's value.
+func (s *ListStackSetOperationResultsInput) SetMaxResults(v int64) *ListStackSetOperationResultsInput {
+ s.MaxResults = &v
+ return s
+}
+
// SetNextToken sets the NextToken field's value.
-func (s *ListExportsInput) SetNextToken(v string) *ListExportsInput {
+func (s *ListStackSetOperationResultsInput) SetNextToken(v string) *ListStackSetOperationResultsInput {
s.NextToken = &v
return s
}
-type ListExportsOutput struct {
- _ struct{} `type:"structure"`
+// SetOperationId sets the OperationId field's value.
+func (s *ListStackSetOperationResultsInput) SetOperationId(v string) *ListStackSetOperationResultsInput {
+ s.OperationId = &v
+ return s
+}
- // The output for the ListExports action.
- Exports []*Export `type:"list"`
+// SetStackSetName sets the StackSetName field's value.
+func (s *ListStackSetOperationResultsInput) SetStackSetName(v string) *ListStackSetOperationResultsInput {
+ s.StackSetName = &v
+ return s
+}
- // If the output exceeds 100 exported output values, a string that identifies
- // the next page of exports. If there is no additional page, this value is null.
+type ListStackSetOperationResultsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // If the request doesn't return all results, NextToken is set to a token. To
+ // retrieve the next set of results, call ListOperationResults again and assign
+ // that token to the request object's NextToken parameter. If there are no remaining
+ // results, NextToken is set to null.
NextToken *string `min:"1" type:"string"`
+
+ // A list of StackSetOperationResultSummary structures that contain information
+ // about the specified operation results, for accounts and Regions that are
+ // included in the operation.
+ Summaries []*StackSetOperationResultSummary `type:"list"`
}
// String returns the string representation
-func (s ListExportsOutput) String() string {
+func (s ListStackSetOperationResultsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListExportsOutput) GoString() string {
+func (s ListStackSetOperationResultsOutput) GoString() string {
return s.String()
}
-// SetExports sets the Exports field's value.
-func (s *ListExportsOutput) SetExports(v []*Export) *ListExportsOutput {
- s.Exports = v
+// SetNextToken sets the NextToken field's value.
+func (s *ListStackSetOperationResultsOutput) SetNextToken(v string) *ListStackSetOperationResultsOutput {
+ s.NextToken = &v
return s
}
-// SetNextToken sets the NextToken field's value.
-func (s *ListExportsOutput) SetNextToken(v string) *ListExportsOutput {
- s.NextToken = &v
+// SetSummaries sets the Summaries field's value.
+func (s *ListStackSetOperationResultsOutput) SetSummaries(v []*StackSetOperationResultSummary) *ListStackSetOperationResultsOutput {
+ s.Summaries = v
return s
}
-type ListImportsInput struct {
+type ListStackSetOperationsInput struct {
_ struct{} `type:"structure"`
- // The name of the exported output value. AWS CloudFormation returns the stack
- // names that are importing this value.
- //
- // ExportName is a required field
- ExportName *string `type:"string" required:"true"`
+ // The maximum number of results to be returned with a single call. If the number
+ // of available results exceeds this maximum, the response includes a NextToken
+ // value that you can assign to the NextToken request parameter to get the next
+ // set of results.
+ MaxResults *int64 `min:"1" type:"integer"`
- // A string (provided by the ListImports response output) that identifies the
- // next page of stacks that are importing the specified exported output value.
+ // If the previous paginated request didn't return all of the remaining results,
+ // the response object's NextToken parameter value is set to a token. To retrieve
+ // the next set of results, call ListStackSetOperations again and assign that
+ // token to the request object's NextToken parameter. If there are no remaining
+ // results, the previous response object's NextToken parameter is set to null.
NextToken *string `min:"1" type:"string"`
+
+ // The name or unique ID of the stack set that you want to get operation summaries
+ // for.
+ //
+ // StackSetName is a required field
+ StackSetName *string `type:"string" required:"true"`
}
// String returns the string representation
-func (s ListImportsInput) String() string {
+func (s ListStackSetOperationsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListImportsInput) GoString() string {
+func (s ListStackSetOperationsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListImportsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListImportsInput"}
- if s.ExportName == nil {
- invalidParams.Add(request.NewErrParamRequired("ExportName"))
+func (s *ListStackSetOperationsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListStackSetOperationsInput"}
+ 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.StackSetName == nil {
+ invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -8361,52 +10968,61 @@ func (s *ListImportsInput) Validate() error {
return nil
}
-// SetExportName sets the ExportName field's value.
-func (s *ListImportsInput) SetExportName(v string) *ListImportsInput {
- s.ExportName = &v
+// SetMaxResults sets the MaxResults field's value.
+func (s *ListStackSetOperationsInput) SetMaxResults(v int64) *ListStackSetOperationsInput {
+ s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
-func (s *ListImportsInput) SetNextToken(v string) *ListImportsInput {
+func (s *ListStackSetOperationsInput) SetNextToken(v string) *ListStackSetOperationsInput {
s.NextToken = &v
return s
}
-type ListImportsOutput struct {
- _ struct{} `type:"structure"`
+// SetStackSetName sets the StackSetName field's value.
+func (s *ListStackSetOperationsInput) SetStackSetName(v string) *ListStackSetOperationsInput {
+ s.StackSetName = &v
+ return s
+}
- // A list of stack names that are importing the specified exported output value.
- Imports []*string `type:"list"`
+type ListStackSetOperationsOutput struct {
+ _ struct{} `type:"structure"`
- // A string that identifies the next page of exports. If there is no additional
- // page, this value is null.
+ // If the request doesn't return all results, NextToken is set to a token. To
+ // retrieve the next set of results, call ListOperationResults again and assign
+ // that token to the request object's NextToken parameter. If there are no remaining
+ // results, NextToken is set to null.
NextToken *string `min:"1" type:"string"`
+
+ // A list of StackSetOperationSummary structures that contain summary information
+ // about operations for the specified stack set.
+ Summaries []*StackSetOperationSummary `type:"list"`
}
// String returns the string representation
-func (s ListImportsOutput) String() string {
+func (s ListStackSetOperationsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListImportsOutput) GoString() string {
+func (s ListStackSetOperationsOutput) GoString() string {
return s.String()
}
-// SetImports sets the Imports field's value.
-func (s *ListImportsOutput) SetImports(v []*string) *ListImportsOutput {
- s.Imports = v
+// SetNextToken sets the NextToken field's value.
+func (s *ListStackSetOperationsOutput) SetNextToken(v string) *ListStackSetOperationsOutput {
+ s.NextToken = &v
return s
}
-// SetNextToken sets the NextToken field's value.
-func (s *ListImportsOutput) SetNextToken(v string) *ListImportsOutput {
- s.NextToken = &v
+// SetSummaries sets the Summaries field's value.
+func (s *ListStackSetOperationsOutput) SetSummaries(v []*StackSetOperationSummary) *ListStackSetOperationsOutput {
+ s.Summaries = v
return s
}
-type ListStackInstancesInput struct {
+type ListStackSetsInput struct {
_ struct{} `type:"structure"`
// The maximum number of results to be returned with a single call. If the number
@@ -8415,48 +11031,36 @@ type ListStackInstancesInput struct {
// set of results.
MaxResults *int64 `min:"1" type:"integer"`
- // If the previous request didn't return all of the remaining results, the response's
- // NextToken parameter value is set to a token. To retrieve the next set of
- // results, call ListStackInstances again and assign that token to the request
- // object's NextToken parameter. If there are no remaining results, the previous
- // response object's NextToken parameter is set to null.
+ // If the previous paginated request didn't return all of the remaining results,
+ // the response object's NextToken parameter value is set to a token. To retrieve
+ // the next set of results, call ListStackSets again and assign that token to
+ // the request object's NextToken parameter. If there are no remaining results,
+ // the previous response object's NextToken parameter is set to null.
NextToken *string `min:"1" type:"string"`
- // The name of the AWS account that you want to list stack instances for.
- StackInstanceAccount *string `type:"string"`
-
- // The name of the region where you want to list stack instances.
- StackInstanceRegion *string `type:"string"`
-
- // The name or unique ID of the stack set that you want to list stack instances
- // for.
- //
- // StackSetName is a required field
- StackSetName *string `type:"string" required:"true"`
+ // The status of the stack sets that you want to get summary information about.
+ Status *string `type:"string" enum:"StackSetStatus"`
}
// String returns the string representation
-func (s ListStackInstancesInput) String() string {
+func (s ListStackSetsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStackInstancesInput) GoString() string {
+func (s ListStackSetsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListStackInstancesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListStackInstancesInput"}
+func (s *ListStackSetsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListStackSetsInput"}
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.StackSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackSetName"))
- }
if invalidParams.Len() > 0 {
return invalidParams
@@ -8464,37 +11068,25 @@ func (s *ListStackInstancesInput) Validate() error {
return nil
}
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListStackInstancesInput) SetMaxResults(v int64) *ListStackInstancesInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListStackInstancesInput) SetNextToken(v string) *ListStackInstancesInput {
- s.NextToken = &v
- return s
-}
-
-// SetStackInstanceAccount sets the StackInstanceAccount field's value.
-func (s *ListStackInstancesInput) SetStackInstanceAccount(v string) *ListStackInstancesInput {
- s.StackInstanceAccount = &v
+// SetMaxResults sets the MaxResults field's value.
+func (s *ListStackSetsInput) SetMaxResults(v int64) *ListStackSetsInput {
+ s.MaxResults = &v
return s
}
-// SetStackInstanceRegion sets the StackInstanceRegion field's value.
-func (s *ListStackInstancesInput) SetStackInstanceRegion(v string) *ListStackInstancesInput {
- s.StackInstanceRegion = &v
+// SetNextToken sets the NextToken field's value.
+func (s *ListStackSetsInput) SetNextToken(v string) *ListStackSetsInput {
+ s.NextToken = &v
return s
}
-// SetStackSetName sets the StackSetName field's value.
-func (s *ListStackInstancesInput) SetStackSetName(v string) *ListStackInstancesInput {
- s.StackSetName = &v
+// SetStatus sets the Status field's value.
+func (s *ListStackSetsInput) SetStatus(v string) *ListStackSetsInput {
+ s.Status = &v
return s
}
-type ListStackInstancesOutput struct {
+type ListStackSetsOutput struct {
_ struct{} `type:"structure"`
// If the request doesn't return all of the remaining results, NextToken is
@@ -8503,74 +11095,62 @@ type ListStackInstancesOutput struct {
// If the request returns all results, NextToken is set to null.
NextToken *string `min:"1" type:"string"`
- // A list of StackInstanceSummary structures that contain information about
- // the specified stack instances.
- Summaries []*StackInstanceSummary `type:"list"`
+ // A list of StackSetSummary structures that contain information about the user's
+ // stack sets.
+ Summaries []*StackSetSummary `type:"list"`
}
// String returns the string representation
-func (s ListStackInstancesOutput) String() string {
+func (s ListStackSetsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStackInstancesOutput) GoString() string {
+func (s ListStackSetsOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
-func (s *ListStackInstancesOutput) SetNextToken(v string) *ListStackInstancesOutput {
+func (s *ListStackSetsOutput) SetNextToken(v string) *ListStackSetsOutput {
s.NextToken = &v
return s
}
// SetSummaries sets the Summaries field's value.
-func (s *ListStackInstancesOutput) SetSummaries(v []*StackInstanceSummary) *ListStackInstancesOutput {
+func (s *ListStackSetsOutput) SetSummaries(v []*StackSetSummary) *ListStackSetsOutput {
s.Summaries = v
return s
}
-// The input for the ListStackResource action.
-type ListStackResourcesInput struct {
+// The input for ListStacks action.
+type ListStacksInput struct {
_ struct{} `type:"structure"`
- // A string that identifies the next page of stack resources that you want to
- // retrieve.
+ // A string that identifies the next page of stacks that you want to retrieve.
NextToken *string `min:"1" type:"string"`
- // The name or the unique stack ID that is associated with the stack, which
- // are not always interchangeable:
- //
- // * Running stacks: You can specify either the stack's name or its unique
- // stack ID.
- //
- // * Deleted stacks: You must specify the unique stack ID.
- //
- // Default: There is no default value.
- //
- // StackName is a required field
- StackName *string `type:"string" required:"true"`
+ // Stack status to use as a filter. Specify one or more stack status codes to
+ // list only stacks with the specified status codes. For a complete list of
+ // stack status codes, see the StackStatus parameter of the Stack data type.
+ StackStatusFilter []*string `type:"list"`
}
// String returns the string representation
-func (s ListStackResourcesInput) String() string {
+func (s ListStacksInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStackResourcesInput) GoString() string {
+func (s ListStacksInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListStackResourcesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListStackResourcesInput"}
+func (s *ListStacksInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListStacksInput"}
if s.NextToken != nil && len(*s.NextToken) < 1 {
invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
- if s.StackName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackName"))
- }
if invalidParams.Len() > 0 {
return invalidParams
@@ -8579,52 +11159,53 @@ func (s *ListStackResourcesInput) Validate() error {
}
// SetNextToken sets the NextToken field's value.
-func (s *ListStackResourcesInput) SetNextToken(v string) *ListStackResourcesInput {
+func (s *ListStacksInput) SetNextToken(v string) *ListStacksInput {
s.NextToken = &v
return s
}
-// SetStackName sets the StackName field's value.
-func (s *ListStackResourcesInput) SetStackName(v string) *ListStackResourcesInput {
- s.StackName = &v
+// SetStackStatusFilter sets the StackStatusFilter field's value.
+func (s *ListStacksInput) SetStackStatusFilter(v []*string) *ListStacksInput {
+ s.StackStatusFilter = v
return s
}
-// The output for a ListStackResources action.
-type ListStackResourcesOutput struct {
+// The output for ListStacks action.
+type ListStacksOutput struct {
_ struct{} `type:"structure"`
- // If the output exceeds 1 MB, a string that identifies the next page of stack
- // resources. If no additional page exists, this value is null.
+ // If the output exceeds 1 MB in size, a string that identifies the next page
+ // of stacks. If no additional page exists, this value is null.
NextToken *string `min:"1" type:"string"`
- // A list of StackResourceSummary structures.
- StackResourceSummaries []*StackResourceSummary `type:"list"`
+ // A list of StackSummary structures containing information about the specified
+ // stacks.
+ StackSummaries []*StackSummary `type:"list"`
}
// String returns the string representation
-func (s ListStackResourcesOutput) String() string {
+func (s ListStacksOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStackResourcesOutput) GoString() string {
+func (s ListStacksOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
-func (s *ListStackResourcesOutput) SetNextToken(v string) *ListStackResourcesOutput {
+func (s *ListStacksOutput) SetNextToken(v string) *ListStacksOutput {
s.NextToken = &v
return s
}
-// SetStackResourceSummaries sets the StackResourceSummaries field's value.
-func (s *ListStackResourcesOutput) SetStackResourceSummaries(v []*StackResourceSummary) *ListStackResourcesOutput {
- s.StackResourceSummaries = v
+// SetStackSummaries sets the StackSummaries field's value.
+func (s *ListStacksOutput) SetStackSummaries(v []*StackSummary) *ListStacksOutput {
+ s.StackSummaries = v
return s
}
-type ListStackSetOperationResultsInput struct {
+type ListTypeRegistrationsInput struct {
_ struct{} `type:"structure"`
// The maximum number of results to be returned with a single call. If the number
@@ -8633,52 +11214,57 @@ type ListStackSetOperationResultsInput struct {
// set of results.
MaxResults *int64 `min:"1" type:"integer"`
- // If the previous request didn't return all of the remaining results, the response
- // object's NextToken parameter value is set to a token. To retrieve the next
- // set of results, call ListStackSetOperationResults again and assign that token
- // to the request object's NextToken parameter. If there are no remaining results,
+ // If the previous paginated request didn't return all of the remaining results,
+ // the response object's NextToken parameter value is set to a token. To retrieve
+ // the next set of results, call this action again and assign that token to
+ // the request object's NextToken parameter. If there are no remaining results,
// the previous response object's NextToken parameter is set to null.
NextToken *string `min:"1" type:"string"`
- // The ID of the stack set operation.
+ // The current status of the type registration request.
//
- // OperationId is a required field
- OperationId *string `min:"1" type:"string" required:"true"`
+ // The default is IN_PROGRESS.
+ RegistrationStatusFilter *string `type:"string" enum:"RegistrationStatus"`
- // The name or unique ID of the stack set that you want to get operation results
- // for.
+ // The kind of type.
//
- // StackSetName is a required field
- StackSetName *string `type:"string" required:"true"`
+ // Currently the only valid value is RESOURCE.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ Type *string `type:"string" enum:"RegistryType"`
+
+ // The Amazon Resource Name (ARN) of the type.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ TypeArn *string `type:"string"`
+
+ // The name of the type.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ TypeName *string `min:"10" type:"string"`
}
// String returns the string representation
-func (s ListStackSetOperationResultsInput) String() string {
+func (s ListTypeRegistrationsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStackSetOperationResultsInput) GoString() string {
+func (s ListTypeRegistrationsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListStackSetOperationResultsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListStackSetOperationResultsInput"}
+func (s *ListTypeRegistrationsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListTypeRegistrationsInput"}
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.OperationId == nil {
- invalidParams.Add(request.NewErrParamRequired("OperationId"))
- }
- if s.OperationId != nil && len(*s.OperationId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("OperationId", 1))
- }
- if s.StackSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+ if s.TypeName != nil && len(*s.TypeName) < 10 {
+ invalidParams.Add(request.NewErrParamMinLen("TypeName", 10))
}
if invalidParams.Len() > 0 {
@@ -8688,69 +11274,102 @@ func (s *ListStackSetOperationResultsInput) Validate() error {
}
// SetMaxResults sets the MaxResults field's value.
-func (s *ListStackSetOperationResultsInput) SetMaxResults(v int64) *ListStackSetOperationResultsInput {
+func (s *ListTypeRegistrationsInput) SetMaxResults(v int64) *ListTypeRegistrationsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
-func (s *ListStackSetOperationResultsInput) SetNextToken(v string) *ListStackSetOperationResultsInput {
+func (s *ListTypeRegistrationsInput) SetNextToken(v string) *ListTypeRegistrationsInput {
s.NextToken = &v
return s
}
-// SetOperationId sets the OperationId field's value.
-func (s *ListStackSetOperationResultsInput) SetOperationId(v string) *ListStackSetOperationResultsInput {
- s.OperationId = &v
+// SetRegistrationStatusFilter sets the RegistrationStatusFilter field's value.
+func (s *ListTypeRegistrationsInput) SetRegistrationStatusFilter(v string) *ListTypeRegistrationsInput {
+ s.RegistrationStatusFilter = &v
return s
}
-// SetStackSetName sets the StackSetName field's value.
-func (s *ListStackSetOperationResultsInput) SetStackSetName(v string) *ListStackSetOperationResultsInput {
- s.StackSetName = &v
+// SetType sets the Type field's value.
+func (s *ListTypeRegistrationsInput) SetType(v string) *ListTypeRegistrationsInput {
+ s.Type = &v
return s
}
-type ListStackSetOperationResultsOutput struct {
+// SetTypeArn sets the TypeArn field's value.
+func (s *ListTypeRegistrationsInput) SetTypeArn(v string) *ListTypeRegistrationsInput {
+ s.TypeArn = &v
+ return s
+}
+
+// SetTypeName sets the TypeName field's value.
+func (s *ListTypeRegistrationsInput) SetTypeName(v string) *ListTypeRegistrationsInput {
+ s.TypeName = &v
+ return s
+}
+
+type ListTypeRegistrationsOutput struct {
_ struct{} `type:"structure"`
- // If the request doesn't return all results, NextToken is set to a token. To
- // retrieve the next set of results, call ListOperationResults again and assign
- // that token to the request object's NextToken parameter. If there are no remaining
- // results, NextToken is set to null.
+ // If the request doesn't return all of the remaining results, NextToken is
+ // set to a token. To retrieve the next set of results, call this action again
+ // and assign that token to the request object's NextToken parameter. If the
+ // request returns all results, NextToken is set to null.
NextToken *string `min:"1" type:"string"`
- // A list of StackSetOperationResultSummary structures that contain information
- // about the specified operation results, for accounts and regions that are
- // included in the operation.
- Summaries []*StackSetOperationResultSummary `type:"list"`
+ // A list of type registration tokens.
+ //
+ // Use DescribeTypeRegistration to return detailed information about a type
+ // registration request.
+ RegistrationTokenList []*string `type:"list"`
}
// String returns the string representation
-func (s ListStackSetOperationResultsOutput) String() string {
+func (s ListTypeRegistrationsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStackSetOperationResultsOutput) GoString() string {
+func (s ListTypeRegistrationsOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
-func (s *ListStackSetOperationResultsOutput) SetNextToken(v string) *ListStackSetOperationResultsOutput {
+func (s *ListTypeRegistrationsOutput) SetNextToken(v string) *ListTypeRegistrationsOutput {
s.NextToken = &v
return s
}
-// SetSummaries sets the Summaries field's value.
-func (s *ListStackSetOperationResultsOutput) SetSummaries(v []*StackSetOperationResultSummary) *ListStackSetOperationResultsOutput {
- s.Summaries = v
+// SetRegistrationTokenList sets the RegistrationTokenList field's value.
+func (s *ListTypeRegistrationsOutput) SetRegistrationTokenList(v []*string) *ListTypeRegistrationsOutput {
+ s.RegistrationTokenList = v
return s
}
-type ListStackSetOperationsInput struct {
+type ListTypeVersionsInput struct {
_ struct{} `type:"structure"`
+ // The Amazon Resource Name (ARN) of the type for which you want version summary
+ // information.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ Arn *string `type:"string"`
+
+ // The deprecation status of the type versions that you want to get summary
+ // information about.
+ //
+ // Valid values include:
+ //
+ // * LIVE: The type version is registered and can be used in CloudFormation
+ // operations, dependent on its provisioning behavior and visibility scope.
+ //
+ // * DEPRECATED: The type version has been deregistered and can no longer
+ // be used in CloudFormation operations.
+ //
+ // The default is LIVE.
+ DeprecatedStatus *string `type:"string" enum:"DeprecatedStatus"`
+
// The maximum number of results to be returned with a single call. If the number
// of available results exceeds this maximum, the response includes a NextToken
// value that you can assign to the NextToken request parameter to get the next
@@ -8759,39 +11378,45 @@ type ListStackSetOperationsInput struct {
// If the previous paginated request didn't return all of the remaining results,
// the response object's NextToken parameter value is set to a token. To retrieve
- // the next set of results, call ListStackSetOperations again and assign that
- // token to the request object's NextToken parameter. If there are no remaining
- // results, the previous response object's NextToken parameter is set to null.
+ // the next set of results, call this action again and assign that token to
+ // the request object's NextToken parameter. If there are no remaining results,
+ // the previous response object's NextToken parameter is set to null.
NextToken *string `min:"1" type:"string"`
- // The name or unique ID of the stack set that you want to get operation summaries
- // for.
+ // The kind of the type.
//
- // StackSetName is a required field
- StackSetName *string `type:"string" required:"true"`
+ // Currently the only valid value is RESOURCE.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ Type *string `type:"string" enum:"RegistryType"`
+
+ // The name of the type for which you want version summary information.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ TypeName *string `min:"10" type:"string"`
}
// String returns the string representation
-func (s ListStackSetOperationsInput) String() string {
+func (s ListTypeVersionsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStackSetOperationsInput) GoString() string {
+func (s ListTypeVersionsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListStackSetOperationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListStackSetOperationsInput"}
+func (s *ListTypeVersionsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListTypeVersionsInput"}
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.StackSetName == nil {
- invalidParams.Add(request.NewErrParamRequired("StackSetName"))
+ if s.TypeName != nil && len(*s.TypeName) < 10 {
+ invalidParams.Add(request.NewErrParamMinLen("TypeName", 10))
}
if invalidParams.Len() > 0 {
@@ -8800,63 +11425,92 @@ func (s *ListStackSetOperationsInput) Validate() error {
return nil
}
+// SetArn sets the Arn field's value.
+func (s *ListTypeVersionsInput) SetArn(v string) *ListTypeVersionsInput {
+ s.Arn = &v
+ return s
+}
+
+// SetDeprecatedStatus sets the DeprecatedStatus field's value.
+func (s *ListTypeVersionsInput) SetDeprecatedStatus(v string) *ListTypeVersionsInput {
+ s.DeprecatedStatus = &v
+ return s
+}
+
// SetMaxResults sets the MaxResults field's value.
-func (s *ListStackSetOperationsInput) SetMaxResults(v int64) *ListStackSetOperationsInput {
+func (s *ListTypeVersionsInput) SetMaxResults(v int64) *ListTypeVersionsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
-func (s *ListStackSetOperationsInput) SetNextToken(v string) *ListStackSetOperationsInput {
+func (s *ListTypeVersionsInput) SetNextToken(v string) *ListTypeVersionsInput {
s.NextToken = &v
return s
}
-// SetStackSetName sets the StackSetName field's value.
-func (s *ListStackSetOperationsInput) SetStackSetName(v string) *ListStackSetOperationsInput {
- s.StackSetName = &v
+// SetType sets the Type field's value.
+func (s *ListTypeVersionsInput) SetType(v string) *ListTypeVersionsInput {
+ s.Type = &v
return s
}
-type ListStackSetOperationsOutput struct {
+// SetTypeName sets the TypeName field's value.
+func (s *ListTypeVersionsInput) SetTypeName(v string) *ListTypeVersionsInput {
+ s.TypeName = &v
+ return s
+}
+
+type ListTypeVersionsOutput struct {
_ struct{} `type:"structure"`
- // If the request doesn't return all results, NextToken is set to a token. To
- // retrieve the next set of results, call ListOperationResults again and assign
- // that token to the request object's NextToken parameter. If there are no remaining
- // results, NextToken is set to null.
+ // If the request doesn't return all of the remaining results, NextToken is
+ // set to a token. To retrieve the next set of results, call this action again
+ // and assign that token to the request object's NextToken parameter. If the
+ // request returns all results, NextToken is set to null.
NextToken *string `min:"1" type:"string"`
- // A list of StackSetOperationSummary structures that contain summary information
- // about operations for the specified stack set.
- Summaries []*StackSetOperationSummary `type:"list"`
+ // A list of TypeVersionSummary structures that contain information about the
+ // specified type's versions.
+ TypeVersionSummaries []*TypeVersionSummary `type:"list"`
}
// String returns the string representation
-func (s ListStackSetOperationsOutput) String() string {
+func (s ListTypeVersionsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStackSetOperationsOutput) GoString() string {
+func (s ListTypeVersionsOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
-func (s *ListStackSetOperationsOutput) SetNextToken(v string) *ListStackSetOperationsOutput {
+func (s *ListTypeVersionsOutput) SetNextToken(v string) *ListTypeVersionsOutput {
s.NextToken = &v
return s
}
-// SetSummaries sets the Summaries field's value.
-func (s *ListStackSetOperationsOutput) SetSummaries(v []*StackSetOperationSummary) *ListStackSetOperationsOutput {
- s.Summaries = v
+// SetTypeVersionSummaries sets the TypeVersionSummaries field's value.
+func (s *ListTypeVersionsOutput) SetTypeVersionSummaries(v []*TypeVersionSummary) *ListTypeVersionsOutput {
+ s.TypeVersionSummaries = v
return s
}
-type ListStackSetsInput struct {
+type ListTypesInput struct {
_ struct{} `type:"structure"`
+ // The deprecation status of the types that you want to get summary information
+ // about.
+ //
+ // Valid values include:
+ //
+ // * LIVE: The type is registered for use in CloudFormation operations.
+ //
+ // * DEPRECATED: The type has been deregistered and can no longer be used
+ // in CloudFormation operations.
+ DeprecatedStatus *string `type:"string" enum:"DeprecatedStatus"`
+
// The maximum number of results to be returned with a single call. If the number
// of available results exceeds this maximum, the response includes a NextToken
// value that you can assign to the NextToken request parameter to get the next
@@ -8865,28 +11519,55 @@ type ListStackSetsInput struct {
// If the previous paginated request didn't return all of the remaining results,
// the response object's NextToken parameter value is set to a token. To retrieve
- // the next set of results, call ListStackSets again and assign that token to
+ // the next set of results, call this action again and assign that token to
// the request object's NextToken parameter. If there are no remaining results,
// the previous response object's NextToken parameter is set to null.
NextToken *string `min:"1" type:"string"`
- // The status of the stack sets that you want to get summary information about.
- Status *string `type:"string" enum:"StackSetStatus"`
+ // The provisioning behavior of the type. AWS CloudFormation determines the
+ // provisioning type during registration, based on the types of handlers in
+ // the schema handler package submitted.
+ //
+ // Valid values include:
+ //
+ // * FULLY_MUTABLE: The type includes an update handler to process updates
+ // to the type during stack update operations.
+ //
+ // * IMMUTABLE: The type does not include an update handler, so the type
+ // cannot be updated and must instead be replaced during stack update operations.
+ //
+ // * NON_PROVISIONABLE: The type does not include create, read, and delete
+ // handlers, and therefore cannot actually be provisioned.
+ ProvisioningType *string `type:"string" enum:"ProvisioningType"`
+
+ // The scope at which the type is visible and usable in CloudFormation operations.
+ //
+ // Valid values include:
+ //
+ // * PRIVATE: The type is only visible and usable within the account in which
+ // it is registered. Currently, AWS CloudFormation marks any types you create
+ // as PRIVATE.
+ //
+ // * PUBLIC: The type is publically visible and usable within any Amazon
+ // account.
+ //
+ // The default is PRIVATE.
+ Visibility *string `type:"string" enum:"Visibility"`
}
// String returns the string representation
-func (s ListStackSetsInput) String() string {
+func (s ListTypesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStackSetsInput) GoString() string {
+func (s ListTypesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListStackSetsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListStackSetsInput"}
+func (s *ListTypesInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListTypesInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
@@ -8900,88 +11581,113 @@ func (s *ListStackSetsInput) Validate() error {
return nil
}
+// SetDeprecatedStatus sets the DeprecatedStatus field's value.
+func (s *ListTypesInput) SetDeprecatedStatus(v string) *ListTypesInput {
+ s.DeprecatedStatus = &v
+ return s
+}
+
// SetMaxResults sets the MaxResults field's value.
-func (s *ListStackSetsInput) SetMaxResults(v int64) *ListStackSetsInput {
+func (s *ListTypesInput) SetMaxResults(v int64) *ListTypesInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
-func (s *ListStackSetsInput) SetNextToken(v string) *ListStackSetsInput {
+func (s *ListTypesInput) SetNextToken(v string) *ListTypesInput {
s.NextToken = &v
return s
}
-// SetStatus sets the Status field's value.
-func (s *ListStackSetsInput) SetStatus(v string) *ListStackSetsInput {
- s.Status = &v
+// SetProvisioningType sets the ProvisioningType field's value.
+func (s *ListTypesInput) SetProvisioningType(v string) *ListTypesInput {
+ s.ProvisioningType = &v
+ return s
+}
+
+// SetVisibility sets the Visibility field's value.
+func (s *ListTypesInput) SetVisibility(v string) *ListTypesInput {
+ s.Visibility = &v
return s
}
-type ListStackSetsOutput struct {
+type ListTypesOutput struct {
_ struct{} `type:"structure"`
// If the request doesn't return all of the remaining results, NextToken is
- // set to a token. To retrieve the next set of results, call ListStackInstances
- // again and assign that token to the request object's NextToken parameter.
- // If the request returns all results, NextToken is set to null.
+ // set to a token. To retrieve the next set of results, call this action again
+ // and assign that token to the request object's NextToken parameter. If the
+ // request returns all results, NextToken is set to null.
NextToken *string `min:"1" type:"string"`
- // A list of StackSetSummary structures that contain information about the user's
- // stack sets.
- Summaries []*StackSetSummary `type:"list"`
+ // A list of TypeSummary structures that contain information about the specified
+ // types.
+ TypeSummaries []*TypeSummary `type:"list"`
}
// String returns the string representation
-func (s ListStackSetsOutput) String() string {
+func (s ListTypesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStackSetsOutput) GoString() string {
+func (s ListTypesOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
-func (s *ListStackSetsOutput) SetNextToken(v string) *ListStackSetsOutput {
+func (s *ListTypesOutput) SetNextToken(v string) *ListTypesOutput {
s.NextToken = &v
return s
}
-// SetSummaries sets the Summaries field's value.
-func (s *ListStackSetsOutput) SetSummaries(v []*StackSetSummary) *ListStackSetsOutput {
- s.Summaries = v
+// SetTypeSummaries sets the TypeSummaries field's value.
+func (s *ListTypesOutput) SetTypeSummaries(v []*TypeSummary) *ListTypesOutput {
+ s.TypeSummaries = v
return s
}
-// The input for ListStacks action.
-type ListStacksInput struct {
+// Contains logging configuration information for a type.
+type LoggingConfig struct {
_ struct{} `type:"structure"`
- // A string that identifies the next page of stacks that you want to retrieve.
- NextToken *string `min:"1" type:"string"`
+ // The Amazon CloudWatch log group to which CloudFormation sends error logging
+ // information when invoking the type's handlers.
+ //
+ // LogGroupName is a required field
+ LogGroupName *string `min:"1" type:"string" required:"true"`
- // Stack status to use as a filter. Specify one or more stack status codes to
- // list only stacks with the specified status codes. For a complete list of
- // stack status codes, see the StackStatus parameter of the Stack data type.
- StackStatusFilter []*string `type:"list"`
+ // The ARN of the role that CloudFormation should assume when sending log entries
+ // to CloudWatch logs.
+ //
+ // LogRoleArn is a required field
+ LogRoleArn *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
-func (s ListStacksInput) String() string {
+func (s LoggingConfig) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListStacksInput) GoString() string {
+func (s LoggingConfig) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListStacksInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListStacksInput"}
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
+func (s *LoggingConfig) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "LoggingConfig"}
+ if s.LogGroupName == nil {
+ invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
+ }
+ if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
+ }
+ if s.LogRoleArn == nil {
+ invalidParams.Add(request.NewErrParamRequired("LogRoleArn"))
+ }
+ if s.LogRoleArn != nil && len(*s.LogRoleArn) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("LogRoleArn", 1))
}
if invalidParams.Len() > 0 {
@@ -8990,50 +11696,15 @@ func (s *ListStacksInput) Validate() error {
return nil
}
-// SetNextToken sets the NextToken field's value.
-func (s *ListStacksInput) SetNextToken(v string) *ListStacksInput {
- s.NextToken = &v
- return s
-}
-
-// SetStackStatusFilter sets the StackStatusFilter field's value.
-func (s *ListStacksInput) SetStackStatusFilter(v []*string) *ListStacksInput {
- s.StackStatusFilter = v
- return s
-}
-
-// The output for ListStacks action.
-type ListStacksOutput struct {
- _ struct{} `type:"structure"`
-
- // If the output exceeds 1 MB in size, a string that identifies the next page
- // of stacks. If no additional page exists, this value is null.
- NextToken *string `min:"1" type:"string"`
-
- // A list of StackSummary structures containing information about the specified
- // stacks.
- StackSummaries []*StackSummary `type:"list"`
-}
-
-// String returns the string representation
-func (s ListStacksOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListStacksOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListStacksOutput) SetNextToken(v string) *ListStacksOutput {
- s.NextToken = &v
+// SetLogGroupName sets the LogGroupName field's value.
+func (s *LoggingConfig) SetLogGroupName(v string) *LoggingConfig {
+ s.LogGroupName = &v
return s
}
-// SetStackSummaries sets the StackSummaries field's value.
-func (s *ListStacksOutput) SetStackSummaries(v []*StackSummary) *ListStacksOutput {
- s.StackSummaries = v
+// SetLogRoleArn sets the LogRoleArn field's value.
+func (s *LoggingConfig) SetLogRoleArn(v string) *LoggingConfig {
+ s.LogRoleArn = &v
return s
}
@@ -9355,6 +12026,299 @@ func (s *PropertyDifference) SetPropertyPath(v string) *PropertyDifference {
return s
}
+type RecordHandlerProgressInput struct {
+ _ struct{} `type:"structure"`
+
+ // Reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+ //
+ // BearerToken is a required field
+ BearerToken *string `min:"1" type:"string" required:"true"`
+
+ // Reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+ ClientRequestToken *string `min:"1" type:"string"`
+
+ // Reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+ CurrentOperationStatus *string `type:"string" enum:"OperationStatus"`
+
+ // Reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+ ErrorCode *string `type:"string" enum:"HandlerErrorCode"`
+
+ // Reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+ //
+ // OperationStatus is a required field
+ OperationStatus *string `type:"string" required:"true" enum:"OperationStatus"`
+
+ // Reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+ ResourceModel *string `min:"1" type:"string"`
+
+ // Reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+ StatusMessage *string `type:"string"`
+}
+
+// String returns the string representation
+func (s RecordHandlerProgressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RecordHandlerProgressInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *RecordHandlerProgressInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "RecordHandlerProgressInput"}
+ if s.BearerToken == nil {
+ invalidParams.Add(request.NewErrParamRequired("BearerToken"))
+ }
+ if s.BearerToken != nil && len(*s.BearerToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("BearerToken", 1))
+ }
+ if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
+ }
+ if s.OperationStatus == nil {
+ invalidParams.Add(request.NewErrParamRequired("OperationStatus"))
+ }
+ if s.ResourceModel != nil && len(*s.ResourceModel) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ResourceModel", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetBearerToken sets the BearerToken field's value.
+func (s *RecordHandlerProgressInput) SetBearerToken(v string) *RecordHandlerProgressInput {
+ s.BearerToken = &v
+ return s
+}
+
+// SetClientRequestToken sets the ClientRequestToken field's value.
+func (s *RecordHandlerProgressInput) SetClientRequestToken(v string) *RecordHandlerProgressInput {
+ s.ClientRequestToken = &v
+ return s
+}
+
+// SetCurrentOperationStatus sets the CurrentOperationStatus field's value.
+func (s *RecordHandlerProgressInput) SetCurrentOperationStatus(v string) *RecordHandlerProgressInput {
+ s.CurrentOperationStatus = &v
+ return s
+}
+
+// SetErrorCode sets the ErrorCode field's value.
+func (s *RecordHandlerProgressInput) SetErrorCode(v string) *RecordHandlerProgressInput {
+ s.ErrorCode = &v
+ return s
+}
+
+// SetOperationStatus sets the OperationStatus field's value.
+func (s *RecordHandlerProgressInput) SetOperationStatus(v string) *RecordHandlerProgressInput {
+ s.OperationStatus = &v
+ return s
+}
+
+// SetResourceModel sets the ResourceModel field's value.
+func (s *RecordHandlerProgressInput) SetResourceModel(v string) *RecordHandlerProgressInput {
+ s.ResourceModel = &v
+ return s
+}
+
+// SetStatusMessage sets the StatusMessage field's value.
+func (s *RecordHandlerProgressInput) SetStatusMessage(v string) *RecordHandlerProgressInput {
+ s.StatusMessage = &v
+ return s
+}
+
+type RecordHandlerProgressOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s RecordHandlerProgressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RecordHandlerProgressOutput) GoString() string {
+ return s.String()
+}
+
+type RegisterTypeInput struct {
+ _ struct{} `type:"structure"`
+
+ // A unique identifier that acts as an idempotency key for this registration
+ // request. Specifying a client request token prevents CloudFormation from generating
+ // more than one version of a type from the same registeration request, even
+ // if the request is submitted multiple times.
+ ClientRequestToken *string `min:"1" type:"string"`
+
+ // The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume
+ // when invoking the resource provider. If your resource type calls AWS APIs
+ // in any of its handlers, you must create an IAM execution role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)
+ // that includes the necessary permissions to call those AWS APIs, and provision
+ // that execution role in your account. When CloudFormation needs to invoke
+ // the resource provider handler, CloudFormation assumes this execution role
+ // to create a temporary session token, which it then passes to the resource
+ // provider handler, thereby supplying your resource provider with the appropriate
+ // credentials.
+ ExecutionRoleArn *string `min:"1" type:"string"`
+
+ // Specifies logging configuration information for a type.
+ LoggingConfig *LoggingConfig `type:"structure"`
+
+ // A url to the S3 bucket containing the schema handler package that contains
+ // the schema, event handlers, and associated files for the type you want to
+ // register.
+ //
+ // For information on generating a schema handler package for the type you want
+ // to register, see submit (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html)
+ // in the CloudFormation CLI User Guide.
+ //
+ // As part of registering a resource provider type, CloudFormation must be able
+ // to access the S3 bucket which contains the schema handler package for that
+ // resource provider. For more information, see IAM Permissions for Registering
+ // a Resource Provider (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html#registry-register-permissions)
+ // in the AWS CloudFormation User Guide.
+ //
+ // SchemaHandlerPackage is a required field
+ SchemaHandlerPackage *string `min:"1" type:"string" required:"true"`
+
+ // The kind of type.
+ //
+ // Currently, the only valid value is RESOURCE.
+ Type *string `type:"string" enum:"RegistryType"`
+
+ // The name of the type being registered.
+ //
+ // We recommend that type names adhere to the following pattern: company_or_organization::service::type.
+ //
+ // The following organization namespaces are reserved and cannot be used in
+ // your resource type names:
+ //
+ // * Alexa
+ //
+ // * AMZN
+ //
+ // * Amazon
+ //
+ // * AWS
+ //
+ // * Custom
+ //
+ // * Dev
+ //
+ // TypeName is a required field
+ TypeName *string `min:"10" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s RegisterTypeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RegisterTypeInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *RegisterTypeInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "RegisterTypeInput"}
+ if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
+ }
+ if s.ExecutionRoleArn != nil && len(*s.ExecutionRoleArn) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleArn", 1))
+ }
+ if s.SchemaHandlerPackage == nil {
+ invalidParams.Add(request.NewErrParamRequired("SchemaHandlerPackage"))
+ }
+ if s.SchemaHandlerPackage != nil && len(*s.SchemaHandlerPackage) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("SchemaHandlerPackage", 1))
+ }
+ if s.TypeName == nil {
+ invalidParams.Add(request.NewErrParamRequired("TypeName"))
+ }
+ if s.TypeName != nil && len(*s.TypeName) < 10 {
+ invalidParams.Add(request.NewErrParamMinLen("TypeName", 10))
+ }
+ if s.LoggingConfig != nil {
+ if err := s.LoggingConfig.Validate(); err != nil {
+ invalidParams.AddNested("LoggingConfig", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientRequestToken sets the ClientRequestToken field's value.
+func (s *RegisterTypeInput) SetClientRequestToken(v string) *RegisterTypeInput {
+ s.ClientRequestToken = &v
+ return s
+}
+
+// SetExecutionRoleArn sets the ExecutionRoleArn field's value.
+func (s *RegisterTypeInput) SetExecutionRoleArn(v string) *RegisterTypeInput {
+ s.ExecutionRoleArn = &v
+ return s
+}
+
+// SetLoggingConfig sets the LoggingConfig field's value.
+func (s *RegisterTypeInput) SetLoggingConfig(v *LoggingConfig) *RegisterTypeInput {
+ s.LoggingConfig = v
+ return s
+}
+
+// SetSchemaHandlerPackage sets the SchemaHandlerPackage field's value.
+func (s *RegisterTypeInput) SetSchemaHandlerPackage(v string) *RegisterTypeInput {
+ s.SchemaHandlerPackage = &v
+ return s
+}
+
+// SetType sets the Type field's value.
+func (s *RegisterTypeInput) SetType(v string) *RegisterTypeInput {
+ s.Type = &v
+ return s
+}
+
+// SetTypeName sets the TypeName field's value.
+func (s *RegisterTypeInput) SetTypeName(v string) *RegisterTypeInput {
+ s.TypeName = &v
+ return s
+}
+
+type RegisterTypeOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The identifier for this registration request.
+ //
+ // Use this registration token when calling DescribeTypeRegistration , which
+ // returns information about the status and IDs of the type registration.
+ RegistrationToken *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s RegisterTypeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RegisterTypeOutput) GoString() string {
+ return s.String()
+}
+
+// SetRegistrationToken sets the RegistrationToken field's value.
+func (s *RegisterTypeOutput) SetRegistrationToken(v string) *RegisterTypeOutput {
+ s.RegistrationToken = &v
+ return s
+}
+
// The ResourceChange structure describes the resource and the action that AWS
// CloudFormation will perform on it if you execute this change set.
type ResourceChange struct {
@@ -9524,21 +12488,68 @@ func (s *ResourceChangeDetail) SetCausingEntity(v string) *ResourceChangeDetail
return s
}
-// SetChangeSource sets the ChangeSource field's value.
-func (s *ResourceChangeDetail) SetChangeSource(v string) *ResourceChangeDetail {
- s.ChangeSource = &v
+// SetChangeSource sets the ChangeSource field's value.
+func (s *ResourceChangeDetail) SetChangeSource(v string) *ResourceChangeDetail {
+ s.ChangeSource = &v
+ return s
+}
+
+// SetEvaluation sets the Evaluation field's value.
+func (s *ResourceChangeDetail) SetEvaluation(v string) *ResourceChangeDetail {
+ s.Evaluation = &v
+ return s
+}
+
+// SetTarget sets the Target field's value.
+func (s *ResourceChangeDetail) SetTarget(v *ResourceTargetDefinition) *ResourceChangeDetail {
+ s.Target = v
+ return s
+}
+
+// Describes the target resources of a specific type in your import template
+// (for example, all AWS::S3::Bucket resources) and the properties you can provide
+// during the import to identify resources of that type.
+type ResourceIdentifierSummary struct {
+ _ struct{} `type:"structure"`
+
+ // The logical IDs of the target resources of the specified ResourceType, as
+ // defined in the import template.
+ LogicalResourceIds []*string `min:"1" type:"list"`
+
+ // The resource properties you can provide during the import to identify your
+ // target resources. For example, BucketName is a possible identifier property
+ // for AWS::S3::Bucket resources.
+ ResourceIdentifiers []*string `type:"list"`
+
+ // The template resource type of the target resources, such as AWS::S3::Bucket.
+ ResourceType *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceIdentifierSummary) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceIdentifierSummary) GoString() string {
+ return s.String()
+}
+
+// SetLogicalResourceIds sets the LogicalResourceIds field's value.
+func (s *ResourceIdentifierSummary) SetLogicalResourceIds(v []*string) *ResourceIdentifierSummary {
+ s.LogicalResourceIds = v
return s
}
-// SetEvaluation sets the Evaluation field's value.
-func (s *ResourceChangeDetail) SetEvaluation(v string) *ResourceChangeDetail {
- s.Evaluation = &v
+// SetResourceIdentifiers sets the ResourceIdentifiers field's value.
+func (s *ResourceIdentifierSummary) SetResourceIdentifiers(v []*string) *ResourceIdentifierSummary {
+ s.ResourceIdentifiers = v
return s
}
-// SetTarget sets the Target field's value.
-func (s *ResourceChangeDetail) SetTarget(v *ResourceTargetDefinition) *ResourceChangeDetail {
- s.Target = v
+// SetResourceType sets the ResourceType field's value.
+func (s *ResourceIdentifierSummary) SetResourceType(v string) *ResourceIdentifierSummary {
+ s.ResourceType = &v
return s
}
@@ -9591,6 +12602,81 @@ func (s *ResourceTargetDefinition) SetRequiresRecreation(v string) *ResourceTarg
return s
}
+// Describes the target resource of an import operation.
+type ResourceToImport struct {
+ _ struct{} `type:"structure"`
+
+ // The logical ID of the target resource as specified in the template.
+ //
+ // LogicalResourceId is a required field
+ LogicalResourceId *string `type:"string" required:"true"`
+
+ // A key-value pair that identifies the target resource. The key is an identifier
+ // property (for example, BucketName for AWS::S3::Bucket resources) and the
+ // value is the actual property value (for example, MyS3Bucket).
+ //
+ // ResourceIdentifier is a required field
+ ResourceIdentifier map[string]*string `min:"1" type:"map" required:"true"`
+
+ // The type of resource to import into your stack, such as AWS::S3::Bucket.
+ //
+ // ResourceType is a required field
+ ResourceType *string `min:"1" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ResourceToImport) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceToImport) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ResourceToImport) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ResourceToImport"}
+ if s.LogicalResourceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("LogicalResourceId"))
+ }
+ if s.ResourceIdentifier == nil {
+ invalidParams.Add(request.NewErrParamRequired("ResourceIdentifier"))
+ }
+ if s.ResourceIdentifier != nil && len(s.ResourceIdentifier) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifier", 1))
+ }
+ if s.ResourceType == nil {
+ invalidParams.Add(request.NewErrParamRequired("ResourceType"))
+ }
+ if s.ResourceType != nil && len(*s.ResourceType) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetLogicalResourceId sets the LogicalResourceId field's value.
+func (s *ResourceToImport) SetLogicalResourceId(v string) *ResourceToImport {
+ s.LogicalResourceId = &v
+ return s
+}
+
+// SetResourceIdentifier sets the ResourceIdentifier field's value.
+func (s *ResourceToImport) SetResourceIdentifier(v map[string]*string) *ResourceToImport {
+ s.ResourceIdentifier = v
+ return s
+}
+
+// SetResourceType sets the ResourceType field's value.
+func (s *ResourceToImport) SetResourceType(v string) *ResourceToImport {
+ s.ResourceType = &v
+ return s
+}
+
// Structure containing the rollback triggers for AWS CloudFormation to monitor
// during stack creation and updating operations, and for the specified monitoring
// period afterwards.
@@ -9766,7 +12852,7 @@ type SetStackPolicyInput struct {
StackPolicyBody *string `min:"1" type:"string"`
// Location of a file containing the stack policy. The URL must point to a policy
- // (maximum size: 16 KB) located in an S3 bucket in the same region as the stack.
+ // (maximum size: 16 KB) located in an S3 bucket in the same Region as the stack.
// You can specify either the StackPolicyBody or the StackPolicyURL parameter,
// but not both.
StackPolicyURL *string `min:"1" type:"string"`
@@ -9833,6 +12919,95 @@ func (s SetStackPolicyOutput) GoString() string {
return s.String()
}
+type SetTypeDefaultVersionInput struct {
+ _ struct{} `type:"structure"`
+
+ // The Amazon Resource Name (ARN) of the type for which you want version summary
+ // information.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ Arn *string `type:"string"`
+
+ // The kind of type.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ Type *string `type:"string" enum:"RegistryType"`
+
+ // The name of the type.
+ //
+ // Conditional: You must specify either TypeName and Type, or Arn.
+ TypeName *string `min:"10" type:"string"`
+
+ // The ID of a specific version of the type. The version ID is the value at
+ // the end of the Amazon Resource Name (ARN) assigned to the type version when
+ // it is registered.
+ VersionId *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s SetTypeDefaultVersionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SetTypeDefaultVersionInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *SetTypeDefaultVersionInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "SetTypeDefaultVersionInput"}
+ if s.TypeName != nil && len(*s.TypeName) < 10 {
+ invalidParams.Add(request.NewErrParamMinLen("TypeName", 10))
+ }
+ if s.VersionId != nil && len(*s.VersionId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetArn sets the Arn field's value.
+func (s *SetTypeDefaultVersionInput) SetArn(v string) *SetTypeDefaultVersionInput {
+ s.Arn = &v
+ return s
+}
+
+// SetType sets the Type field's value.
+func (s *SetTypeDefaultVersionInput) SetType(v string) *SetTypeDefaultVersionInput {
+ s.Type = &v
+ return s
+}
+
+// SetTypeName sets the TypeName field's value.
+func (s *SetTypeDefaultVersionInput) SetTypeName(v string) *SetTypeDefaultVersionInput {
+ s.TypeName = &v
+ return s
+}
+
+// SetVersionId sets the VersionId field's value.
+func (s *SetTypeDefaultVersionInput) SetVersionId(v string) *SetTypeDefaultVersionInput {
+ s.VersionId = &v
+ return s
+}
+
+type SetTypeDefaultVersionOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s SetTypeDefaultVersionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SetTypeDefaultVersionOutput) GoString() string {
+ return s.String()
+}
+
// The input for the SignalResource action.
type SignalResourceInput struct {
_ struct{} `type:"structure"`
@@ -10014,7 +13189,7 @@ type Stack struct {
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.
+ // ID of 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.
@@ -10425,9 +13600,9 @@ func (s *StackEvent) SetTimestamp(v time.Time) *StackEvent {
return s
}
-// An AWS CloudFormation stack, in a specific account and region, that's part
+// An AWS CloudFormation stack, in a specific account and Region, that's part
// of a stack set operation. A stack instance is a reference to an attempted
-// or actual stack in a given account within a given region. A stack instance
+// or actual stack in a given account within a given Region. A stack instance
// can exist without a stack—for example, if the stack couldn't be created
// for some reason. A stack instance is associated with only one stack set.
// Each stack instance contains the ID of its associated stack set, as well
@@ -10435,14 +13610,41 @@ func (s *StackEvent) SetTimestamp(v time.Time) *StackEvent {
type StackInstance struct {
_ struct{} `type:"structure"`
- // The name of the AWS account that the stack instance is associated with.
+ // [Self-managed permissions] The name of the AWS account that the stack instance
+ // is associated with.
Account *string `type:"string"`
+ // Status of the stack instance's actual configuration compared to the expected
+ // template and parameter configuration of the stack set to which it belongs.
+ //
+ // * DRIFTED: The stack differs from the expected template and parameter
+ // configuration of the stack set to which it belongs. A stack instance is
+ // considered to have drifted if one or more of the resources in the associated
+ // stack have drifted.
+ //
+ // * NOT_CHECKED: AWS CloudFormation has not checked if the stack instance
+ // differs from its expected stack set configuration.
+ //
+ // * IN_SYNC: The stack instance's actual configuration matches its expected
+ // stack set configuration.
+ //
+ // * UNKNOWN: This value is reserved for future use.
+ DriftStatus *string `type:"string" enum:"StackDriftStatus"`
+
+ // Most recent time when CloudFormation performed a drift detection operation
+ // on the stack instance. This value will be NULL for any stack instance on
+ // which drift detection has not yet been performed.
+ LastDriftCheckTimestamp *time.Time `type:"timestamp"`
+
+ // [Service-managed permissions] The organization root ID or organizational
+ // unit (OU) IDs that you specified for DeploymentTargets (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html).
+ OrganizationalUnitId *string `type:"string"`
+
// A list of parameters from the stack set template whose values have been overridden
// in this stack instance.
ParameterOverrides []*Parameter `type:"list"`
- // The name of the AWS region that the stack instance is associated with.
+ // The name of the AWS Region that the stack instance is associated with.
Region *string `type:"string"`
// The ID of the stack instance.
@@ -10490,6 +13692,24 @@ func (s *StackInstance) SetAccount(v string) *StackInstance {
return s
}
+// SetDriftStatus sets the DriftStatus field's value.
+func (s *StackInstance) SetDriftStatus(v string) *StackInstance {
+ s.DriftStatus = &v
+ return s
+}
+
+// SetLastDriftCheckTimestamp sets the LastDriftCheckTimestamp field's value.
+func (s *StackInstance) SetLastDriftCheckTimestamp(v time.Time) *StackInstance {
+ s.LastDriftCheckTimestamp = &v
+ return s
+}
+
+// SetOrganizationalUnitId sets the OrganizationalUnitId field's value.
+func (s *StackInstance) SetOrganizationalUnitId(v string) *StackInstance {
+ s.OrganizationalUnitId = &v
+ return s
+}
+
// SetParameterOverrides sets the ParameterOverrides field's value.
func (s *StackInstance) SetParameterOverrides(v []*Parameter) *StackInstance {
s.ParameterOverrides = v
@@ -10530,10 +13750,37 @@ func (s *StackInstance) SetStatusReason(v string) *StackInstance {
type StackInstanceSummary struct {
_ struct{} `type:"structure"`
- // The name of the AWS account that the stack instance is associated with.
+ // [Self-managed permissions] The name of the AWS account that the stack instance
+ // is associated with.
Account *string `type:"string"`
- // The name of the AWS region that the stack instance is associated with.
+ // Status of the stack instance's actual configuration compared to the expected
+ // template and parameter configuration of the stack set to which it belongs.
+ //
+ // * DRIFTED: The stack differs from the expected template and parameter
+ // configuration of the stack set to which it belongs. A stack instance is
+ // considered to have drifted if one or more of the resources in the associated
+ // stack have drifted.
+ //
+ // * NOT_CHECKED: AWS CloudFormation has not checked if the stack instance
+ // differs from its expected stack set configuration.
+ //
+ // * IN_SYNC: The stack instance's actual configuration matches its expected
+ // stack set configuration.
+ //
+ // * UNKNOWN: This value is reserved for future use.
+ DriftStatus *string `type:"string" enum:"StackDriftStatus"`
+
+ // Most recent time when CloudFormation performed a drift detection operation
+ // on the stack instance. This value will be NULL for any stack instance on
+ // which drift detection has not yet been performed.
+ LastDriftCheckTimestamp *time.Time `type:"timestamp"`
+
+ // [Service-managed permissions] The organization root ID or organizational
+ // unit (OU) IDs that you specified for DeploymentTargets (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html).
+ OrganizationalUnitId *string `type:"string"`
+
+ // The name of the AWS Region that the stack instance is associated with.
Region *string `type:"string"`
// The ID of the stack instance.
@@ -10580,6 +13827,24 @@ func (s *StackInstanceSummary) SetAccount(v string) *StackInstanceSummary {
return s
}
+// SetDriftStatus sets the DriftStatus field's value.
+func (s *StackInstanceSummary) SetDriftStatus(v string) *StackInstanceSummary {
+ s.DriftStatus = &v
+ return s
+}
+
+// SetLastDriftCheckTimestamp sets the LastDriftCheckTimestamp field's value.
+func (s *StackInstanceSummary) SetLastDriftCheckTimestamp(v time.Time) *StackInstanceSummary {
+ s.LastDriftCheckTimestamp = &v
+ return s
+}
+
+// SetOrganizationalUnitId sets the OrganizationalUnitId field's value.
+func (s *StackInstanceSummary) SetOrganizationalUnitId(v string) *StackInstanceSummary {
+ s.OrganizationalUnitId = &v
+ return s
+}
+
// SetRegion sets the Region field's value.
func (s *StackInstanceSummary) SetRegion(v string) *StackInstanceSummary {
s.Region = &v
@@ -11208,7 +14473,7 @@ func (s *StackResourceSummary) SetResourceType(v string) *StackResourceSummary {
}
// A structure that contains information about a stack set. A stack set enables
-// you to provision stacks into AWS accounts and across regions by using a single
+// you to provision stacks into AWS accounts and across Regions by using a single
// CloudFormation template. In the stack set, you specify the template to use,
// as well as any parameters and capabilities that the template requires.
type StackSet struct {
@@ -11223,6 +14488,11 @@ type StackSet struct {
// in the AWS CloudFormation User Guide.
AdministrationRoleARN *string `min:"20" type:"string"`
+ // [Service-managed permissions] Describes whether StackSets automatically deploys
+ // to AWS Organizations accounts that are added to a target organization or
+ // organizational unit (OU).
+ AutoDeployment *AutoDeployment `type:"structure"`
+
// The capabilities that are allowed in the stack set. Some stack set templates
// might include resources that can affect permissions in your AWS account—for
// example, by creating new AWS Identity and Access Management (IAM) users.
@@ -11240,12 +14510,35 @@ type StackSet struct {
// groups can include in their stack sets.
ExecutionRoleName *string `min:"1" type:"string"`
+ // [Service-managed permissions] The organization root ID or organizational
+ // unit (OU) IDs that you specified for DeploymentTargets (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html).
+ OrganizationalUnitIds []*string `type:"list"`
+
// A list of input parameters for a stack set.
Parameters []*Parameter `type:"list"`
+ // Describes how the IAM roles required for stack set operations are created.
+ //
+ // * With self-managed permissions, you must create the administrator and
+ // execution roles required to deploy to target accounts. For more information,
+ // see Grant Self-Managed Stack Set Permissions (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html).
+ //
+ // * With service-managed permissions, StackSets automatically creates the
+ // IAM roles required to deploy to accounts managed by AWS Organizations.
+ // For more information, see Grant Service-Managed Stack Set Permissions
+ // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html).
+ PermissionModel *string `type:"string" enum:"PermissionModels"`
+
// The Amazon Resource Number (ARN) of the stack set.
StackSetARN *string `type:"string"`
+ // Detailed information about the drift status of the stack set.
+ //
+ // For stack sets, contains information about the last completed drift operation
+ // performed on the stack set. Information about drift operations currently
+ // in progress is not included.
+ StackSetDriftDetectionDetails *StackSetDriftDetectionDetails `type:"structure"`
+
// The ID of the stack set.
StackSetId *string `type:"string"`
@@ -11280,6 +14573,12 @@ func (s *StackSet) SetAdministrationRoleARN(v string) *StackSet {
return s
}
+// SetAutoDeployment sets the AutoDeployment field's value.
+func (s *StackSet) SetAutoDeployment(v *AutoDeployment) *StackSet {
+ s.AutoDeployment = v
+ return s
+}
+
// SetCapabilities sets the Capabilities field's value.
func (s *StackSet) SetCapabilities(v []*string) *StackSet {
s.Capabilities = v
@@ -11292,51 +14591,208 @@ func (s *StackSet) SetDescription(v string) *StackSet {
return s
}
-// SetExecutionRoleName sets the ExecutionRoleName field's value.
-func (s *StackSet) SetExecutionRoleName(v string) *StackSet {
- s.ExecutionRoleName = &v
+// SetExecutionRoleName sets the ExecutionRoleName field's value.
+func (s *StackSet) SetExecutionRoleName(v string) *StackSet {
+ s.ExecutionRoleName = &v
+ return s
+}
+
+// SetOrganizationalUnitIds sets the OrganizationalUnitIds field's value.
+func (s *StackSet) SetOrganizationalUnitIds(v []*string) *StackSet {
+ s.OrganizationalUnitIds = v
+ return s
+}
+
+// SetParameters sets the Parameters field's value.
+func (s *StackSet) SetParameters(v []*Parameter) *StackSet {
+ s.Parameters = v
+ return s
+}
+
+// SetPermissionModel sets the PermissionModel field's value.
+func (s *StackSet) SetPermissionModel(v string) *StackSet {
+ s.PermissionModel = &v
+ return s
+}
+
+// SetStackSetARN sets the StackSetARN field's value.
+func (s *StackSet) SetStackSetARN(v string) *StackSet {
+ s.StackSetARN = &v
+ return s
+}
+
+// SetStackSetDriftDetectionDetails sets the StackSetDriftDetectionDetails field's value.
+func (s *StackSet) SetStackSetDriftDetectionDetails(v *StackSetDriftDetectionDetails) *StackSet {
+ s.StackSetDriftDetectionDetails = v
+ return s
+}
+
+// SetStackSetId sets the StackSetId field's value.
+func (s *StackSet) SetStackSetId(v string) *StackSet {
+ s.StackSetId = &v
+ return s
+}
+
+// SetStackSetName sets the StackSetName field's value.
+func (s *StackSet) SetStackSetName(v string) *StackSet {
+ s.StackSetName = &v
+ return s
+}
+
+// SetStatus sets the Status field's value.
+func (s *StackSet) SetStatus(v string) *StackSet {
+ s.Status = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *StackSet) SetTags(v []*Tag) *StackSet {
+ s.Tags = v
+ return s
+}
+
+// SetTemplateBody sets the TemplateBody field's value.
+func (s *StackSet) SetTemplateBody(v string) *StackSet {
+ s.TemplateBody = &v
+ return s
+}
+
+// Detailed information about the drift status of the stack set.
+//
+// For stack sets, contains information about the last completed drift operation
+// performed on the stack set. Information about drift operations in-progress
+// is not included.
+//
+// For stack set operations, includes information about drift operations currently
+// being performed on the stack set.
+//
+// For more information, see Detecting Unmanaged Changes in Stack Sets (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-drift.html)
+// in the AWS CloudFormation User Guide.
+type StackSetDriftDetectionDetails struct {
+ _ struct{} `type:"structure"`
+
+ // The status of the stack set drift detection operation.
+ //
+ // * COMPLETED: The drift detection operation completed without failing on
+ // any stack instances.
+ //
+ // * FAILED: The drift detection operation exceeded the specified failure
+ // tolerance.
+ //
+ // * PARTIAL_SUCCESS: The drift detection operation completed without exceeding
+ // the failure tolerance for the operation.
+ //
+ // * IN_PROGRESS: The drift detection operation is currently being performed.
+ //
+ // * STOPPED: The user has cancelled the drift detection operation.
+ DriftDetectionStatus *string `type:"string" enum:"StackSetDriftDetectionStatus"`
+
+ // Status of the stack set's actual configuration compared to its expected template
+ // and parameter configuration. A stack set is considered to have drifted if
+ // one or more of its stack instances have drifted from their expected template
+ // and parameter configuration.
+ //
+ // * DRIFTED: One or more of the stack instances belonging to the stack set
+ // stack differs from the expected template and parameter configuration.
+ // A stack instance is considered to have drifted if one or more of the resources
+ // in the associated stack have drifted.
+ //
+ // * NOT_CHECKED: AWS CloudFormation has not checked the stack set for drift.
+ //
+ // * IN_SYNC: All of the stack instances belonging to the stack set stack
+ // match from the expected template and parameter configuration.
+ DriftStatus *string `type:"string" enum:"StackSetDriftStatus"`
+
+ // The number of stack instances that have drifted from the expected template
+ // and parameter configuration of the stack set. A stack instance is considered
+ // to have drifted if one or more of the resources in the associated stack do
+ // not match their expected configuration.
+ DriftedStackInstancesCount *int64 `type:"integer"`
+
+ // The number of stack instances for which the drift detection operation failed.
+ FailedStackInstancesCount *int64 `type:"integer"`
+
+ // The number of stack instances that are currently being checked for drift.
+ InProgressStackInstancesCount *int64 `type:"integer"`
+
+ // The number of stack instances which match the expected template and parameter
+ // configuration of the stack set.
+ InSyncStackInstancesCount *int64 `type:"integer"`
+
+ // Most recent time when CloudFormation performed a drift detection operation
+ // on the stack set. This value will be NULL for any stack set on which drift
+ // detection has not yet been performed.
+ LastDriftCheckTimestamp *time.Time `type:"timestamp"`
+
+ // The total number of stack instances belonging to this stack set.
+ //
+ // The total number of stack instances is equal to the total of:
+ //
+ // * Stack instances that match the stack set configuration.
+ //
+ // * Stack instances that have drifted from the stack set configuration.
+ //
+ // * Stack instances where the drift detection operation has failed.
+ //
+ // * Stack instances currently being checked for drift.
+ TotalStackInstancesCount *int64 `type:"integer"`
+}
+
+// String returns the string representation
+func (s StackSetDriftDetectionDetails) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s StackSetDriftDetectionDetails) GoString() string {
+ return s.String()
+}
+
+// SetDriftDetectionStatus sets the DriftDetectionStatus field's value.
+func (s *StackSetDriftDetectionDetails) SetDriftDetectionStatus(v string) *StackSetDriftDetectionDetails {
+ s.DriftDetectionStatus = &v
return s
}
-// SetParameters sets the Parameters field's value.
-func (s *StackSet) SetParameters(v []*Parameter) *StackSet {
- s.Parameters = v
+// SetDriftStatus sets the DriftStatus field's value.
+func (s *StackSetDriftDetectionDetails) SetDriftStatus(v string) *StackSetDriftDetectionDetails {
+ s.DriftStatus = &v
return s
}
-// SetStackSetARN sets the StackSetARN field's value.
-func (s *StackSet) SetStackSetARN(v string) *StackSet {
- s.StackSetARN = &v
+// SetDriftedStackInstancesCount sets the DriftedStackInstancesCount field's value.
+func (s *StackSetDriftDetectionDetails) SetDriftedStackInstancesCount(v int64) *StackSetDriftDetectionDetails {
+ s.DriftedStackInstancesCount = &v
return s
}
-// SetStackSetId sets the StackSetId field's value.
-func (s *StackSet) SetStackSetId(v string) *StackSet {
- s.StackSetId = &v
+// SetFailedStackInstancesCount sets the FailedStackInstancesCount field's value.
+func (s *StackSetDriftDetectionDetails) SetFailedStackInstancesCount(v int64) *StackSetDriftDetectionDetails {
+ s.FailedStackInstancesCount = &v
return s
}
-// SetStackSetName sets the StackSetName field's value.
-func (s *StackSet) SetStackSetName(v string) *StackSet {
- s.StackSetName = &v
+// SetInProgressStackInstancesCount sets the InProgressStackInstancesCount field's value.
+func (s *StackSetDriftDetectionDetails) SetInProgressStackInstancesCount(v int64) *StackSetDriftDetectionDetails {
+ s.InProgressStackInstancesCount = &v
return s
}
-// SetStatus sets the Status field's value.
-func (s *StackSet) SetStatus(v string) *StackSet {
- s.Status = &v
+// SetInSyncStackInstancesCount sets the InSyncStackInstancesCount field's value.
+func (s *StackSetDriftDetectionDetails) SetInSyncStackInstancesCount(v int64) *StackSetDriftDetectionDetails {
+ s.InSyncStackInstancesCount = &v
return s
}
-// SetTags sets the Tags field's value.
-func (s *StackSet) SetTags(v []*Tag) *StackSet {
- s.Tags = v
+// SetLastDriftCheckTimestamp sets the LastDriftCheckTimestamp field's value.
+func (s *StackSetDriftDetectionDetails) SetLastDriftCheckTimestamp(v time.Time) *StackSetDriftDetectionDetails {
+ s.LastDriftCheckTimestamp = &v
return s
}
-// SetTemplateBody sets the TemplateBody field's value.
-func (s *StackSet) SetTemplateBody(v string) *StackSet {
- s.TemplateBody = &v
+// SetTotalStackInstancesCount sets the TotalStackInstancesCount field's value.
+func (s *StackSetDriftDetectionDetails) SetTotalStackInstancesCount(v int64) *StackSetDriftDetectionDetails {
+ s.TotalStackInstancesCount = &v
return s
}
@@ -11362,13 +14818,17 @@ type StackSetOperation struct {
// The time at which the operation was initiated. Note that the creation times
// for the stack set operation might differ from the creation time of the individual
// stacks themselves. This is because AWS CloudFormation needs to perform preparatory
- // work for the operation, such as dispatching the work to the requested regions,
+ // work for the operation, such as dispatching the work to the requested Regions,
// before actually creating the first stacks.
CreationTimestamp *time.Time `type:"timestamp"`
+ // [Service-managed permissions] The AWS Organizations accounts affected by
+ // the stack operation.
+ DeploymentTargets *DeploymentTargets `type:"structure"`
+
// The time at which the stack set operation ended, across all accounts and
- // regions specified. Note that this doesn't necessarily mean that the stack
- // set operation was successful, or even attempted, in each account or region.
+ // Regions specified. Note that this doesn't necessarily mean that the stack
+ // set operation was successful, or even attempted, in each account or Region.
EndTimestamp *time.Time `type:"timestamp"`
// The name of the IAM execution role used to create or update the stack set.
@@ -11389,6 +14849,17 @@ type StackSetOperation struct {
// stack to a new stack set.
RetainStacks *bool `type:"boolean"`
+ // Detailed information about the drift status of the stack set. This includes
+ // information about drift operations currently being performed on the stack
+ // set.
+ //
+ // this information will only be present for stack set operations whose Action
+ // type is DETECT_DRIFT.
+ //
+ // For more information, see Detecting Unmanaged Changes in Stack Sets (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-drift.html)
+ // in the AWS CloudFormation User Guide.
+ StackSetDriftDetectionDetails *StackSetDriftDetectionDetails `type:"structure"`
+
// The ID of the stack set.
StackSetId *string `type:"string"`
@@ -11396,11 +14867,16 @@ type StackSetOperation struct {
//
// * FAILED: The operation exceeded the specified failure tolerance. The
// failure tolerance value that you've set for an operation is applied for
- // each region during stack create and update operations. If the number of
- // failed stacks within a region exceeds the failure tolerance, the status
- // of the operation in the region is set to FAILED. This in turn sets the
+ // each Region during stack create and update operations. If the number of
+ // failed stacks within a Region exceeds the failure tolerance, the status
+ // of the operation in the Region is set to FAILED. This in turn sets the
// status of the operation as a whole to FAILED, and AWS CloudFormation cancels
- // the operation in any remaining regions.
+ // the operation in any remaining Regions.
+ //
+ // * QUEUED: [Service-managed permissions] For automatic deployments that
+ // require a sequence of operations, the operation is queued to be performed.
+ // For more information, see the stack set operation status codes (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-status-codes)
+ // in the AWS CloudFormation User Guide.
//
// * RUNNING: The operation is currently being performed.
//
@@ -11441,6 +14917,12 @@ func (s *StackSetOperation) SetCreationTimestamp(v time.Time) *StackSetOperation
return s
}
+// SetDeploymentTargets sets the DeploymentTargets field's value.
+func (s *StackSetOperation) SetDeploymentTargets(v *DeploymentTargets) *StackSetOperation {
+ s.DeploymentTargets = v
+ return s
+}
+
// SetEndTimestamp sets the EndTimestamp field's value.
func (s *StackSetOperation) SetEndTimestamp(v time.Time) *StackSetOperation {
s.EndTimestamp = &v
@@ -11471,6 +14953,12 @@ func (s *StackSetOperation) SetRetainStacks(v bool) *StackSetOperation {
return s
}
+// SetStackSetDriftDetectionDetails sets the StackSetDriftDetectionDetails field's value.
+func (s *StackSetOperation) SetStackSetDriftDetectionDetails(v *StackSetDriftDetectionDetails) *StackSetOperation {
+ s.StackSetDriftDetectionDetails = v
+ return s
+}
+
// SetStackSetId sets the StackSetId field's value.
func (s *StackSetOperation) SetStackSetId(v string) *StackSetOperation {
s.StackSetId = &v
@@ -11491,19 +14979,19 @@ func (s *StackSetOperation) SetStatus(v string) *StackSetOperation {
type StackSetOperationPreferences struct {
_ struct{} `type:"structure"`
- // The number of accounts, per region, for which this operation can fail before
- // AWS CloudFormation stops the operation in that region. If the operation is
- // stopped in a region, AWS CloudFormation doesn't attempt the operation in
- // any subsequent regions.
+ // The number of accounts, per Region, for which this operation can fail before
+ // AWS CloudFormation stops the operation in that Region. If the operation is
+ // stopped in a Region, AWS CloudFormation doesn't attempt the operation in
+ // any subsequent Regions.
//
// Conditional: You must specify either FailureToleranceCount or FailureTolerancePercentage
// (but not both).
FailureToleranceCount *int64 `type:"integer"`
- // The percentage of accounts, per region, for which this stack operation can
- // fail before AWS CloudFormation stops the operation in that region. If the
- // operation is stopped in a region, AWS CloudFormation doesn't attempt the
- // operation in any subsequent regions.
+ // The percentage of accounts, per Region, for which this stack operation can
+ // fail before AWS CloudFormation stops the operation in that Region. If the
+ // operation is stopped in a Region, AWS CloudFormation doesn't attempt the
+ // operation in any subsequent Regions.
//
// When calculating the number of accounts based on the specified percentage,
// AWS CloudFormation rounds down to the next whole number.
@@ -11513,8 +15001,8 @@ type StackSetOperationPreferences struct {
FailureTolerancePercentage *int64 `type:"integer"`
// The maximum number of accounts in which to perform this operation at one
- // time. This is dependent on the value of FailureToleranceCount—MaxConcurrentCount
- // is at most one more than the FailureToleranceCount .
+ // 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
@@ -11540,7 +15028,7 @@ type StackSetOperationPreferences struct {
// but not both.
MaxConcurrentPercentage *int64 `min:"1" type:"integer"`
- // The order of the regions in where you want to perform the stack operation.
+ // The order of the Regions in where you want to perform the stack operation.
RegionOrder []*string `type:"list"`
}
@@ -11601,38 +15089,43 @@ func (s *StackSetOperationPreferences) SetRegionOrder(v []*string) *StackSetOper
}
// The structure that contains information about a specified operation's results
-// for a given account in a given region.
+// for a given account in a given Region.
type StackSetOperationResultSummary struct {
_ struct{} `type:"structure"`
- // The name of the AWS account for this operation result.
+ // [Self-managed permissions] The name of the AWS account for this operation
+ // result.
Account *string `type:"string"`
// The results of the account gate function AWS CloudFormation invokes, if present,
// before proceeding with stack set operations in an account
AccountGateResult *AccountGateResult `type:"structure"`
- // The name of the AWS region for this operation result.
+ // [Service-managed permissions] The organization root ID or organizational
+ // unit (OU) IDs that you specified for DeploymentTargets (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html).
+ OrganizationalUnitId *string `type:"string"`
+
+ // The name of the AWS Region for this operation result.
Region *string `type:"string"`
// The result status of the stack set operation for the given account in the
- // given region.
+ // given Region.
//
- // * CANCELLED: The operation in the specified account and region has been
+ // * CANCELLED: The operation in the specified account and Region has been
// cancelled. This is either because a user has stopped the stack set operation,
// or because the failure tolerance of the stack set operation has been exceeded.
//
- // * FAILED: The operation in the specified account and region failed. If
- // the stack set operation fails in enough accounts within a region, the
+ // * FAILED: The operation in the specified account and Region failed. If
+ // the stack set operation fails in enough accounts within a Region, the
// failure tolerance for the stack set operation as a whole might be exceeded.
//
- // * RUNNING: The operation in the specified account and region is currently
+ // * RUNNING: The operation in the specified account and Region is currently
// in progress.
//
- // * PENDING: The operation in the specified account and region has yet to
+ // * PENDING: The operation in the specified account and Region has yet to
// start.
//
- // * SUCCEEDED: The operation in the specified account and region completed
+ // * SUCCEEDED: The operation in the specified account and Region completed
// successfully.
Status *string `type:"string" enum:"StackSetOperationResultStatus"`
@@ -11662,6 +15155,12 @@ func (s *StackSetOperationResultSummary) SetAccountGateResult(v *AccountGateResu
return s
}
+// SetOrganizationalUnitId sets the OrganizationalUnitId field's value.
+func (s *StackSetOperationResultSummary) SetOrganizationalUnitId(v string) *StackSetOperationResultSummary {
+ s.OrganizationalUnitId = &v
+ return s
+}
+
// SetRegion sets the Region field's value.
func (s *StackSetOperationResultSummary) SetRegion(v string) *StackSetOperationResultSummary {
s.Region = &v
@@ -11693,13 +15192,13 @@ type StackSetOperationSummary struct {
// The time at which the operation was initiated. Note that the creation times
// for the stack set operation might differ from the creation time of the individual
// stacks themselves. This is because AWS CloudFormation needs to perform preparatory
- // work for the operation, such as dispatching the work to the requested regions,
+ // work for the operation, such as dispatching the work to the requested Regions,
// before actually creating the first stacks.
CreationTimestamp *time.Time `type:"timestamp"`
// The time at which the stack set operation ended, across all accounts and
- // regions specified. Note that this doesn't necessarily mean that the stack
- // set operation was successful, or even attempted, in each account or region.
+ // Regions specified. Note that this doesn't necessarily mean that the stack
+ // set operation was successful, or even attempted, in each account or Region.
EndTimestamp *time.Time `type:"timestamp"`
// The unique ID of the stack set operation.
@@ -11709,11 +15208,16 @@ type StackSetOperationSummary struct {
//
// * FAILED: The operation exceeded the specified failure tolerance. The
// failure tolerance value that you've set for an operation is applied for
- // each region during stack create and update operations. If the number of
- // failed stacks within a region exceeds the failure tolerance, the status
- // of the operation in the region is set to FAILED. This in turn sets the
+ // each Region during stack create and update operations. If the number of
+ // failed stacks within a Region exceeds the failure tolerance, the status
+ // of the operation in the Region is set to FAILED. This in turn sets the
// status of the operation as a whole to FAILED, and AWS CloudFormation cancels
- // the operation in any remaining regions.
+ // the operation in any remaining Regions.
+ //
+ // * QUEUED: [Service-managed permissions] For automatic deployments that
+ // require a sequence of operations, the operation is queued to be performed.
+ // For more information, see the stack set operation status codes (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-status-codes)
+ // in the AWS CloudFormation User Guide.
//
// * RUNNING: The operation is currently being performed.
//
@@ -11771,10 +15275,50 @@ func (s *StackSetOperationSummary) SetStatus(v string) *StackSetOperationSummary
type StackSetSummary struct {
_ struct{} `type:"structure"`
+ // [Service-managed permissions] Describes whether StackSets automatically deploys
+ // to AWS Organizations accounts that are added to a target organizational unit
+ // (OU).
+ AutoDeployment *AutoDeployment `type:"structure"`
+
// A description of the stack set that you specify when the stack set is created
// or updated.
Description *string `min:"1" type:"string"`
+ // Status of the stack set's actual configuration compared to its expected template
+ // and parameter configuration. A stack set is considered to have drifted if
+ // one or more of its stack instances have drifted from their expected template
+ // and parameter configuration.
+ //
+ // * DRIFTED: One or more of the stack instances belonging to the stack set
+ // stack differs from the expected template and parameter configuration.
+ // A stack instance is considered to have drifted if one or more of the resources
+ // in the associated stack have drifted.
+ //
+ // * NOT_CHECKED: AWS CloudFormation has not checked the stack set for drift.
+ //
+ // * IN_SYNC: All of the stack instances belonging to the stack set stack
+ // match from the expected template and parameter configuration.
+ //
+ // * UNKNOWN: This value is reserved for future use.
+ DriftStatus *string `type:"string" enum:"StackDriftStatus"`
+
+ // Most recent time when CloudFormation performed a drift detection operation
+ // on the stack set. This value will be NULL for any stack set on which drift
+ // detection has not yet been performed.
+ LastDriftCheckTimestamp *time.Time `type:"timestamp"`
+
+ // Describes how the IAM roles required for stack set operations are created.
+ //
+ // * With self-managed permissions, you must create the administrator and
+ // execution roles required to deploy to target accounts. For more information,
+ // see Grant Self-Managed Stack Set Permissions (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html).
+ //
+ // * With service-managed permissions, StackSets automatically creates the
+ // IAM roles required to deploy to accounts managed by AWS Organizations.
+ // For more information, see Grant Service-Managed Stack Set Permissions
+ // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html).
+ PermissionModel *string `type:"string" enum:"PermissionModels"`
+
// The ID of the stack set.
StackSetId *string `type:"string"`
@@ -11795,12 +15339,36 @@ func (s StackSetSummary) GoString() string {
return s.String()
}
+// SetAutoDeployment sets the AutoDeployment field's value.
+func (s *StackSetSummary) SetAutoDeployment(v *AutoDeployment) *StackSetSummary {
+ s.AutoDeployment = v
+ return s
+}
+
// SetDescription sets the Description field's value.
func (s *StackSetSummary) SetDescription(v string) *StackSetSummary {
s.Description = &v
return s
}
+// SetDriftStatus sets the DriftStatus field's value.
+func (s *StackSetSummary) SetDriftStatus(v string) *StackSetSummary {
+ s.DriftStatus = &v
+ return s
+}
+
+// SetLastDriftCheckTimestamp sets the LastDriftCheckTimestamp field's value.
+func (s *StackSetSummary) SetLastDriftCheckTimestamp(v time.Time) *StackSetSummary {
+ s.LastDriftCheckTimestamp = &v
+ return s
+}
+
+// SetPermissionModel sets the PermissionModel field's value.
+func (s *StackSetSummary) SetPermissionModel(v string) *StackSetSummary {
+ s.PermissionModel = &v
+ return s
+}
+
// SetStackSetId sets the StackSetId field's value.
func (s *StackSetSummary) SetStackSetId(v string) *StackSetSummary {
s.StackSetId = &v
@@ -11850,7 +15418,7 @@ type StackSummary struct {
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.
+ // ID of 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.
@@ -12137,11 +15705,164 @@ func (s *TemplateParameter) SetParameterKey(v string) *TemplateParameter {
return s
}
+// Contains summary information about the specified CloudFormation type.
+type TypeSummary struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the default version of the type. The default version is used when
+ // the type version is not specified.
+ //
+ // To set the default version of a type, use SetTypeDefaultVersion .
+ DefaultVersionId *string `min:"1" type:"string"`
+
+ // The description of the type.
+ Description *string `min:"1" type:"string"`
+
+ // When the current default version of the type was registered.
+ LastUpdated *time.Time `type:"timestamp"`
+
+ // The kind of type.
+ Type *string `type:"string" enum:"RegistryType"`
+
+ // The Amazon Resource Name (ARN) of the type.
+ TypeArn *string `type:"string"`
+
+ // The name of the type.
+ TypeName *string `min:"10" type:"string"`
+}
+
+// String returns the string representation
+func (s TypeSummary) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TypeSummary) GoString() string {
+ return s.String()
+}
+
+// SetDefaultVersionId sets the DefaultVersionId field's value.
+func (s *TypeSummary) SetDefaultVersionId(v string) *TypeSummary {
+ s.DefaultVersionId = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *TypeSummary) SetDescription(v string) *TypeSummary {
+ s.Description = &v
+ return s
+}
+
+// SetLastUpdated sets the LastUpdated field's value.
+func (s *TypeSummary) SetLastUpdated(v time.Time) *TypeSummary {
+ s.LastUpdated = &v
+ return s
+}
+
+// SetType sets the Type field's value.
+func (s *TypeSummary) SetType(v string) *TypeSummary {
+ s.Type = &v
+ return s
+}
+
+// SetTypeArn sets the TypeArn field's value.
+func (s *TypeSummary) SetTypeArn(v string) *TypeSummary {
+ s.TypeArn = &v
+ return s
+}
+
+// SetTypeName sets the TypeName field's value.
+func (s *TypeSummary) SetTypeName(v string) *TypeSummary {
+ s.TypeName = &v
+ return s
+}
+
+// Contains summary information about a specific version of a CloudFormation
+// type.
+type TypeVersionSummary struct {
+ _ struct{} `type:"structure"`
+
+ // The Amazon Resource Name (ARN) of the type version.
+ Arn *string `type:"string"`
+
+ // The description of the type version.
+ Description *string `min:"1" type:"string"`
+
+ // Whether the specified type version is set as the default version.
+ IsDefaultVersion *bool `type:"boolean"`
+
+ // When the version was registered.
+ TimeCreated *time.Time `type:"timestamp"`
+
+ // The kind of type.
+ Type *string `type:"string" enum:"RegistryType"`
+
+ // The name of the type.
+ TypeName *string `min:"10" type:"string"`
+
+ // The ID of a specific version of the type. The version ID is the value at
+ // the end of the Amazon Resource Name (ARN) assigned to the type version when
+ // it is registered.
+ VersionId *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s TypeVersionSummary) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TypeVersionSummary) GoString() string {
+ return s.String()
+}
+
+// SetArn sets the Arn field's value.
+func (s *TypeVersionSummary) SetArn(v string) *TypeVersionSummary {
+ s.Arn = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *TypeVersionSummary) SetDescription(v string) *TypeVersionSummary {
+ s.Description = &v
+ return s
+}
+
+// SetIsDefaultVersion sets the IsDefaultVersion field's value.
+func (s *TypeVersionSummary) SetIsDefaultVersion(v bool) *TypeVersionSummary {
+ s.IsDefaultVersion = &v
+ return s
+}
+
+// SetTimeCreated sets the TimeCreated field's value.
+func (s *TypeVersionSummary) SetTimeCreated(v time.Time) *TypeVersionSummary {
+ s.TimeCreated = &v
+ return s
+}
+
+// SetType sets the Type field's value.
+func (s *TypeVersionSummary) SetType(v string) *TypeVersionSummary {
+ s.Type = &v
+ return s
+}
+
+// SetTypeName sets the TypeName field's value.
+func (s *TypeVersionSummary) SetTypeName(v string) *TypeVersionSummary {
+ s.TypeName = &v
+ return s
+}
+
+// SetVersionId sets the VersionId field's value.
+func (s *TypeVersionSummary) SetVersionId(v string) *TypeVersionSummary {
+ s.VersionId = &v
+ return s
+}
+
// The input for an UpdateStack action.
type UpdateStackInput struct {
_ struct{} `type:"structure"`
- // In some cases, you must explicity acknowledge that your stack template contains
+ // In some cases, you must explicitly acknowledge that your stack template contains
// certain capabilities in order for AWS CloudFormation to update the stack.
//
// * CAPABILITY_IAM and CAPABILITY_NAMED_IAM Some stack templates might include
@@ -12266,7 +15987,7 @@ type UpdateStackInput struct {
// Location of a file containing the temporary overriding stack policy. The
// URL must point to a policy (max size: 16KB) located in an S3 bucket in the
- // same region as the stack. You can specify either the StackPolicyDuringUpdateBody
+ // same Region as the stack. You can specify either the StackPolicyDuringUpdateBody
// or the StackPolicyDuringUpdateURL parameter, but not both.
//
// If you want to update protected resources, specify a temporary overriding
@@ -12275,7 +15996,7 @@ type UpdateStackInput struct {
StackPolicyDuringUpdateURL *string `min:"1" type:"string"`
// Location of a file containing the updated stack policy. The URL must point
- // to a policy (max size: 16KB) located in an S3 bucket in the same region as
+ // to a policy (max size: 16KB) located in an S3 bucket in the same Region as
// the stack. You can specify either the StackPolicyBody or the StackPolicyURL
// parameter, but not both.
//
@@ -12480,12 +16201,22 @@ func (s *UpdateStackInput) SetUsePreviousTemplate(v bool) *UpdateStackInput {
type UpdateStackInstancesInput struct {
_ struct{} `type:"structure"`
- // The names of one or more AWS accounts for which you want to update parameter
- // values for stack instances. The overridden parameter values will be applied
- // to all stack instances in the specified accounts and regions.
+ // [Self-managed permissions] The names of one or more AWS accounts for which
+ // you want to update parameter values for stack instances. The overridden parameter
+ // values will be applied to all stack instances in the specified accounts and
+ // Regions.
+ //
+ // You can specify Accounts or DeploymentTargets, but not both.
+ Accounts []*string `type:"list"`
+
+ // [Service-managed permissions] The AWS Organizations accounts for which you
+ // want to update parameter values for stack instances. If your update targets
+ // OUs, the overridden parameter values only apply to the accounts that are
+ // currently in the target OUs and their child OUs. Accounts added to the target
+ // OUs and their child OUs in the future won't use the overridden values.
//
- // Accounts is a required field
- Accounts []*string `type:"list" required:"true"`
+ // You can specify Accounts or DeploymentTargets, but not both.
+ DeploymentTargets *DeploymentTargets `type:"structure"`
// The unique identifier for this stack set operation.
//
@@ -12504,7 +16235,7 @@ type UpdateStackInstancesInput struct {
// stack instances.
//
// Any overridden parameter values will be applied to all stack instances in
- // the specified accounts and regions. When specifying parameters and their
+ // the specified accounts and Regions. When specifying parameters and their
// values, be aware of how AWS CloudFormation sets parameter values during stack
// instance update operations:
//
@@ -12535,9 +16266,9 @@ type UpdateStackInstancesInput struct {
// new parameter, you can then override the parameter value using UpdateStackInstances.
ParameterOverrides []*Parameter `type:"list"`
- // The names of one or more regions in which you want to update parameter values
+ // The names of one or more Regions in which you want to update parameter values
// for stack instances. The overridden parameter values will be applied to all
- // stack instances in the specified accounts and regions.
+ // stack instances in the specified accounts and Regions.
//
// Regions is a required field
Regions []*string `type:"list" required:"true"`
@@ -12561,9 +16292,6 @@ func (s UpdateStackInstancesInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateStackInstancesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateStackInstancesInput"}
- if s.Accounts == nil {
- invalidParams.Add(request.NewErrParamRequired("Accounts"))
- }
if s.OperationId != nil && len(*s.OperationId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("OperationId", 1))
}
@@ -12591,6 +16319,12 @@ func (s *UpdateStackInstancesInput) SetAccounts(v []*string) *UpdateStackInstanc
return s
}
+// SetDeploymentTargets sets the DeploymentTargets field's value.
+func (s *UpdateStackInstancesInput) SetDeploymentTargets(v *DeploymentTargets) *UpdateStackInstancesInput {
+ s.DeploymentTargets = v
+ return s
+}
+
// SetOperationId sets the OperationId field's value.
func (s *UpdateStackInstancesInput) SetOperationId(v string) *UpdateStackInstancesInput {
s.OperationId = &v
@@ -12671,9 +16405,9 @@ func (s *UpdateStackOutput) SetStackId(v string) *UpdateStackOutput {
type UpdateStackSetInput struct {
_ struct{} `type:"structure"`
- // The accounts in which to update associated stack instances. If you specify
- // accounts, you must also specify the regions in which to update stack set
- // instances.
+ // [Self-managed permissions] The accounts in which to update associated stack
+ // instances. If you specify accounts, you must also specify the Regions in
+ // which to update stack set instances.
//
// To update all the stack instances associated with this stack set, do not
// specify the Accounts or Regions properties.
@@ -12681,10 +16415,10 @@ type UpdateStackSetInput struct {
// If the stack set update includes changes to the template (that is, if the
// TemplateBody or TemplateURL properties are specified), or the Parameters
// property, AWS CloudFormation marks all stack instances with a status of OUTDATED
- // prior to updating the stack instances in the specified accounts and regions.
+ // prior to updating the stack instances in the specified accounts and Regions.
// If the stack set update does not include changes to the template or parameters,
// AWS CloudFormation updates the stack instances in the specified accounts
- // and regions, while leaving all other stack instances with their existing
+ // and Regions, while leaving all other stack instances with their existing
// stack instance status.
Accounts []*string `type:"list"`
@@ -12702,7 +16436,14 @@ type UpdateStackSetInput struct {
// same customized administrator role used with this stack set previously.
AdministrationRoleARN *string `min:"20" type:"string"`
- // In some cases, you must explicity acknowledge that your stack template contains
+ // [Service-managed permissions] Describes whether StackSets automatically deploys
+ // to AWS Organizations accounts that are added to a target organization or
+ // organizational unit (OU).
+ //
+ // If you specify AutoDeployment, do not specify DeploymentTargets or Regions.
+ AutoDeployment *AutoDeployment `type:"structure"`
+
+ // In some cases, you must explicitly acknowledge that your stack template contains
// certain capabilities in order for AWS CloudFormation to update the stack
// set and its associated stack instances.
//
@@ -12741,6 +16482,21 @@ type UpdateStackSetInput struct {
// set operation will fail.
Capabilities []*string `type:"list"`
+ // [Service-managed permissions] The AWS Organizations accounts in which to
+ // update associated stack instances.
+ //
+ // To update all the stack instances associated with this stack set, do not
+ // specify DeploymentTargets or Regions.
+ //
+ // If the stack set update includes changes to the template (that is, if TemplateBody
+ // or TemplateURL is specified), or the Parameters, AWS CloudFormation marks
+ // all stack instances with a status of OUTDATED prior to updating the stack
+ // instances in the specified accounts and Regions. If the stack set update
+ // does not include changes to the template or parameters, AWS CloudFormation
+ // updates the stack instances in the specified accounts and Regions, while
+ // leaving all other stack instances with their existing stack instance status.
+ DeploymentTargets *DeploymentTargets `type:"structure"`
+
// A brief description of updates that you are making.
Description *string `min:"1" type:"string"`
@@ -12777,8 +16533,22 @@ type UpdateStackSetInput struct {
// A list of input parameters for the stack set template.
Parameters []*Parameter `type:"list"`
- // The regions in which to update associated stack instances. If you specify
- // regions, you must also specify accounts in which to update stack set instances.
+ // Describes how the IAM roles required for stack set operations are created.
+ // You cannot modify PermissionModel if there are stack instances associated
+ // with your stack set.
+ //
+ // * With self-managed permissions, you must create the administrator and
+ // execution roles required to deploy to target accounts. For more information,
+ // see Grant Self-Managed Stack Set Permissions (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html).
+ //
+ // * With service-managed permissions, StackSets automatically creates the
+ // IAM roles required to deploy to accounts managed by AWS Organizations.
+ // For more information, see Grant Service-Managed Stack Set Permissions
+ // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html).
+ PermissionModel *string `type:"string" enum:"PermissionModels"`
+
+ // The Regions in which to update associated stack instances. If you specify
+ // Regions, you must also specify accounts in which to update stack set instances.
//
// To update all the stack instances associated with this stack set, do not
// specify the Accounts or Regions properties.
@@ -12786,10 +16556,10 @@ type UpdateStackSetInput struct {
// If the stack set update includes changes to the template (that is, if the
// TemplateBody or TemplateURL properties are specified), or the Parameters
// property, AWS CloudFormation marks all stack instances with a status of OUTDATED
- // prior to updating the stack instances in the specified accounts and regions.
+ // prior to updating the stack instances in the specified accounts and Regions.
// If the stack set update does not include changes to the template or parameters,
// AWS CloudFormation updates the stack instances in the specified accounts
- // and regions, while leaving all other stack instances with their existing
+ // and Regions, while leaving all other stack instances with their existing
// stack instance status.
Regions []*string `type:"list"`
@@ -12921,12 +16691,24 @@ func (s *UpdateStackSetInput) SetAdministrationRoleARN(v string) *UpdateStackSet
return s
}
+// SetAutoDeployment sets the AutoDeployment field's value.
+func (s *UpdateStackSetInput) SetAutoDeployment(v *AutoDeployment) *UpdateStackSetInput {
+ s.AutoDeployment = v
+ return s
+}
+
// SetCapabilities sets the Capabilities field's value.
func (s *UpdateStackSetInput) SetCapabilities(v []*string) *UpdateStackSetInput {
s.Capabilities = v
return s
}
+// SetDeploymentTargets sets the DeploymentTargets field's value.
+func (s *UpdateStackSetInput) SetDeploymentTargets(v *DeploymentTargets) *UpdateStackSetInput {
+ s.DeploymentTargets = v
+ return s
+}
+
// SetDescription sets the Description field's value.
func (s *UpdateStackSetInput) SetDescription(v string) *UpdateStackSetInput {
s.Description = &v
@@ -12957,6 +16739,12 @@ func (s *UpdateStackSetInput) SetParameters(v []*Parameter) *UpdateStackSetInput
return s
}
+// SetPermissionModel sets the PermissionModel field's value.
+func (s *UpdateStackSetInput) SetPermissionModel(v string) *UpdateStackSetInput {
+ s.PermissionModel = &v
+ return s
+}
+
// SetRegions sets the Regions field's value.
func (s *UpdateStackSetInput) SetRegions(v []*string) *UpdateStackSetInput {
s.Regions = v
@@ -13255,6 +17043,9 @@ const (
// ChangeActionRemove is a ChangeAction enum value
ChangeActionRemove = "Remove"
+
+ // ChangeActionImport is a ChangeAction enum value
+ ChangeActionImport = "Import"
)
const (
@@ -13280,6 +17071,9 @@ const (
// ChangeSetTypeUpdate is a ChangeSetType enum value
ChangeSetTypeUpdate = "UPDATE"
+
+ // ChangeSetTypeImport is a ChangeSetType enum value
+ ChangeSetTypeImport = "IMPORT"
)
const (
@@ -13304,6 +17098,14 @@ const (
ChangeTypeResource = "Resource"
)
+const (
+ // DeprecatedStatusLive is a DeprecatedStatus enum value
+ DeprecatedStatusLive = "LIVE"
+
+ // DeprecatedStatusDeprecated is a DeprecatedStatus enum value
+ DeprecatedStatusDeprecated = "DEPRECATED"
+)
+
const (
// DifferenceTypeAdd is a DifferenceType enum value
DifferenceTypeAdd = "ADD"
@@ -13343,6 +17145,50 @@ const (
ExecutionStatusObsolete = "OBSOLETE"
)
+const (
+ // HandlerErrorCodeNotUpdatable is a HandlerErrorCode enum value
+ HandlerErrorCodeNotUpdatable = "NotUpdatable"
+
+ // HandlerErrorCodeInvalidRequest is a HandlerErrorCode enum value
+ HandlerErrorCodeInvalidRequest = "InvalidRequest"
+
+ // HandlerErrorCodeAccessDenied is a HandlerErrorCode enum value
+ HandlerErrorCodeAccessDenied = "AccessDenied"
+
+ // HandlerErrorCodeInvalidCredentials is a HandlerErrorCode enum value
+ HandlerErrorCodeInvalidCredentials = "InvalidCredentials"
+
+ // HandlerErrorCodeAlreadyExists is a HandlerErrorCode enum value
+ HandlerErrorCodeAlreadyExists = "AlreadyExists"
+
+ // HandlerErrorCodeNotFound is a HandlerErrorCode enum value
+ HandlerErrorCodeNotFound = "NotFound"
+
+ // HandlerErrorCodeResourceConflict is a HandlerErrorCode enum value
+ HandlerErrorCodeResourceConflict = "ResourceConflict"
+
+ // HandlerErrorCodeThrottling is a HandlerErrorCode enum value
+ HandlerErrorCodeThrottling = "Throttling"
+
+ // HandlerErrorCodeServiceLimitExceeded is a HandlerErrorCode enum value
+ HandlerErrorCodeServiceLimitExceeded = "ServiceLimitExceeded"
+
+ // HandlerErrorCodeNotStabilized is a HandlerErrorCode enum value
+ HandlerErrorCodeNotStabilized = "NotStabilized"
+
+ // HandlerErrorCodeGeneralServiceException is a HandlerErrorCode enum value
+ HandlerErrorCodeGeneralServiceException = "GeneralServiceException"
+
+ // HandlerErrorCodeServiceInternalError is a HandlerErrorCode enum value
+ HandlerErrorCodeServiceInternalError = "ServiceInternalError"
+
+ // HandlerErrorCodeNetworkFailure is a HandlerErrorCode enum value
+ HandlerErrorCodeNetworkFailure = "NetworkFailure"
+
+ // HandlerErrorCodeInternalFailure is a HandlerErrorCode enum value
+ HandlerErrorCodeInternalFailure = "InternalFailure"
+)
+
const (
// OnFailureDoNothing is a OnFailure enum value
OnFailureDoNothing = "DO_NOTHING"
@@ -13354,6 +17200,55 @@ const (
OnFailureDelete = "DELETE"
)
+const (
+ // OperationStatusPending is a OperationStatus enum value
+ OperationStatusPending = "PENDING"
+
+ // OperationStatusInProgress is a OperationStatus enum value
+ OperationStatusInProgress = "IN_PROGRESS"
+
+ // OperationStatusSuccess is a OperationStatus enum value
+ OperationStatusSuccess = "SUCCESS"
+
+ // OperationStatusFailed is a OperationStatus enum value
+ OperationStatusFailed = "FAILED"
+)
+
+const (
+ // PermissionModelsServiceManaged is a PermissionModels enum value
+ PermissionModelsServiceManaged = "SERVICE_MANAGED"
+
+ // PermissionModelsSelfManaged is a PermissionModels enum value
+ PermissionModelsSelfManaged = "SELF_MANAGED"
+)
+
+const (
+ // ProvisioningTypeNonProvisionable is a ProvisioningType enum value
+ ProvisioningTypeNonProvisionable = "NON_PROVISIONABLE"
+
+ // ProvisioningTypeImmutable is a ProvisioningType enum value
+ ProvisioningTypeImmutable = "IMMUTABLE"
+
+ // ProvisioningTypeFullyMutable is a ProvisioningType enum value
+ ProvisioningTypeFullyMutable = "FULLY_MUTABLE"
+)
+
+const (
+ // RegistrationStatusComplete is a RegistrationStatus enum value
+ RegistrationStatusComplete = "COMPLETE"
+
+ // RegistrationStatusInProgress is a RegistrationStatus enum value
+ RegistrationStatusInProgress = "IN_PROGRESS"
+
+ // RegistrationStatusFailed is a RegistrationStatus enum value
+ RegistrationStatusFailed = "FAILED"
+)
+
+const (
+ // RegistryTypeResource is a RegistryType enum value
+ RegistryTypeResource = "RESOURCE"
+)
+
const (
// ReplacementTrue is a Replacement enum value
ReplacementTrue = "True"
@@ -13434,6 +17329,24 @@ const (
// ResourceStatusUpdateComplete is a ResourceStatus enum value
ResourceStatusUpdateComplete = "UPDATE_COMPLETE"
+
+ // ResourceStatusImportFailed is a ResourceStatus enum value
+ ResourceStatusImportFailed = "IMPORT_FAILED"
+
+ // ResourceStatusImportComplete is a ResourceStatus enum value
+ ResourceStatusImportComplete = "IMPORT_COMPLETE"
+
+ // ResourceStatusImportInProgress is a ResourceStatus enum value
+ ResourceStatusImportInProgress = "IMPORT_IN_PROGRESS"
+
+ // ResourceStatusImportRollbackInProgress is a ResourceStatus enum value
+ ResourceStatusImportRollbackInProgress = "IMPORT_ROLLBACK_IN_PROGRESS"
+
+ // ResourceStatusImportRollbackFailed is a ResourceStatus enum value
+ ResourceStatusImportRollbackFailed = "IMPORT_ROLLBACK_FAILED"
+
+ // ResourceStatusImportRollbackComplete is a ResourceStatus enum value
+ ResourceStatusImportRollbackComplete = "IMPORT_ROLLBACK_COMPLETE"
)
const (
@@ -13486,6 +17399,34 @@ const (
StackResourceDriftStatusNotChecked = "NOT_CHECKED"
)
+const (
+ // StackSetDriftDetectionStatusCompleted is a StackSetDriftDetectionStatus enum value
+ StackSetDriftDetectionStatusCompleted = "COMPLETED"
+
+ // StackSetDriftDetectionStatusFailed is a StackSetDriftDetectionStatus enum value
+ StackSetDriftDetectionStatusFailed = "FAILED"
+
+ // StackSetDriftDetectionStatusPartialSuccess is a StackSetDriftDetectionStatus enum value
+ StackSetDriftDetectionStatusPartialSuccess = "PARTIAL_SUCCESS"
+
+ // StackSetDriftDetectionStatusInProgress is a StackSetDriftDetectionStatus enum value
+ StackSetDriftDetectionStatusInProgress = "IN_PROGRESS"
+
+ // StackSetDriftDetectionStatusStopped is a StackSetDriftDetectionStatus enum value
+ StackSetDriftDetectionStatusStopped = "STOPPED"
+)
+
+const (
+ // StackSetDriftStatusDrifted is a StackSetDriftStatus enum value
+ StackSetDriftStatusDrifted = "DRIFTED"
+
+ // StackSetDriftStatusInSync is a StackSetDriftStatus enum value
+ StackSetDriftStatusInSync = "IN_SYNC"
+
+ // StackSetDriftStatusNotChecked is a StackSetDriftStatus enum value
+ StackSetDriftStatusNotChecked = "NOT_CHECKED"
+)
+
const (
// StackSetOperationActionCreate is a StackSetOperationAction enum value
StackSetOperationActionCreate = "CREATE"
@@ -13495,6 +17436,9 @@ const (
// StackSetOperationActionDelete is a StackSetOperationAction enum value
StackSetOperationActionDelete = "DELETE"
+
+ // StackSetOperationActionDetectDrift is a StackSetOperationAction enum value
+ StackSetOperationActionDetectDrift = "DETECT_DRIFT"
)
const (
@@ -13529,6 +17473,9 @@ const (
// StackSetOperationStatusStopped is a StackSetOperationStatus enum value
StackSetOperationStatusStopped = "STOPPED"
+
+ // StackSetOperationStatusQueued is a StackSetOperationStatus enum value
+ StackSetOperationStatusQueued = "QUEUED"
)
const (
@@ -13590,6 +17537,21 @@ const (
// StackStatusReviewInProgress is a StackStatus enum value
StackStatusReviewInProgress = "REVIEW_IN_PROGRESS"
+
+ // StackStatusImportInProgress is a StackStatus enum value
+ StackStatusImportInProgress = "IMPORT_IN_PROGRESS"
+
+ // StackStatusImportComplete is a StackStatus enum value
+ StackStatusImportComplete = "IMPORT_COMPLETE"
+
+ // StackStatusImportRollbackInProgress is a StackStatus enum value
+ StackStatusImportRollbackInProgress = "IMPORT_ROLLBACK_IN_PROGRESS"
+
+ // StackStatusImportRollbackFailed is a StackStatus enum value
+ StackStatusImportRollbackFailed = "IMPORT_ROLLBACK_FAILED"
+
+ // StackStatusImportRollbackComplete is a StackStatus enum value
+ StackStatusImportRollbackComplete = "IMPORT_ROLLBACK_COMPLETE"
)
const (
@@ -13599,3 +17561,11 @@ const (
// TemplateStageProcessed is a TemplateStage enum value
TemplateStageProcessed = "Processed"
)
+
+const (
+ // VisibilityPublic is a Visibility enum value
+ VisibilityPublic = "PUBLIC"
+
+ // VisibilityPrivate is a Visibility enum value
+ VisibilityPrivate = "PRIVATE"
+)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface/interface.go
index 55c72e50..cc27a9ba 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface/interface.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface/interface.go
@@ -100,10 +100,17 @@ type CloudFormationAPI interface {
DeleteStackSetWithContext(aws.Context, *cloudformation.DeleteStackSetInput, ...request.Option) (*cloudformation.DeleteStackSetOutput, error)
DeleteStackSetRequest(*cloudformation.DeleteStackSetInput) (*request.Request, *cloudformation.DeleteStackSetOutput)
+ DeregisterType(*cloudformation.DeregisterTypeInput) (*cloudformation.DeregisterTypeOutput, error)
+ DeregisterTypeWithContext(aws.Context, *cloudformation.DeregisterTypeInput, ...request.Option) (*cloudformation.DeregisterTypeOutput, error)
+ DeregisterTypeRequest(*cloudformation.DeregisterTypeInput) (*request.Request, *cloudformation.DeregisterTypeOutput)
+
DescribeAccountLimits(*cloudformation.DescribeAccountLimitsInput) (*cloudformation.DescribeAccountLimitsOutput, error)
DescribeAccountLimitsWithContext(aws.Context, *cloudformation.DescribeAccountLimitsInput, ...request.Option) (*cloudformation.DescribeAccountLimitsOutput, error)
DescribeAccountLimitsRequest(*cloudformation.DescribeAccountLimitsInput) (*request.Request, *cloudformation.DescribeAccountLimitsOutput)
+ DescribeAccountLimitsPages(*cloudformation.DescribeAccountLimitsInput, func(*cloudformation.DescribeAccountLimitsOutput, bool) bool) error
+ DescribeAccountLimitsPagesWithContext(aws.Context, *cloudformation.DescribeAccountLimitsInput, func(*cloudformation.DescribeAccountLimitsOutput, bool) bool, ...request.Option) error
+
DescribeChangeSet(*cloudformation.DescribeChangeSetInput) (*cloudformation.DescribeChangeSetOutput, error)
DescribeChangeSetWithContext(aws.Context, *cloudformation.DescribeChangeSetInput, ...request.Option) (*cloudformation.DescribeChangeSetOutput, error)
DescribeChangeSetRequest(*cloudformation.DescribeChangeSetInput) (*request.Request, *cloudformation.DescribeChangeSetOutput)
@@ -153,6 +160,14 @@ type CloudFormationAPI interface {
DescribeStacksPages(*cloudformation.DescribeStacksInput, func(*cloudformation.DescribeStacksOutput, bool) bool) error
DescribeStacksPagesWithContext(aws.Context, *cloudformation.DescribeStacksInput, func(*cloudformation.DescribeStacksOutput, bool) bool, ...request.Option) error
+ DescribeType(*cloudformation.DescribeTypeInput) (*cloudformation.DescribeTypeOutput, error)
+ DescribeTypeWithContext(aws.Context, *cloudformation.DescribeTypeInput, ...request.Option) (*cloudformation.DescribeTypeOutput, error)
+ DescribeTypeRequest(*cloudformation.DescribeTypeInput) (*request.Request, *cloudformation.DescribeTypeOutput)
+
+ DescribeTypeRegistration(*cloudformation.DescribeTypeRegistrationInput) (*cloudformation.DescribeTypeRegistrationOutput, error)
+ DescribeTypeRegistrationWithContext(aws.Context, *cloudformation.DescribeTypeRegistrationInput, ...request.Option) (*cloudformation.DescribeTypeRegistrationOutput, error)
+ DescribeTypeRegistrationRequest(*cloudformation.DescribeTypeRegistrationInput) (*request.Request, *cloudformation.DescribeTypeRegistrationOutput)
+
DetectStackDrift(*cloudformation.DetectStackDriftInput) (*cloudformation.DetectStackDriftOutput, error)
DetectStackDriftWithContext(aws.Context, *cloudformation.DetectStackDriftInput, ...request.Option) (*cloudformation.DetectStackDriftOutput, error)
DetectStackDriftRequest(*cloudformation.DetectStackDriftInput) (*request.Request, *cloudformation.DetectStackDriftOutput)
@@ -161,6 +176,10 @@ type CloudFormationAPI interface {
DetectStackResourceDriftWithContext(aws.Context, *cloudformation.DetectStackResourceDriftInput, ...request.Option) (*cloudformation.DetectStackResourceDriftOutput, error)
DetectStackResourceDriftRequest(*cloudformation.DetectStackResourceDriftInput) (*request.Request, *cloudformation.DetectStackResourceDriftOutput)
+ DetectStackSetDrift(*cloudformation.DetectStackSetDriftInput) (*cloudformation.DetectStackSetDriftOutput, error)
+ DetectStackSetDriftWithContext(aws.Context, *cloudformation.DetectStackSetDriftInput, ...request.Option) (*cloudformation.DetectStackSetDriftOutput, error)
+ DetectStackSetDriftRequest(*cloudformation.DetectStackSetDriftInput) (*request.Request, *cloudformation.DetectStackSetDriftOutput)
+
EstimateTemplateCost(*cloudformation.EstimateTemplateCostInput) (*cloudformation.EstimateTemplateCostOutput, error)
EstimateTemplateCostWithContext(aws.Context, *cloudformation.EstimateTemplateCostInput, ...request.Option) (*cloudformation.EstimateTemplateCostOutput, error)
EstimateTemplateCostRequest(*cloudformation.EstimateTemplateCostInput) (*request.Request, *cloudformation.EstimateTemplateCostOutput)
@@ -185,6 +204,9 @@ type CloudFormationAPI interface {
ListChangeSetsWithContext(aws.Context, *cloudformation.ListChangeSetsInput, ...request.Option) (*cloudformation.ListChangeSetsOutput, error)
ListChangeSetsRequest(*cloudformation.ListChangeSetsInput) (*request.Request, *cloudformation.ListChangeSetsOutput)
+ ListChangeSetsPages(*cloudformation.ListChangeSetsInput, func(*cloudformation.ListChangeSetsOutput, bool) bool) error
+ ListChangeSetsPagesWithContext(aws.Context, *cloudformation.ListChangeSetsInput, func(*cloudformation.ListChangeSetsOutput, bool) bool, ...request.Option) error
+
ListExports(*cloudformation.ListExportsInput) (*cloudformation.ListExportsOutput, error)
ListExportsWithContext(aws.Context, *cloudformation.ListExportsInput, ...request.Option) (*cloudformation.ListExportsOutput, error)
ListExportsRequest(*cloudformation.ListExportsInput) (*request.Request, *cloudformation.ListExportsOutput)
@@ -203,6 +225,9 @@ type CloudFormationAPI interface {
ListStackInstancesWithContext(aws.Context, *cloudformation.ListStackInstancesInput, ...request.Option) (*cloudformation.ListStackInstancesOutput, error)
ListStackInstancesRequest(*cloudformation.ListStackInstancesInput) (*request.Request, *cloudformation.ListStackInstancesOutput)
+ ListStackInstancesPages(*cloudformation.ListStackInstancesInput, func(*cloudformation.ListStackInstancesOutput, bool) bool) error
+ ListStackInstancesPagesWithContext(aws.Context, *cloudformation.ListStackInstancesInput, func(*cloudformation.ListStackInstancesOutput, bool) bool, ...request.Option) error
+
ListStackResources(*cloudformation.ListStackResourcesInput) (*cloudformation.ListStackResourcesOutput, error)
ListStackResourcesWithContext(aws.Context, *cloudformation.ListStackResourcesInput, ...request.Option) (*cloudformation.ListStackResourcesOutput, error)
ListStackResourcesRequest(*cloudformation.ListStackResourcesInput) (*request.Request, *cloudformation.ListStackResourcesOutput)
@@ -214,14 +239,23 @@ type CloudFormationAPI interface {
ListStackSetOperationResultsWithContext(aws.Context, *cloudformation.ListStackSetOperationResultsInput, ...request.Option) (*cloudformation.ListStackSetOperationResultsOutput, error)
ListStackSetOperationResultsRequest(*cloudformation.ListStackSetOperationResultsInput) (*request.Request, *cloudformation.ListStackSetOperationResultsOutput)
+ ListStackSetOperationResultsPages(*cloudformation.ListStackSetOperationResultsInput, func(*cloudformation.ListStackSetOperationResultsOutput, bool) bool) error
+ ListStackSetOperationResultsPagesWithContext(aws.Context, *cloudformation.ListStackSetOperationResultsInput, func(*cloudformation.ListStackSetOperationResultsOutput, bool) bool, ...request.Option) error
+
ListStackSetOperations(*cloudformation.ListStackSetOperationsInput) (*cloudformation.ListStackSetOperationsOutput, error)
ListStackSetOperationsWithContext(aws.Context, *cloudformation.ListStackSetOperationsInput, ...request.Option) (*cloudformation.ListStackSetOperationsOutput, error)
ListStackSetOperationsRequest(*cloudformation.ListStackSetOperationsInput) (*request.Request, *cloudformation.ListStackSetOperationsOutput)
+ ListStackSetOperationsPages(*cloudformation.ListStackSetOperationsInput, func(*cloudformation.ListStackSetOperationsOutput, bool) bool) error
+ ListStackSetOperationsPagesWithContext(aws.Context, *cloudformation.ListStackSetOperationsInput, func(*cloudformation.ListStackSetOperationsOutput, bool) bool, ...request.Option) error
+
ListStackSets(*cloudformation.ListStackSetsInput) (*cloudformation.ListStackSetsOutput, error)
ListStackSetsWithContext(aws.Context, *cloudformation.ListStackSetsInput, ...request.Option) (*cloudformation.ListStackSetsOutput, error)
ListStackSetsRequest(*cloudformation.ListStackSetsInput) (*request.Request, *cloudformation.ListStackSetsOutput)
+ ListStackSetsPages(*cloudformation.ListStackSetsInput, func(*cloudformation.ListStackSetsOutput, bool) bool) error
+ ListStackSetsPagesWithContext(aws.Context, *cloudformation.ListStackSetsInput, func(*cloudformation.ListStackSetsOutput, bool) bool, ...request.Option) error
+
ListStacks(*cloudformation.ListStacksInput) (*cloudformation.ListStacksOutput, error)
ListStacksWithContext(aws.Context, *cloudformation.ListStacksInput, ...request.Option) (*cloudformation.ListStacksOutput, error)
ListStacksRequest(*cloudformation.ListStacksInput) (*request.Request, *cloudformation.ListStacksOutput)
@@ -229,10 +263,43 @@ type CloudFormationAPI interface {
ListStacksPages(*cloudformation.ListStacksInput, func(*cloudformation.ListStacksOutput, bool) bool) error
ListStacksPagesWithContext(aws.Context, *cloudformation.ListStacksInput, func(*cloudformation.ListStacksOutput, bool) bool, ...request.Option) error
+ ListTypeRegistrations(*cloudformation.ListTypeRegistrationsInput) (*cloudformation.ListTypeRegistrationsOutput, error)
+ ListTypeRegistrationsWithContext(aws.Context, *cloudformation.ListTypeRegistrationsInput, ...request.Option) (*cloudformation.ListTypeRegistrationsOutput, error)
+ ListTypeRegistrationsRequest(*cloudformation.ListTypeRegistrationsInput) (*request.Request, *cloudformation.ListTypeRegistrationsOutput)
+
+ ListTypeRegistrationsPages(*cloudformation.ListTypeRegistrationsInput, func(*cloudformation.ListTypeRegistrationsOutput, bool) bool) error
+ ListTypeRegistrationsPagesWithContext(aws.Context, *cloudformation.ListTypeRegistrationsInput, func(*cloudformation.ListTypeRegistrationsOutput, bool) bool, ...request.Option) error
+
+ ListTypeVersions(*cloudformation.ListTypeVersionsInput) (*cloudformation.ListTypeVersionsOutput, error)
+ ListTypeVersionsWithContext(aws.Context, *cloudformation.ListTypeVersionsInput, ...request.Option) (*cloudformation.ListTypeVersionsOutput, error)
+ ListTypeVersionsRequest(*cloudformation.ListTypeVersionsInput) (*request.Request, *cloudformation.ListTypeVersionsOutput)
+
+ ListTypeVersionsPages(*cloudformation.ListTypeVersionsInput, func(*cloudformation.ListTypeVersionsOutput, bool) bool) error
+ ListTypeVersionsPagesWithContext(aws.Context, *cloudformation.ListTypeVersionsInput, func(*cloudformation.ListTypeVersionsOutput, bool) bool, ...request.Option) error
+
+ ListTypes(*cloudformation.ListTypesInput) (*cloudformation.ListTypesOutput, error)
+ ListTypesWithContext(aws.Context, *cloudformation.ListTypesInput, ...request.Option) (*cloudformation.ListTypesOutput, error)
+ ListTypesRequest(*cloudformation.ListTypesInput) (*request.Request, *cloudformation.ListTypesOutput)
+
+ ListTypesPages(*cloudformation.ListTypesInput, func(*cloudformation.ListTypesOutput, bool) bool) error
+ ListTypesPagesWithContext(aws.Context, *cloudformation.ListTypesInput, func(*cloudformation.ListTypesOutput, bool) bool, ...request.Option) error
+
+ RecordHandlerProgress(*cloudformation.RecordHandlerProgressInput) (*cloudformation.RecordHandlerProgressOutput, error)
+ RecordHandlerProgressWithContext(aws.Context, *cloudformation.RecordHandlerProgressInput, ...request.Option) (*cloudformation.RecordHandlerProgressOutput, error)
+ RecordHandlerProgressRequest(*cloudformation.RecordHandlerProgressInput) (*request.Request, *cloudformation.RecordHandlerProgressOutput)
+
+ RegisterType(*cloudformation.RegisterTypeInput) (*cloudformation.RegisterTypeOutput, error)
+ RegisterTypeWithContext(aws.Context, *cloudformation.RegisterTypeInput, ...request.Option) (*cloudformation.RegisterTypeOutput, error)
+ RegisterTypeRequest(*cloudformation.RegisterTypeInput) (*request.Request, *cloudformation.RegisterTypeOutput)
+
SetStackPolicy(*cloudformation.SetStackPolicyInput) (*cloudformation.SetStackPolicyOutput, error)
SetStackPolicyWithContext(aws.Context, *cloudformation.SetStackPolicyInput, ...request.Option) (*cloudformation.SetStackPolicyOutput, error)
SetStackPolicyRequest(*cloudformation.SetStackPolicyInput) (*request.Request, *cloudformation.SetStackPolicyOutput)
+ SetTypeDefaultVersion(*cloudformation.SetTypeDefaultVersionInput) (*cloudformation.SetTypeDefaultVersionOutput, error)
+ SetTypeDefaultVersionWithContext(aws.Context, *cloudformation.SetTypeDefaultVersionInput, ...request.Option) (*cloudformation.SetTypeDefaultVersionOutput, error)
+ SetTypeDefaultVersionRequest(*cloudformation.SetTypeDefaultVersionInput) (*request.Request, *cloudformation.SetTypeDefaultVersionOutput)
+
SignalResource(*cloudformation.SignalResourceInput) (*cloudformation.SignalResourceOutput, error)
SignalResourceWithContext(aws.Context, *cloudformation.SignalResourceInput, ...request.Option) (*cloudformation.SignalResourceOutput, error)
SignalResourceRequest(*cloudformation.SignalResourceInput) (*request.Request, *cloudformation.SignalResourceOutput)
@@ -273,8 +340,17 @@ type CloudFormationAPI interface {
WaitUntilStackExists(*cloudformation.DescribeStacksInput) error
WaitUntilStackExistsWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
+ WaitUntilStackImportComplete(*cloudformation.DescribeStacksInput) error
+ WaitUntilStackImportCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
+
+ WaitUntilStackRollbackComplete(*cloudformation.DescribeStacksInput) error
+ WaitUntilStackRollbackCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
+
WaitUntilStackUpdateComplete(*cloudformation.DescribeStacksInput) error
WaitUntilStackUpdateCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
+
+ WaitUntilTypeRegistrationComplete(*cloudformation.DescribeTypeRegistrationInput) error
+ WaitUntilTypeRegistrationCompleteWithContext(aws.Context, *cloudformation.DescribeTypeRegistrationInput, ...request.WaiterOption) error
}
var _ CloudFormationAPI = (*cloudformation.CloudFormation)(nil)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/errors.go
index 9ced8d7b..f2312e9f 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/errors.go
@@ -10,6 +10,12 @@ const (
// The resource with the name requested already exists.
ErrCodeAlreadyExistsException = "AlreadyExistsException"
+ // ErrCodeCFNRegistryException for service response error code
+ // "CFNRegistryException".
+ //
+ // An error occurred during a CloudFormation registry operation.
+ ErrCodeCFNRegistryException = "CFNRegistryException"
+
// ErrCodeChangeSetNotFoundException for service response error code
// "ChangeSetNotFound".
//
@@ -44,6 +50,13 @@ const (
// The specified operation isn't valid.
ErrCodeInvalidOperationException = "InvalidOperationException"
+ // ErrCodeInvalidStateTransitionException for service response error code
+ // "InvalidStateTransition".
+ //
+ // Error reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+ // CloudFormation does not return this error to users.
+ ErrCodeInvalidStateTransitionException = "InvalidStateTransition"
+
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
@@ -78,6 +91,13 @@ const (
// The specified ID refers to an operation that doesn't exist.
ErrCodeOperationNotFoundException = "OperationNotFoundException"
+ // ErrCodeOperationStatusCheckFailedException for service response error code
+ // "ConditionalCheckFailed".
+ //
+ // Error reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
+ // CloudFormation does not return this error to users.
+ ErrCodeOperationStatusCheckFailedException = "ConditionalCheckFailed"
+
// ErrCodeStackInstanceNotFoundException for service response error code
// "StackInstanceNotFoundException".
//
@@ -110,4 +130,10 @@ const (
//
// A client request token already exists.
ErrCodeTokenAlreadyExistsException = "TokenAlreadyExistsException"
+
+ // ErrCodeTypeNotFoundException for service response error code
+ // "TypeNotFoundException".
+ //
+ // The specified type does not exist in the CloudFormation registry.
+ ErrCodeTypeNotFoundException = "TypeNotFoundException"
)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go
index 65df49a0..33748e5d 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go
@@ -31,7 +31,7 @@ var initRequest func(*request.Request)
const (
ServiceName = "cloudformation" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "CloudFormation" // ServiceID is a unique identifer of a specific service.
+ ServiceID = "CloudFormation" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the CloudFormation client with a session.
@@ -39,6 +39,8 @@ const (
// aws.Config parameter to add your extra config.
//
// Example:
+// mySession := session.Must(session.NewSession())
+//
// // Create a CloudFormation client from just a session.
// svc := cloudformation.New(mySession)
//
@@ -46,11 +48,11 @@ const (
// svc := cloudformation.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudFormation {
c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
+ return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudFormation {
+func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *CloudFormation {
svc := &CloudFormation{
Client: client.New(
cfg,
@@ -59,6 +61,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
+ PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2010-05-15",
},
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go
index afe8a1b2..183720d4 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go
@@ -188,6 +188,11 @@ func (c *CloudFormation) WaitUntilStackDeleteCompleteWithContext(ctx aws.Context
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "ROLLBACK_FAILED",
},
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "UPDATE_ROLLBACK_IN_PROGRESS",
+ },
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
@@ -196,7 +201,7 @@ func (c *CloudFormation) WaitUntilStackDeleteCompleteWithContext(ctx aws.Context
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
- Expected: "UPDATE_ROLLBACK_IN_PROGRESS",
+ Expected: "UPDATE_ROLLBACK_COMPLETE",
},
},
Logger: c.Config.Logger,
@@ -268,6 +273,148 @@ func (c *CloudFormation) WaitUntilStackExistsWithContext(ctx aws.Context, input
return w.WaitWithContext(ctx)
}
+// WaitUntilStackImportComplete uses the AWS CloudFormation API operation
+// DescribeStacks 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 *CloudFormation) WaitUntilStackImportComplete(input *DescribeStacksInput) error {
+ return c.WaitUntilStackImportCompleteWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilStackImportCompleteWithContext is an extended version of WaitUntilStackImportComplete.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *CloudFormation) WaitUntilStackImportCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilStackImportComplete",
+ MaxAttempts: 120,
+ Delay: request.ConstantWaiterDelay(30 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
+ {
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "IMPORT_COMPLETE",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "ROLLBACK_COMPLETE",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "ROLLBACK_FAILED",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "IMPORT_ROLLBACK_IN_PROGRESS",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "IMPORT_ROLLBACK_FAILED",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "IMPORT_ROLLBACK_COMPLETE",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.ErrorWaiterMatch,
+ Expected: "ValidationError",
+ },
+ },
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeStacksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeStacksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+ w.ApplyOptions(opts...)
+
+ return w.WaitWithContext(ctx)
+}
+
+// WaitUntilStackRollbackComplete uses the AWS CloudFormation API operation
+// DescribeStacks 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 *CloudFormation) WaitUntilStackRollbackComplete(input *DescribeStacksInput) error {
+ return c.WaitUntilStackRollbackCompleteWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilStackRollbackCompleteWithContext is an extended version of WaitUntilStackRollbackComplete.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *CloudFormation) WaitUntilStackRollbackCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilStackRollbackComplete",
+ MaxAttempts: 120,
+ Delay: request.ConstantWaiterDelay(30 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
+ {
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "UPDATE_ROLLBACK_COMPLETE",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "UPDATE_FAILED",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "UPDATE_ROLLBACK_FAILED",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
+ Expected: "DELETE_FAILED",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.ErrorWaiterMatch,
+ Expected: "ValidationError",
+ },
+ },
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeStacksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeStacksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+ w.ApplyOptions(opts...)
+
+ return w.WaitWithContext(ctx)
+}
+
// WaitUntilStackUpdateComplete uses the AWS CloudFormation API operation
// DescribeStacks to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
@@ -333,3 +480,54 @@ func (c *CloudFormation) WaitUntilStackUpdateCompleteWithContext(ctx aws.Context
return w.WaitWithContext(ctx)
}
+
+// WaitUntilTypeRegistrationComplete uses the AWS CloudFormation API operation
+// DescribeTypeRegistration 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 *CloudFormation) WaitUntilTypeRegistrationComplete(input *DescribeTypeRegistrationInput) error {
+ return c.WaitUntilTypeRegistrationCompleteWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilTypeRegistrationCompleteWithContext is an extended version of WaitUntilTypeRegistrationComplete.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *CloudFormation) WaitUntilTypeRegistrationCompleteWithContext(ctx aws.Context, input *DescribeTypeRegistrationInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilTypeRegistrationComplete",
+ MaxAttempts: 120,
+ Delay: request.ConstantWaiterDelay(30 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
+ {
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch, Argument: "ProgressStatus",
+ Expected: "COMPLETE",
+ },
+ {
+ State: request.FailureWaiterState,
+ Matcher: request.PathWaiterMatch, Argument: "ProgressStatus",
+ Expected: "FAILED",
+ },
+ },
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeTypeRegistrationInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeTypeRegistrationRequest(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/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go
index 8c889ff3..f6ca35dc 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go
@@ -5,6 +5,7 @@ package dynamodb
import (
"fmt"
"net/url"
+ "strings"
"time"
"github.com/aws/aws-sdk-go/aws"
@@ -60,26 +61,30 @@ func (c *DynamoDB) BatchGetItemRequest(input *BatchGetItemInput) (req *request.R
output = &BatchGetItemOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -143,8 +148,8 @@ func (c *DynamoDB) BatchGetItemRequest(input *BatchGetItemInput) (req *request.R
// See the AWS API reference guide for Amazon DynamoDB's
// API operation BatchGetItem for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
+// Returned Error Types:
+// * ProvisionedThroughputExceededException
// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
// requests that receive this exception. Your request is eventually successful,
// unless your retry queue is too large to finish. Reduce the frequency of requests
@@ -152,16 +157,16 @@ func (c *DynamoDB) BatchGetItemRequest(input *BatchGetItemInput) (req *request.R
// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
// in the Amazon DynamoDB Developer Guide.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
+// * RequestLimitExceeded
// Throughput exceeds the current throughput limit for your account. Please
// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
// a limit increase.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchGetItem
@@ -229,10 +234,12 @@ func (c *DynamoDB) BatchGetItemPagesWithContext(ctx aws.Context, input *BatchGet
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*BatchGetItemOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*BatchGetItemOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -275,26 +282,30 @@ func (c *DynamoDB) BatchWriteItemRequest(input *BatchWriteItemInput) (req *reque
output = &BatchWriteItemOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -379,8 +390,8 @@ func (c *DynamoDB) BatchWriteItemRequest(input *BatchWriteItemInput) (req *reque
// See the AWS API reference guide for Amazon DynamoDB's
// API operation BatchWriteItem for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
+// Returned Error Types:
+// * ProvisionedThroughputExceededException
// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
// requests that receive this exception. Your request is eventually successful,
// unless your retry queue is too large to finish. Reduce the frequency of requests
@@ -388,20 +399,20 @@ func (c *DynamoDB) BatchWriteItemRequest(input *BatchWriteItemInput) (req *reque
// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
// in the Amazon DynamoDB Developer Guide.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException"
+// * ItemCollectionSizeLimitExceededException
// An item collection is too large. This exception is only returned for tables
// that have one or more local secondary indexes.
//
-// * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
+// * RequestLimitExceeded
// Throughput exceeds the current throughput limit for your account. Please
// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
// a limit increase.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchWriteItem
@@ -465,26 +476,30 @@ func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.R
output = &CreateBackupOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -528,22 +543,22 @@ func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.R
// See the AWS API reference guide for Amazon DynamoDB's
// API operation CreateBackup for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeTableNotFoundException "TableNotFoundException"
+// Returned Error Types:
+// * TableNotFoundException
// A source table with the name TableName does not currently exist within the
// subscriber's account.
//
-// * ErrCodeTableInUseException "TableInUseException"
+// * TableInUseException
// A target table with the specified name is either being created or deleted.
//
-// * ErrCodeContinuousBackupsUnavailableException "ContinuousBackupsUnavailableException"
+// * ContinuousBackupsUnavailableException
// Backups have not yet been enabled for this table.
//
-// * ErrCodeBackupInUseException "BackupInUseException"
+// * BackupInUseException
// There is another ongoing conflicting backup control plane operation on the
// table. The backup is either being created, deleted or restored to a table.
//
-// * ErrCodeLimitExceededException "LimitExceededException"
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -557,7 +572,7 @@ func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.R
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateBackup
@@ -621,26 +636,30 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req
output = &CreateGlobalTableOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -651,6 +670,9 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req
// relationship between two or more DynamoDB tables with the same table name
// in the provided Regions.
//
+// This operation only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html)
+// of global tables.
+//
// If you want to add a new replica table to a global table, each of the following
// conditions must be true:
//
@@ -671,6 +693,14 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req
// * The global secondary indexes must have the same hash key and sort key
// (if present).
//
+// If local secondary indexes are specified, then the following conditions must
+// also be met:
+//
+// * The local secondary indexes must have the same name.
+//
+// * The local secondary indexes must have the same hash key and sort key
+// (if present).
+//
// Write capacity settings should be set consistently across your replica tables
// and secondary indexes. DynamoDB strongly recommends enabling auto scaling
// to manage the write capacity settings for all of your global tables replicas
@@ -688,8 +718,8 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req
// See the AWS API reference guide for Amazon DynamoDB's
// API operation CreateGlobalTable for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeLimitExceededException "LimitExceededException"
+// Returned Error Types:
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -703,13 +733,13 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeGlobalTableAlreadyExistsException "GlobalTableAlreadyExistsException"
+// * GlobalTableAlreadyExistsException
// The specified global table already exists.
//
-// * ErrCodeTableNotFoundException "TableNotFoundException"
+// * TableNotFoundException
// A source table with the name TableName does not currently exist within the
// subscriber's account.
//
@@ -774,26 +804,30 @@ func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Req
output = &CreateTableOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -823,13 +857,13 @@ func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Req
// See the AWS API reference guide for Amazon DynamoDB's
// API operation CreateTable for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeResourceInUseException "ResourceInUseException"
+// Returned Error Types:
+// * ResourceInUseException
// The operation conflicts with the resource's availability. For example, you
// attempted to recreate an existing table, or tried to delete a table currently
// in the CREATING state.
//
-// * ErrCodeLimitExceededException "LimitExceededException"
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -843,7 +877,7 @@ func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Req
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateTable
@@ -907,26 +941,30 @@ func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.R
output = &DeleteBackupOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -944,15 +982,15 @@ func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.R
// See the AWS API reference guide for Amazon DynamoDB's
// API operation DeleteBackup for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeBackupNotFoundException "BackupNotFoundException"
+// Returned Error Types:
+// * BackupNotFoundException
// Backup not found for the given BackupARN.
//
-// * ErrCodeBackupInUseException "BackupInUseException"
+// * BackupInUseException
// There is another ongoing conflicting backup control plane operation on the
// table. The backup is either being created, deleted or restored to a table.
//
-// * ErrCodeLimitExceededException "LimitExceededException"
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -966,7 +1004,7 @@ func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.R
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteBackup
@@ -1030,26 +1068,30 @@ func (c *DynamoDB) DeleteItemRequest(input *DeleteItemInput) (req *request.Reque
output = &DeleteItemOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -1078,11 +1120,11 @@ func (c *DynamoDB) DeleteItemRequest(input *DeleteItemInput) (req *request.Reque
// See the AWS API reference guide for Amazon DynamoDB's
// API operation DeleteItem for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeConditionalCheckFailedException "ConditionalCheckFailedException"
+// Returned Error Types:
+// * ConditionalCheckFailedException
// A condition specified in the operation could not be evaluated.
//
-// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
+// * ProvisionedThroughputExceededException
// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
// requests that receive this exception. Your request is eventually successful,
// unless your retry queue is too large to finish. Reduce the frequency of requests
@@ -1090,23 +1132,23 @@ func (c *DynamoDB) DeleteItemRequest(input *DeleteItemInput) (req *request.Reque
// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
// in the Amazon DynamoDB Developer Guide.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException"
+// * ItemCollectionSizeLimitExceededException
// An item collection is too large. This exception is only returned for tables
// that have one or more local secondary indexes.
//
-// * ErrCodeTransactionConflictException "TransactionConflictException"
+// * TransactionConflictException
// Operation was rejected because there is an ongoing transaction for the item.
//
-// * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
+// * RequestLimitExceeded
// Throughput exceeds the current throughput limit for your account. Please
// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
// a limit increase.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteItem
@@ -1170,26 +1212,30 @@ func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Req
output = &DeleteTableOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -1222,17 +1268,17 @@ func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Req
// See the AWS API reference guide for Amazon DynamoDB's
// API operation DeleteTable for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeResourceInUseException "ResourceInUseException"
+// Returned Error Types:
+// * ResourceInUseException
// The operation conflicts with the resource's availability. For example, you
// attempted to recreate an existing table, or tried to delete a table currently
// in the CREATING state.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeLimitExceededException "LimitExceededException"
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -1246,7 +1292,7 @@ func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Req
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteTable
@@ -1310,26 +1356,30 @@ func (c *DynamoDB) DescribeBackupRequest(input *DescribeBackupInput) (req *reque
output = &DescribeBackupOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -1347,11 +1397,11 @@ func (c *DynamoDB) DescribeBackupRequest(input *DescribeBackupInput) (req *reque
// See the AWS API reference guide for Amazon DynamoDB's
// API operation DescribeBackup for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeBackupNotFoundException "BackupNotFoundException"
+// Returned Error Types:
+// * BackupNotFoundException
// Backup not found for the given BackupARN.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeBackup
@@ -1415,26 +1465,30 @@ func (c *DynamoDB) DescribeContinuousBackupsRequest(input *DescribeContinuousBac
output = &DescribeContinuousBackupsOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -1462,12 +1516,12 @@ func (c *DynamoDB) DescribeContinuousBackupsRequest(input *DescribeContinuousBac
// See the AWS API reference guide for Amazon DynamoDB's
// API operation DescribeContinuousBackups for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeTableNotFoundException "TableNotFoundException"
+// Returned Error Types:
+// * TableNotFoundException
// A source table with the name TableName does not currently exist within the
// subscriber's account.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeContinuousBackups
@@ -1492,6 +1546,90 @@ func (c *DynamoDB) DescribeContinuousBackupsWithContext(ctx aws.Context, input *
return out, req.Send()
}
+const opDescribeContributorInsights = "DescribeContributorInsights"
+
+// DescribeContributorInsightsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeContributorInsights operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeContributorInsights for more information on using the DescribeContributorInsights
+// 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 DescribeContributorInsightsRequest method.
+// req, resp := client.DescribeContributorInsightsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeContributorInsights
+func (c *DynamoDB) DescribeContributorInsightsRequest(input *DescribeContributorInsightsInput) (req *request.Request, output *DescribeContributorInsightsOutput) {
+ op := &request.Operation{
+ Name: opDescribeContributorInsights,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeContributorInsightsInput{}
+ }
+
+ output = &DescribeContributorInsightsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeContributorInsights API operation for Amazon DynamoDB.
+//
+// Returns information about contributor insights, for a given table or global
+// secondary index.
+//
+// Returns awserr.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 DynamoDB's
+// API operation DescribeContributorInsights for usage and error information.
+//
+// Returned Error Types:
+// * ResourceNotFoundException
+// The operation tried to access a nonexistent table or index. The resource
+// might not be specified correctly, or its status might not be ACTIVE.
+//
+// * InternalServerError
+// An error occurred on the server side.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeContributorInsights
+func (c *DynamoDB) DescribeContributorInsights(input *DescribeContributorInsightsInput) (*DescribeContributorInsightsOutput, error) {
+ req, out := c.DescribeContributorInsightsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeContributorInsightsWithContext is the same as DescribeContributorInsights with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeContributorInsights 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 *DynamoDB) DescribeContributorInsightsWithContext(ctx aws.Context, input *DescribeContributorInsightsInput, opts ...request.Option) (*DescribeContributorInsightsOutput, error) {
+ req, out := c.DescribeContributorInsightsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDescribeEndpoints = "DescribeEndpoints"
// DescribeEndpointsRequest generates a "aws/request.Request" representing the
@@ -1572,6 +1710,7 @@ type discovererDescribeEndpoints struct {
EndpointCache *crr.EndpointCache
Params map[string]*string
Key string
+ req *request.Request
}
func (d *discovererDescribeEndpoints) Discover() (crr.Endpoint, error) {
@@ -1591,8 +1730,19 @@ func (d *discovererDescribeEndpoints) Discover() (crr.Endpoint, error) {
continue
}
+ address := *e.Address
+
+ var scheme string
+ if idx := strings.Index(address, "://"); idx != -1 {
+ scheme = address[:idx]
+ }
+
+ if len(scheme) == 0 {
+ address = fmt.Sprintf("%s://%s", d.req.HTTPRequest.URL.Scheme, address)
+ }
+
cachedInMinutes := aws.Int64Value(e.CachePeriodInMinutes)
- u, err := url.Parse(*e.Address)
+ u, err := url.Parse(address)
if err != nil {
continue
}
@@ -1613,6 +1763,7 @@ func (d *discovererDescribeEndpoints) Discover() (crr.Endpoint, error) {
func (d *discovererDescribeEndpoints) Handler(r *request.Request) {
endpointKey := crr.BuildEndpointKey(d.Params)
d.Key = endpointKey
+ d.req = r
endpoint, err := d.EndpointCache.Get(d, endpointKey, d.Required)
if err != nil {
@@ -1664,26 +1815,30 @@ func (c *DynamoDB) DescribeGlobalTableRequest(input *DescribeGlobalTableInput) (
output = &DescribeGlobalTableOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -1692,6 +1847,11 @@ func (c *DynamoDB) DescribeGlobalTableRequest(input *DescribeGlobalTableInput) (
//
// Returns information about the specified global table.
//
+// This operation only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html)
+// of global tables. If you are using global tables Version 2019.11.21 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html)
+// you can use DescribeTable (https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeTable.html)
+// instead.
+//
// Returns awserr.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.
@@ -1699,11 +1859,11 @@ func (c *DynamoDB) DescribeGlobalTableRequest(input *DescribeGlobalTableInput) (
// See the AWS API reference guide for Amazon DynamoDB's
// API operation DescribeGlobalTable for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException"
+// * GlobalTableNotFoundException
// The specified global table does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTable
@@ -1767,26 +1927,30 @@ func (c *DynamoDB) DescribeGlobalTableSettingsRequest(input *DescribeGlobalTable
output = &DescribeGlobalTableSettingsOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -1795,6 +1959,9 @@ func (c *DynamoDB) DescribeGlobalTableSettingsRequest(input *DescribeGlobalTable
//
// Describes Region-specific settings for a global table.
//
+// This operation only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html)
+// of global tables.
+//
// Returns awserr.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.
@@ -1802,11 +1969,11 @@ func (c *DynamoDB) DescribeGlobalTableSettingsRequest(input *DescribeGlobalTable
// See the AWS API reference guide for Amazon DynamoDB's
// API operation DescribeGlobalTableSettings for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException"
+// Returned Error Types:
+// * GlobalTableNotFoundException
// The specified global table does not exist.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings
@@ -1870,26 +2037,30 @@ func (c *DynamoDB) DescribeLimitsRequest(input *DescribeLimitsInput) (req *reque
output = &DescribeLimitsOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -1962,8 +2133,8 @@ func (c *DynamoDB) DescribeLimitsRequest(input *DescribeLimitsInput) (req *reque
// See the AWS API reference guide for Amazon DynamoDB's
// API operation DescribeLimits for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeLimits
@@ -2027,26 +2198,30 @@ func (c *DynamoDB) DescribeTableRequest(input *DescribeTableInput) (req *request
output = &DescribeTableOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -2070,12 +2245,12 @@ func (c *DynamoDB) DescribeTableRequest(input *DescribeTableInput) (req *request
// See the AWS API reference guide for Amazon DynamoDB's
// API operation DescribeTable for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// Returned Error Types:
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTable
@@ -2100,6 +2275,92 @@ func (c *DynamoDB) DescribeTableWithContext(ctx aws.Context, input *DescribeTabl
return out, req.Send()
}
+const opDescribeTableReplicaAutoScaling = "DescribeTableReplicaAutoScaling"
+
+// DescribeTableReplicaAutoScalingRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeTableReplicaAutoScaling operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeTableReplicaAutoScaling for more information on using the DescribeTableReplicaAutoScaling
+// 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 DescribeTableReplicaAutoScalingRequest method.
+// req, resp := client.DescribeTableReplicaAutoScalingRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTableReplicaAutoScaling
+func (c *DynamoDB) DescribeTableReplicaAutoScalingRequest(input *DescribeTableReplicaAutoScalingInput) (req *request.Request, output *DescribeTableReplicaAutoScalingOutput) {
+ op := &request.Operation{
+ Name: opDescribeTableReplicaAutoScaling,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeTableReplicaAutoScalingInput{}
+ }
+
+ output = &DescribeTableReplicaAutoScalingOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeTableReplicaAutoScaling API operation for Amazon DynamoDB.
+//
+// Describes auto scaling settings across replicas of the global table at once.
+//
+// This operation only applies to Version 2019.11.21 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html)
+// of global tables.
+//
+// Returns awserr.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 DynamoDB's
+// API operation DescribeTableReplicaAutoScaling for usage and error information.
+//
+// Returned Error Types:
+// * ResourceNotFoundException
+// The operation tried to access a nonexistent table or index. The resource
+// might not be specified correctly, or its status might not be ACTIVE.
+//
+// * InternalServerError
+// An error occurred on the server side.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTableReplicaAutoScaling
+func (c *DynamoDB) DescribeTableReplicaAutoScaling(input *DescribeTableReplicaAutoScalingInput) (*DescribeTableReplicaAutoScalingOutput, error) {
+ req, out := c.DescribeTableReplicaAutoScalingRequest(input)
+ return out, req.Send()
+}
+
+// DescribeTableReplicaAutoScalingWithContext is the same as DescribeTableReplicaAutoScaling with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeTableReplicaAutoScaling 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 *DynamoDB) DescribeTableReplicaAutoScalingWithContext(ctx aws.Context, input *DescribeTableReplicaAutoScalingInput, opts ...request.Option) (*DescribeTableReplicaAutoScalingOutput, error) {
+ req, out := c.DescribeTableReplicaAutoScalingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDescribeTimeToLive = "DescribeTimeToLive"
// DescribeTimeToLiveRequest generates a "aws/request.Request" representing the
@@ -2139,26 +2400,30 @@ func (c *DynamoDB) DescribeTimeToLiveRequest(input *DescribeTimeToLiveInput) (re
output = &DescribeTimeToLiveOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -2174,12 +2439,12 @@ func (c *DynamoDB) DescribeTimeToLiveRequest(input *DescribeTimeToLiveInput) (re
// See the AWS API reference guide for Amazon DynamoDB's
// API operation DescribeTimeToLive for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// Returned Error Types:
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTimeToLive
@@ -2243,26 +2508,30 @@ func (c *DynamoDB) GetItemRequest(input *GetItemInput) (req *request.Request, ou
output = &GetItemOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -2285,8 +2554,8 @@ func (c *DynamoDB) GetItemRequest(input *GetItemInput) (req *request.Request, ou
// See the AWS API reference guide for Amazon DynamoDB's
// API operation GetItem for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
+// Returned Error Types:
+// * ProvisionedThroughputExceededException
// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
// requests that receive this exception. Your request is eventually successful,
// unless your retry queue is too large to finish. Reduce the frequency of requests
@@ -2294,16 +2563,16 @@ func (c *DynamoDB) GetItemRequest(input *GetItemInput) (req *request.Request, ou
// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
// in the Amazon DynamoDB Developer Guide.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
+// * RequestLimitExceeded
// Throughput exceeds the current throughput limit for your account. Please
// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
// a limit increase.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/GetItem
@@ -2367,26 +2636,30 @@ func (c *DynamoDB) ListBackupsRequest(input *ListBackupsInput) (req *request.Req
output = &ListBackupsOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -2410,8 +2683,8 @@ func (c *DynamoDB) ListBackupsRequest(input *ListBackupsInput) (req *request.Req
// See the AWS API reference guide for Amazon DynamoDB's
// API operation ListBackups for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListBackups
@@ -2436,108 +2709,257 @@ func (c *DynamoDB) ListBackupsWithContext(ctx aws.Context, input *ListBackupsInp
return out, req.Send()
}
-const opListGlobalTables = "ListGlobalTables"
+const opListContributorInsights = "ListContributorInsights"
-// ListGlobalTablesRequest generates a "aws/request.Request" representing the
-// client's request for the ListGlobalTables operation. The "output" return
+// ListContributorInsightsRequest generates a "aws/request.Request" representing the
+// client's request for the ListContributorInsights operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See ListGlobalTables for more information on using the ListGlobalTables
+// See ListContributorInsights for more information on using the ListContributorInsights
// 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 ListGlobalTablesRequest method.
-// req, resp := client.ListGlobalTablesRequest(params)
+// // Example sending a request using the ListContributorInsightsRequest method.
+// req, resp := client.ListContributorInsightsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListGlobalTables
-func (c *DynamoDB) ListGlobalTablesRequest(input *ListGlobalTablesInput) (req *request.Request, output *ListGlobalTablesOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListContributorInsights
+func (c *DynamoDB) ListContributorInsightsRequest(input *ListContributorInsightsInput) (req *request.Request, output *ListContributorInsightsOutput) {
op := &request.Operation{
- Name: opListGlobalTables,
+ Name: opListContributorInsights,
HTTPMethod: "POST",
HTTPPath: "/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
}
if input == nil {
- input = &ListGlobalTablesInput{}
+ input = &ListContributorInsightsInput{}
}
- output = &ListGlobalTablesOutput{}
+ output = &ListContributorInsightsOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
-
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
- }
- }
-
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
- }
return
}
-// ListGlobalTables API operation for Amazon DynamoDB.
+// ListContributorInsights API operation for Amazon DynamoDB.
//
-// Lists all global tables that have a replica in the specified Region.
+// Returns a list of ContributorInsightsSummary for a table and all its global
+// secondary indexes.
//
// Returns awserr.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 DynamoDB's
-// API operation ListGlobalTables for usage and error information.
+// API operation ListContributorInsights for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * ResourceNotFoundException
+// The operation tried to access a nonexistent table or index. The resource
+// might not be specified correctly, or its status might not be ACTIVE.
+//
+// * InternalServerError
// An error occurred on the server side.
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListGlobalTables
-func (c *DynamoDB) ListGlobalTables(input *ListGlobalTablesInput) (*ListGlobalTablesOutput, error) {
- req, out := c.ListGlobalTablesRequest(input)
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListContributorInsights
+func (c *DynamoDB) ListContributorInsights(input *ListContributorInsightsInput) (*ListContributorInsightsOutput, error) {
+ req, out := c.ListContributorInsightsRequest(input)
return out, req.Send()
}
-// ListGlobalTablesWithContext is the same as ListGlobalTables with the addition of
+// ListContributorInsightsWithContext is the same as ListContributorInsights with the addition of
// the ability to pass a context and additional request options.
//
-// See ListGlobalTables for details on how to use this API operation.
+// See ListContributorInsights 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 *DynamoDB) ListGlobalTablesWithContext(ctx aws.Context, input *ListGlobalTablesInput, opts ...request.Option) (*ListGlobalTablesOutput, error) {
- req, out := c.ListGlobalTablesRequest(input)
+func (c *DynamoDB) ListContributorInsightsWithContext(ctx aws.Context, input *ListContributorInsightsInput, opts ...request.Option) (*ListContributorInsightsOutput, error) {
+ req, out := c.ListContributorInsightsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
-const opListTables = "ListTables"
-
+// ListContributorInsightsPages iterates over the pages of a ListContributorInsights operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See ListContributorInsights 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 ListContributorInsights operation.
+// pageNum := 0
+// err := client.ListContributorInsightsPages(params,
+// func(page *dynamodb.ListContributorInsightsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *DynamoDB) ListContributorInsightsPages(input *ListContributorInsightsInput, fn func(*ListContributorInsightsOutput, bool) bool) error {
+ return c.ListContributorInsightsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListContributorInsightsPagesWithContext same as ListContributorInsightsPages 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 *DynamoDB) ListContributorInsightsPagesWithContext(ctx aws.Context, input *ListContributorInsightsInput, fn func(*ListContributorInsightsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListContributorInsightsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListContributorInsightsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*ListContributorInsightsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
+const opListGlobalTables = "ListGlobalTables"
+
+// ListGlobalTablesRequest generates a "aws/request.Request" representing the
+// client's request for the ListGlobalTables operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ListGlobalTables for more information on using the ListGlobalTables
+// 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 ListGlobalTablesRequest method.
+// req, resp := client.ListGlobalTablesRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListGlobalTables
+func (c *DynamoDB) ListGlobalTablesRequest(input *ListGlobalTablesInput) (req *request.Request, output *ListGlobalTablesOutput) {
+ op := &request.Operation{
+ Name: opListGlobalTables,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ListGlobalTablesInput{}
+ }
+
+ output = &ListGlobalTablesOutput{}
+ req = c.newRequest(op, input, output)
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
+
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
+ }
+
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
+ }
+ return
+}
+
+// ListGlobalTables API operation for Amazon DynamoDB.
+//
+// Lists all global tables that have a replica in the specified Region.
+//
+// This operation only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html)
+// of global tables.
+//
+// Returns awserr.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 DynamoDB's
+// API operation ListGlobalTables for usage and error information.
+//
+// Returned Error Types:
+// * InternalServerError
+// An error occurred on the server side.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListGlobalTables
+func (c *DynamoDB) ListGlobalTables(input *ListGlobalTablesInput) (*ListGlobalTablesOutput, error) {
+ req, out := c.ListGlobalTablesRequest(input)
+ return out, req.Send()
+}
+
+// ListGlobalTablesWithContext is the same as ListGlobalTables with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListGlobalTables 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 *DynamoDB) ListGlobalTablesWithContext(ctx aws.Context, input *ListGlobalTablesInput, opts ...request.Option) (*ListGlobalTablesOutput, error) {
+ req, out := c.ListGlobalTablesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opListTables = "ListTables"
+
// ListTablesRequest generates a "aws/request.Request" representing the
// client's request for the ListTables operation. The "output" return
// value will be populated with the request's response once the request completes
@@ -2581,26 +3003,30 @@ func (c *DynamoDB) ListTablesRequest(input *ListTablesInput) (req *request.Reque
output = &ListTablesOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -2618,8 +3044,8 @@ func (c *DynamoDB) ListTablesRequest(input *ListTablesInput) (req *request.Reque
// See the AWS API reference guide for Amazon DynamoDB's
// API operation ListTables for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTables
@@ -2687,10 +3113,12 @@ func (c *DynamoDB) ListTablesPagesWithContext(ctx aws.Context, input *ListTables
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListTablesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListTablesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -2733,26 +3161,30 @@ func (c *DynamoDB) ListTagsOfResourceRequest(input *ListTagsOfResourceInput) (re
output = &ListTagsOfResourceOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -2772,12 +3204,12 @@ func (c *DynamoDB) ListTagsOfResourceRequest(input *ListTagsOfResourceInput) (re
// See the AWS API reference guide for Amazon DynamoDB's
// API operation ListTagsOfResource for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// Returned Error Types:
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTagsOfResource
@@ -2841,26 +3273,30 @@ func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, ou
output = &PutItemOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -2899,9 +3335,15 @@ func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, ou
// * PutItem in the AWS SDK for Ruby V2 (http://docs.aws.amazon.com/goto/SdkForRubyV2/dynamodb-2012-08-10/PutItem)
//
// When you add an item, the primary key attributes are the only required attributes.
-// Attribute values cannot be null. String and Binary type attributes must have
-// lengths greater than zero. Set type attributes cannot be empty. Requests
-// with empty values will be rejected with a ValidationException exception.
+// Attribute values cannot be null.
+//
+// Empty String and Binary attribute values are allowed. Attribute values of
+// type String and Binary must have a length greater than zero if the attribute
+// is used as a key attribute for a table or index. Set type attributes cannot
+// be empty.
+//
+// Invalid Requests with empty values will be rejected with a ValidationException
+// exception.
//
// To prevent a new item from replacing an existing item, use a conditional
// expression that contains the attribute_not_exists function with the name
@@ -2919,11 +3361,11 @@ func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, ou
// See the AWS API reference guide for Amazon DynamoDB's
// API operation PutItem for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeConditionalCheckFailedException "ConditionalCheckFailedException"
+// Returned Error Types:
+// * ConditionalCheckFailedException
// A condition specified in the operation could not be evaluated.
//
-// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
+// * ProvisionedThroughputExceededException
// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
// requests that receive this exception. Your request is eventually successful,
// unless your retry queue is too large to finish. Reduce the frequency of requests
@@ -2931,23 +3373,23 @@ func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, ou
// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
// in the Amazon DynamoDB Developer Guide.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException"
+// * ItemCollectionSizeLimitExceededException
// An item collection is too large. This exception is only returned for tables
// that have one or more local secondary indexes.
//
-// * ErrCodeTransactionConflictException "TransactionConflictException"
+// * TransactionConflictException
// Operation was rejected because there is an ongoing transaction for the item.
//
-// * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
+// * RequestLimitExceeded
// Throughput exceeds the current throughput limit for your account. Please
// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
// a limit increase.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/PutItem
@@ -3017,26 +3459,30 @@ func (c *DynamoDB) QueryRequest(input *QueryInput) (req *request.Request, output
output = &QueryOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -3099,8 +3545,8 @@ func (c *DynamoDB) QueryRequest(input *QueryInput) (req *request.Request, output
// See the AWS API reference guide for Amazon DynamoDB's
// API operation Query for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
+// Returned Error Types:
+// * ProvisionedThroughputExceededException
// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
// requests that receive this exception. Your request is eventually successful,
// unless your retry queue is too large to finish. Reduce the frequency of requests
@@ -3108,16 +3554,16 @@ func (c *DynamoDB) QueryRequest(input *QueryInput) (req *request.Request, output
// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
// in the Amazon DynamoDB Developer Guide.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
+// * RequestLimitExceeded
// Throughput exceeds the current throughput limit for your account. Please
// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
// a limit increase.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Query
@@ -3185,10 +3631,12 @@ func (c *DynamoDB) QueryPagesWithContext(ctx aws.Context, input *QueryInput, fn
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*QueryOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*QueryOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -3231,26 +3679,30 @@ func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupIn
output = &RestoreTableFromBackupOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -3283,21 +3735,21 @@ func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupIn
// See the AWS API reference guide for Amazon DynamoDB's
// API operation RestoreTableFromBackup for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeTableAlreadyExistsException "TableAlreadyExistsException"
+// Returned Error Types:
+// * TableAlreadyExistsException
// A target table with the specified name already exists.
//
-// * ErrCodeTableInUseException "TableInUseException"
+// * TableInUseException
// A target table with the specified name is either being created or deleted.
//
-// * ErrCodeBackupNotFoundException "BackupNotFoundException"
+// * BackupNotFoundException
// Backup not found for the given BackupARN.
//
-// * ErrCodeBackupInUseException "BackupInUseException"
+// * BackupInUseException
// There is another ongoing conflicting backup control plane operation on the
// table. The backup is either being created, deleted or restored to a table.
//
-// * ErrCodeLimitExceededException "LimitExceededException"
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -3311,7 +3763,7 @@ func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupIn
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableFromBackup
@@ -3375,26 +3827,30 @@ func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointIn
output = &RestoreTableToPointInTimeOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -3445,18 +3901,18 @@ func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointIn
// See the AWS API reference guide for Amazon DynamoDB's
// API operation RestoreTableToPointInTime for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeTableAlreadyExistsException "TableAlreadyExistsException"
+// Returned Error Types:
+// * TableAlreadyExistsException
// A target table with the specified name already exists.
//
-// * ErrCodeTableNotFoundException "TableNotFoundException"
+// * TableNotFoundException
// A source table with the name TableName does not currently exist within the
// subscriber's account.
//
-// * ErrCodeTableInUseException "TableInUseException"
+// * TableInUseException
// A target table with the specified name is either being created or deleted.
//
-// * ErrCodeLimitExceededException "LimitExceededException"
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -3470,14 +3926,14 @@ func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointIn
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeInvalidRestoreTimeException "InvalidRestoreTimeException"
+// * InvalidRestoreTimeException
// An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime
// and LatestRestorableDateTime.
//
-// * ErrCodePointInTimeRecoveryUnavailableException "PointInTimeRecoveryUnavailableException"
+// * PointInTimeRecoveryUnavailableException
// Point in time recovery has not yet been enabled for this source table.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableToPointInTime
@@ -3547,26 +4003,30 @@ func (c *DynamoDB) ScanRequest(input *ScanInput) (req *request.Request, output *
output = &ScanOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -3609,8 +4069,8 @@ func (c *DynamoDB) ScanRequest(input *ScanInput) (req *request.Request, output *
// See the AWS API reference guide for Amazon DynamoDB's
// API operation Scan for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
+// Returned Error Types:
+// * ProvisionedThroughputExceededException
// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
// requests that receive this exception. Your request is eventually successful,
// unless your retry queue is too large to finish. Reduce the frequency of requests
@@ -3618,16 +4078,16 @@ func (c *DynamoDB) ScanRequest(input *ScanInput) (req *request.Request, output *
// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
// in the Amazon DynamoDB Developer Guide.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
+// * RequestLimitExceeded
// Throughput exceeds the current throughput limit for your account. Please
// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
// a limit increase.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Scan
@@ -3695,10 +4155,12 @@ func (c *DynamoDB) ScanPagesWithContext(ctx aws.Context, input *ScanInput, fn fu
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ScanOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ScanOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -3742,26 +4204,30 @@ func (c *DynamoDB) TagResourceRequest(input *TagResourceInput) (req *request.Req
output = &TagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -3783,8 +4249,8 @@ func (c *DynamoDB) TagResourceRequest(input *TagResourceInput) (req *request.Req
// See the AWS API reference guide for Amazon DynamoDB's
// API operation TagResource for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeLimitExceededException "LimitExceededException"
+// Returned Error Types:
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -3798,14 +4264,14 @@ func (c *DynamoDB) TagResourceRequest(input *TagResourceInput) (req *request.Req
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeResourceInUseException "ResourceInUseException"
+// * ResourceInUseException
// The operation conflicts with the resource's availability. For example, you
// attempted to recreate an existing table, or tried to delete a table currently
// in the CREATING state.
@@ -3871,26 +4337,30 @@ func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *r
output = &TransactGetItemsOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -3905,16 +4375,6 @@ func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *r
// cannot retrieve items from tables in more than one AWS account or Region.
// The aggregate size of the items in the transaction cannot exceed 4 MB.
//
-// All AWS Regions and AWS GovCloud (US) support up to 25 items per transaction
-// with up to 4 MB of data, except the following AWS Regions:
-//
-// * China (Beijing)
-//
-// * China (Ningxia)
-//
-// The China (Beijing) and China (Ningxia) Regions support up to 10 items per
-// transaction with up to 4 MB of data.
-//
// DynamoDB rejects the entire TransactGetItems request if any of the following
// is true:
//
@@ -3935,12 +4395,12 @@ func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *r
// See the AWS API reference guide for Amazon DynamoDB's
// API operation TransactGetItems for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// Returned Error Types:
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeTransactionCanceledException "TransactionCanceledException"
+// * TransactionCanceledException
// The entire transaction request was canceled.
//
// DynamoDB cancels a TransactWriteItems request under the following circumstances:
@@ -3960,8 +4420,6 @@ func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *r
// index (LSI) becomes too large, or a similar validation error occurs because
// of changes made by the transaction.
//
-// * The aggregate size of the items in the transaction exceeds 4 MBs.
-//
// * There is a user error, such as an invalid data format.
//
// DynamoDB cancels a TransactGetItems request under the following circumstances:
@@ -3976,8 +4434,6 @@ func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *r
// * There is insufficient provisioned capacity for the transaction to be
// completed.
//
-// * The aggregate size of the items in the transaction exceeds 4 MBs.
-//
// * There is a user error, such as an invalid data format.
//
// If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons
@@ -4031,7 +4487,7 @@ func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *r
// The provided expression refers to an attribute that does not exist in
// the item.
//
-// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
+// * ProvisionedThroughputExceededException
// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
// requests that receive this exception. Your request is eventually successful,
// unless your retry queue is too large to finish. Reduce the frequency of requests
@@ -4039,7 +4495,12 @@ func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *r
// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
// in the Amazon DynamoDB Developer Guide.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * RequestLimitExceeded
+// Throughput exceeds the current throughput limit for your account. Please
+// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
+// a limit increase.
+//
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactGetItems
@@ -4103,26 +4564,30 @@ func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (re
output = &TransactWriteItemsOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -4136,16 +4601,6 @@ func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (re
// item. The aggregate size of the items in the transaction cannot exceed 4
// MB.
//
-// All AWS Regions and AWS GovCloud (US) support up to 25 items per transaction
-// with up to 4 MB of data, except the following AWS Regions:
-//
-// * China (Beijing)
-//
-// * China (Ningxia)
-//
-// The China (Beijing) and China (Ningxia) Regions support up to 10 items per
-// transaction with up to 4 MB of data.
-//
// The actions are completed atomically so that either all of them succeed,
// or all of them fail. They are defined by the following objects:
//
@@ -4201,12 +4656,12 @@ func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (re
// See the AWS API reference guide for Amazon DynamoDB's
// API operation TransactWriteItems for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// Returned Error Types:
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeTransactionCanceledException "TransactionCanceledException"
+// * TransactionCanceledException
// The entire transaction request was canceled.
//
// DynamoDB cancels a TransactWriteItems request under the following circumstances:
@@ -4226,8 +4681,6 @@ func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (re
// index (LSI) becomes too large, or a similar validation error occurs because
// of changes made by the transaction.
//
-// * The aggregate size of the items in the transaction exceeds 4 MBs.
-//
// * There is a user error, such as an invalid data format.
//
// DynamoDB cancels a TransactGetItems request under the following circumstances:
@@ -4242,8 +4695,6 @@ func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (re
// * There is insufficient provisioned capacity for the transaction to be
// completed.
//
-// * The aggregate size of the items in the transaction exceeds 4 MBs.
-//
// * There is a user error, such as an invalid data format.
//
// If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons
@@ -4297,14 +4748,14 @@ func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (re
// The provided expression refers to an attribute that does not exist in
// the item.
//
-// * ErrCodeTransactionInProgressException "TransactionInProgressException"
+// * TransactionInProgressException
// The transaction with the given request token is already in progress.
//
-// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
+// * IdempotentParameterMismatchException
// DynamoDB rejected the request because you retried a request with a different
// payload but with an idempotent token that was already used.
//
-// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
+// * ProvisionedThroughputExceededException
// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
// requests that receive this exception. Your request is eventually successful,
// unless your retry queue is too large to finish. Reduce the frequency of requests
@@ -4312,7 +4763,12 @@ func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (re
// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
// in the Amazon DynamoDB Developer Guide.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * RequestLimitExceeded
+// Throughput exceeds the current throughput limit for your account. Please
+// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
+// a limit increase.
+//
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactWriteItems
@@ -4377,26 +4833,30 @@ func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request
output = &UntagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -4416,8 +4876,8 @@ func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request
// See the AWS API reference guide for Amazon DynamoDB's
// API operation UntagResource for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeLimitExceededException "LimitExceededException"
+// Returned Error Types:
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -4431,14 +4891,14 @@ func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeResourceInUseException "ResourceInUseException"
+// * ResourceInUseException
// The operation conflicts with the resource's availability. For example, you
// attempted to recreate an existing table, or tried to delete a table currently
// in the CREATING state.
@@ -4504,26 +4964,30 @@ func (c *DynamoDB) UpdateContinuousBackupsRequest(input *UpdateContinuousBackups
output = &UpdateContinuousBackupsOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -4549,15 +5013,15 @@ func (c *DynamoDB) UpdateContinuousBackupsRequest(input *UpdateContinuousBackups
// See the AWS API reference guide for Amazon DynamoDB's
// API operation UpdateContinuousBackups for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeTableNotFoundException "TableNotFoundException"
+// Returned Error Types:
+// * TableNotFoundException
// A source table with the name TableName does not currently exist within the
// subscriber's account.
//
-// * ErrCodeContinuousBackupsUnavailableException "ContinuousBackupsUnavailableException"
+// * ContinuousBackupsUnavailableException
// Backups have not yet been enabled for this table.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContinuousBackups
@@ -4582,113 +5046,200 @@ func (c *DynamoDB) UpdateContinuousBackupsWithContext(ctx aws.Context, input *Up
return out, req.Send()
}
-const opUpdateGlobalTable = "UpdateGlobalTable"
+const opUpdateContributorInsights = "UpdateContributorInsights"
-// UpdateGlobalTableRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateGlobalTable operation. The "output" return
+// UpdateContributorInsightsRequest generates a "aws/request.Request" representing the
+// client's request for the UpdateContributorInsights operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
-// See UpdateGlobalTable for more information on using the UpdateGlobalTable
+// See UpdateContributorInsights for more information on using the UpdateContributorInsights
// 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 UpdateGlobalTableRequest method.
-// req, resp := client.UpdateGlobalTableRequest(params)
+// // Example sending a request using the UpdateContributorInsightsRequest method.
+// req, resp := client.UpdateContributorInsightsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTable
-func (c *DynamoDB) UpdateGlobalTableRequest(input *UpdateGlobalTableInput) (req *request.Request, output *UpdateGlobalTableOutput) {
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContributorInsights
+func (c *DynamoDB) UpdateContributorInsightsRequest(input *UpdateContributorInsightsInput) (req *request.Request, output *UpdateContributorInsightsOutput) {
op := &request.Operation{
- Name: opUpdateGlobalTable,
+ Name: opUpdateContributorInsights,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
- input = &UpdateGlobalTableInput{}
+ input = &UpdateContributorInsightsInput{}
}
- output = &UpdateGlobalTableOutput{}
+ output = &UpdateContributorInsightsOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
-
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
- }
- }
-
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
- }
return
}
-// UpdateGlobalTable API operation for Amazon DynamoDB.
-//
-// Adds or removes replicas in the specified global table. The global table
-// must already exist to be able to use this operation. Any replica to be added
-// must be empty, have the same name as the global table, have the same key
-// schema, have DynamoDB Streams enabled, and have the same provisioned and
-// maximum write capacity units.
-//
-// Although you can use UpdateGlobalTable to add replicas and remove replicas
-// in a single request, for simplicity we recommend that you issue separate
-// requests for adding or removing replicas.
-//
-// If global secondary indexes are specified, then the following conditions
-// must also be met:
-//
-// * The global secondary indexes must have the same name.
-//
-// * The global secondary indexes must have the same hash key and sort key
-// (if present).
+// UpdateContributorInsights API operation for Amazon DynamoDB.
//
-// * The global secondary indexes must have the same provisioned and maximum
-// write capacity units.
+// Updates the status for contributor insights for a specific table or index.
//
// Returns awserr.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 DynamoDB's
-// API operation UpdateGlobalTable for usage and error information.
+// API operation UpdateContributorInsights for usage and error information.
+//
+// Returned Error Types:
+// * ResourceNotFoundException
+// The operation tried to access a nonexistent table or index. The resource
+// might not be specified correctly, or its status might not be ACTIVE.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException"
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContributorInsights
+func (c *DynamoDB) UpdateContributorInsights(input *UpdateContributorInsightsInput) (*UpdateContributorInsightsOutput, error) {
+ req, out := c.UpdateContributorInsightsRequest(input)
+ return out, req.Send()
+}
+
+// UpdateContributorInsightsWithContext is the same as UpdateContributorInsights with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UpdateContributorInsights 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 *DynamoDB) UpdateContributorInsightsWithContext(ctx aws.Context, input *UpdateContributorInsightsInput, opts ...request.Option) (*UpdateContributorInsightsOutput, error) {
+ req, out := c.UpdateContributorInsightsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opUpdateGlobalTable = "UpdateGlobalTable"
+
+// UpdateGlobalTableRequest generates a "aws/request.Request" representing the
+// client's request for the UpdateGlobalTable operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See UpdateGlobalTable for more information on using the UpdateGlobalTable
+// 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 UpdateGlobalTableRequest method.
+// req, resp := client.UpdateGlobalTableRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTable
+func (c *DynamoDB) UpdateGlobalTableRequest(input *UpdateGlobalTableInput) (req *request.Request, output *UpdateGlobalTableOutput) {
+ op := &request.Operation{
+ Name: opUpdateGlobalTable,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &UpdateGlobalTableInput{}
+ }
+
+ output = &UpdateGlobalTableOutput{}
+ req = c.newRequest(op, input, output)
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
+
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
+ }
+
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
+ }
+ return
+}
+
+// UpdateGlobalTable API operation for Amazon DynamoDB.
+//
+// Adds or removes replicas in the specified global table. The global table
+// must already exist to be able to use this operation. Any replica to be added
+// must be empty, have the same name as the global table, have the same key
+// schema, have DynamoDB Streams enabled, and have the same provisioned and
+// maximum write capacity units.
+//
+// Although you can use UpdateGlobalTable to add replicas and remove replicas
+// in a single request, for simplicity we recommend that you issue separate
+// requests for adding or removing replicas.
+//
+// If global secondary indexes are specified, then the following conditions
+// must also be met:
+//
+// * The global secondary indexes must have the same name.
+//
+// * The global secondary indexes must have the same hash key and sort key
+// (if present).
+//
+// * The global secondary indexes must have the same provisioned and maximum
+// write capacity units.
+//
+// Returns awserr.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 DynamoDB's
+// API operation UpdateGlobalTable for usage and error information.
+//
+// Returned Error Types:
+// * InternalServerError
+// An error occurred on the server side.
+//
+// * GlobalTableNotFoundException
// The specified global table does not exist.
//
-// * ErrCodeReplicaAlreadyExistsException "ReplicaAlreadyExistsException"
+// * ReplicaAlreadyExistsException
// The specified replica is already part of the global table.
//
-// * ErrCodeReplicaNotFoundException "ReplicaNotFoundException"
+// * ReplicaNotFoundException
// The specified replica is no longer part of the global table.
//
-// * ErrCodeTableNotFoundException "TableNotFoundException"
+// * TableNotFoundException
// A source table with the name TableName does not currently exist within the
// subscriber's account.
//
@@ -4753,26 +5304,30 @@ func (c *DynamoDB) UpdateGlobalTableSettingsRequest(input *UpdateGlobalTableSett
output = &UpdateGlobalTableSettingsOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -4788,17 +5343,17 @@ func (c *DynamoDB) UpdateGlobalTableSettingsRequest(input *UpdateGlobalTableSett
// See the AWS API reference guide for Amazon DynamoDB's
// API operation UpdateGlobalTableSettings for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException"
+// Returned Error Types:
+// * GlobalTableNotFoundException
// The specified global table does not exist.
//
-// * ErrCodeReplicaNotFoundException "ReplicaNotFoundException"
+// * ReplicaNotFoundException
// The specified replica is no longer part of the global table.
//
-// * ErrCodeIndexNotFoundException "IndexNotFoundException"
+// * IndexNotFoundException
// The operation tried to access a nonexistent index.
//
-// * ErrCodeLimitExceededException "LimitExceededException"
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -4812,12 +5367,12 @@ func (c *DynamoDB) UpdateGlobalTableSettingsRequest(input *UpdateGlobalTableSett
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeResourceInUseException "ResourceInUseException"
+// * ResourceInUseException
// The operation conflicts with the resource's availability. For example, you
// attempted to recreate an existing table, or tried to delete a table currently
// in the CREATING state.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings
@@ -4881,26 +5436,30 @@ func (c *DynamoDB) UpdateItemRequest(input *UpdateItemInput) (req *request.Reque
output = &UpdateItemOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -4923,11 +5482,11 @@ func (c *DynamoDB) UpdateItemRequest(input *UpdateItemInput) (req *request.Reque
// See the AWS API reference guide for Amazon DynamoDB's
// API operation UpdateItem for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeConditionalCheckFailedException "ConditionalCheckFailedException"
+// Returned Error Types:
+// * ConditionalCheckFailedException
// A condition specified in the operation could not be evaluated.
//
-// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
+// * ProvisionedThroughputExceededException
// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
// requests that receive this exception. Your request is eventually successful,
// unless your retry queue is too large to finish. Reduce the frequency of requests
@@ -4935,23 +5494,23 @@ func (c *DynamoDB) UpdateItemRequest(input *UpdateItemInput) (req *request.Reque
// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
// in the Amazon DynamoDB Developer Guide.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException"
+// * ItemCollectionSizeLimitExceededException
// An item collection is too large. This exception is only returned for tables
// that have one or more local secondary indexes.
//
-// * ErrCodeTransactionConflictException "TransactionConflictException"
+// * TransactionConflictException
// Operation was rejected because there is an ongoing transaction for the item.
//
-// * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
+// * RequestLimitExceeded
// Throughput exceeds the current throughput limit for your account. Please
// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
// a limit increase.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateItem
@@ -5015,26 +5574,30 @@ func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Req
output = &UpdateTableOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -5067,17 +5630,17 @@ func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Req
// See the AWS API reference guide for Amazon DynamoDB's
// API operation UpdateTable for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeResourceInUseException "ResourceInUseException"
+// Returned Error Types:
+// * ResourceInUseException
// The operation conflicts with the resource's availability. For example, you
// attempted to recreate an existing table, or tried to delete a table currently
// in the CREATING state.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeLimitExceededException "LimitExceededException"
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -5091,7 +5654,7 @@ func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Req
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTable
@@ -5116,6 +5679,111 @@ func (c *DynamoDB) UpdateTableWithContext(ctx aws.Context, input *UpdateTableInp
return out, req.Send()
}
+const opUpdateTableReplicaAutoScaling = "UpdateTableReplicaAutoScaling"
+
+// UpdateTableReplicaAutoScalingRequest generates a "aws/request.Request" representing the
+// client's request for the UpdateTableReplicaAutoScaling operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See UpdateTableReplicaAutoScaling for more information on using the UpdateTableReplicaAutoScaling
+// 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 UpdateTableReplicaAutoScalingRequest method.
+// req, resp := client.UpdateTableReplicaAutoScalingRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTableReplicaAutoScaling
+func (c *DynamoDB) UpdateTableReplicaAutoScalingRequest(input *UpdateTableReplicaAutoScalingInput) (req *request.Request, output *UpdateTableReplicaAutoScalingOutput) {
+ op := &request.Operation{
+ Name: opUpdateTableReplicaAutoScaling,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &UpdateTableReplicaAutoScalingInput{}
+ }
+
+ output = &UpdateTableReplicaAutoScalingOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// UpdateTableReplicaAutoScaling API operation for Amazon DynamoDB.
+//
+// Updates auto scaling settings on your global tables at once.
+//
+// This operation only applies to Version 2019.11.21 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html)
+// of global tables.
+//
+// Returns awserr.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 DynamoDB's
+// API operation UpdateTableReplicaAutoScaling for usage and error information.
+//
+// Returned Error Types:
+// * ResourceNotFoundException
+// The operation tried to access a nonexistent table or index. The resource
+// might not be specified correctly, or its status might not be ACTIVE.
+//
+// * ResourceInUseException
+// The operation conflicts with the resource's availability. For example, you
+// attempted to recreate an existing table, or tried to delete a table currently
+// in the CREATING state.
+//
+// * LimitExceededException
+// There is no limit to the number of daily on-demand backups that can be taken.
+//
+// Up to 50 simultaneous table operations are allowed per account. These operations
+// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
+// and RestoreTableToPointInTime.
+//
+// The only exception is when you are creating a table with one or more secondary
+// indexes. You can have up to 25 such requests running at a time; however,
+// if the table or index specifications are complex, DynamoDB might temporarily
+// reduce the number of concurrent operations.
+//
+// There is a soft account limit of 256 tables.
+//
+// * InternalServerError
+// An error occurred on the server side.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTableReplicaAutoScaling
+func (c *DynamoDB) UpdateTableReplicaAutoScaling(input *UpdateTableReplicaAutoScalingInput) (*UpdateTableReplicaAutoScalingOutput, error) {
+ req, out := c.UpdateTableReplicaAutoScalingRequest(input)
+ return out, req.Send()
+}
+
+// UpdateTableReplicaAutoScalingWithContext is the same as UpdateTableReplicaAutoScaling with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UpdateTableReplicaAutoScaling 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 *DynamoDB) UpdateTableReplicaAutoScalingWithContext(ctx aws.Context, input *UpdateTableReplicaAutoScalingInput, opts ...request.Option) (*UpdateTableReplicaAutoScalingOutput, error) {
+ req, out := c.UpdateTableReplicaAutoScalingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opUpdateTimeToLive = "UpdateTimeToLive"
// UpdateTimeToLiveRequest generates a "aws/request.Request" representing the
@@ -5155,26 +5823,30 @@ func (c *DynamoDB) UpdateTimeToLiveRequest(input *UpdateTimeToLiveInput) (req *r
output = &UpdateTimeToLiveOutput{}
req = c.newRequest(op, input, output)
- if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
- de := discovererDescribeEndpoints{
- Required: false,
- EndpointCache: c.endpointCache,
- Params: map[string]*string{
- "op": aws.String(req.Operation.Name),
- },
- Client: c,
- }
+ // if custom endpoint for the request is set to a non empty string,
+ // we skip the endpoint discovery workflow.
+ if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
+ if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
+ de := discovererDescribeEndpoints{
+ Required: false,
+ EndpointCache: c.endpointCache,
+ Params: map[string]*string{
+ "op": aws.String(req.Operation.Name),
+ },
+ Client: c,
+ }
- for k, v := range de.Params {
- if v == nil {
- delete(de.Params, k)
+ for k, v := range de.Params {
+ if v == nil {
+ delete(de.Params, k)
+ }
}
- }
- req.Handlers.Build.PushFrontNamed(request.NamedHandler{
- Name: "crr.endpointdiscovery",
- Fn: de.Handler,
- })
+ req.Handlers.Build.PushFrontNamed(request.NamedHandler{
+ Name: "crr.endpointdiscovery",
+ Fn: de.Handler,
+ })
+ }
}
return
}
@@ -5217,17 +5889,17 @@ func (c *DynamoDB) UpdateTimeToLiveRequest(input *UpdateTimeToLiveInput) (req *r
// See the AWS API reference guide for Amazon DynamoDB's
// API operation UpdateTimeToLive for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeResourceInUseException "ResourceInUseException"
+// Returned Error Types:
+// * ResourceInUseException
// The operation conflicts with the resource's availability. For example, you
// attempted to recreate an existing table, or tried to delete a table currently
// in the CREATING state.
//
-// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
+// * ResourceNotFoundException
// The operation tried to access a nonexistent table or index. The resource
// might not be specified correctly, or its status might not be ACTIVE.
//
-// * ErrCodeLimitExceededException "LimitExceededException"
+// * LimitExceededException
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 50 simultaneous table operations are allowed per account. These operations
@@ -5241,7 +5913,7 @@ func (c *DynamoDB) UpdateTimeToLiveRequest(input *UpdateTimeToLiveInput) (req *r
//
// There is a soft account limit of 256 tables.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTimeToLive
@@ -5266,6 +5938,56 @@ func (c *DynamoDB) UpdateTimeToLiveWithContext(ctx aws.Context, input *UpdateTim
return out, req.Send()
}
+// Contains details of a table archival operation.
+type ArchivalSummary struct {
+ _ struct{} `type:"structure"`
+
+ // The Amazon Resource Name (ARN) of the backup the table was archived to, when
+ // applicable in the archival reason. If you wish to restore this backup to
+ // the same table name, you will need to delete the original table.
+ ArchivalBackupArn *string `min:"37" type:"string"`
+
+ // The date and time when table archival was initiated by DynamoDB, in UNIX
+ // epoch time format.
+ ArchivalDateTime *time.Time `type:"timestamp"`
+
+ // The reason DynamoDB archived the table. Currently, the only possible value
+ // is:
+ //
+ // * INACCESSIBLE_ENCRYPTION_CREDENTIALS - The table was archived due to
+ // the table's AWS KMS key being inaccessible for more than seven days. An
+ // On-Demand backup was created at the archival time.
+ ArchivalReason *string `type:"string"`
+}
+
+// String returns the string representation
+func (s ArchivalSummary) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ArchivalSummary) GoString() string {
+ return s.String()
+}
+
+// SetArchivalBackupArn sets the ArchivalBackupArn field's value.
+func (s *ArchivalSummary) SetArchivalBackupArn(v string) *ArchivalSummary {
+ s.ArchivalBackupArn = &v
+ return s
+}
+
+// SetArchivalDateTime sets the ArchivalDateTime field's value.
+func (s *ArchivalSummary) SetArchivalDateTime(v time.Time) *ArchivalSummary {
+ s.ArchivalDateTime = &v
+ return s
+}
+
+// SetArchivalReason sets the ArchivalReason field's value.
+func (s *ArchivalSummary) SetArchivalReason(v string) *ArchivalSummary {
+ s.ArchivalReason = &v
+ return s
+}
+
// Represents an attribute for describing the key schema for the table and indexes.
type AttributeDefinition struct {
_ struct{} `type:"structure"`
@@ -5603,7 +6325,7 @@ func (s *AutoScalingPolicyDescription) SetTargetTrackingScalingPolicyConfigurati
return s
}
-// Represents the autoscaling policy to be modified.
+// Represents the auto scaling policy to be modified.
type AutoScalingPolicyUpdate struct {
_ struct{} `type:"structure"`
@@ -5659,15 +6381,15 @@ func (s *AutoScalingPolicyUpdate) SetTargetTrackingScalingPolicyConfiguration(v
return s
}
-// Represents the autoscaling settings for a global table or global secondary
+// Represents the auto scaling settings for a global table or global secondary
// index.
type AutoScalingSettingsDescription struct {
_ struct{} `type:"structure"`
- // Disabled autoscaling for this global table or global secondary index.
+ // Disabled auto scaling for this global table or global secondary index.
AutoScalingDisabled *bool `type:"boolean"`
- // Role ARN used for configuring autoScaling policy.
+ // Role ARN used for configuring the auto scaling policy.
AutoScalingRoleArn *string `type:"string"`
// The maximum capacity units that a global table or global secondary index
@@ -5722,15 +6444,15 @@ func (s *AutoScalingSettingsDescription) SetScalingPolicies(v []*AutoScalingPoli
return s
}
-// Represents the autoscaling settings to be modified for a global table or
+// Represents the auto scaling settings to be modified for a global table or
// global secondary index.
type AutoScalingSettingsUpdate struct {
_ struct{} `type:"structure"`
- // Disabled autoscaling for this global table or global secondary index.
+ // Disabled auto scaling for this global table or global secondary index.
AutoScalingDisabled *bool `type:"boolean"`
- // Role ARN used for configuring autoscaling policy.
+ // Role ARN used for configuring auto scaling policy.
AutoScalingRoleArn *string `min:"1" type:"string"`
// The maximum capacity units that a global table or global secondary index
@@ -5826,7 +6548,7 @@ type AutoScalingTargetTrackingScalingPolicyConfigurationDescription struct {
// subsequent scale in requests until it has expired. You should scale in conservatively
// to protect your application's availability. However, if another alarm triggers
// a scale out policy during the cooldown period after a scale-in, application
- // autoscaling scales out your scalable target immediately.
+ // auto scaling scales out your scalable target immediately.
ScaleInCooldown *int64 `type:"integer"`
// The amount of time, in seconds, after a scale out activity completes before
@@ -5894,7 +6616,7 @@ type AutoScalingTargetTrackingScalingPolicyConfigurationUpdate struct {
// subsequent scale in requests until it has expired. You should scale in conservatively
// to protect your application's availability. However, if another alarm triggers
// a scale out policy during the cooldown period after a scale-in, application
- // autoscaling scales out your scalable target immediately.
+ // auto scaling scales out your scalable target immediately.
ScaleInCooldown *int64 `type:"integer"`
// The amount of time, in seconds, after a scale out activity completes before
@@ -6099,40 +6821,153 @@ func (s *BackupDetails) SetBackupType(v string) *BackupDetails {
return s
}
-// Contains details for the backup.
-type BackupSummary struct {
- _ struct{} `type:"structure"`
-
- // ARN associated with the backup.
- BackupArn *string `min:"37" type:"string"`
+// There is another ongoing conflicting backup control plane operation on the
+// table. The backup is either being created, deleted or restored to a table.
+type BackupInUseException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
- // Time at which the backup was created.
- BackupCreationDateTime *time.Time `type:"timestamp"`
+ Message_ *string `locationName:"message" type:"string"`
+}
- // Time at which the automatic on-demand backup created by DynamoDB will expire.
- // This SYSTEM on-demand backup expires automatically 35 days after its creation.
- BackupExpiryDateTime *time.Time `type:"timestamp"`
+// String returns the string representation
+func (s BackupInUseException) String() string {
+ return awsutil.Prettify(s)
+}
- // Name of the specified backup.
- BackupName *string `min:"3" type:"string"`
+// GoString returns the string representation
+func (s BackupInUseException) GoString() string {
+ return s.String()
+}
- // Size of the backup in bytes.
- BackupSizeBytes *int64 `type:"long"`
+func newErrorBackupInUseException(v protocol.ResponseMetadata) error {
+ return &BackupInUseException{
+ RespMetadata: v,
+ }
+}
- // Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
- BackupStatus *string `type:"string" enum:"BackupStatus"`
+// Code returns the exception type name.
+func (s *BackupInUseException) Code() string {
+ return "BackupInUseException"
+}
- // BackupType:
- //
- // * USER - You create and manage these using the on-demand backup feature.
- //
- // * SYSTEM - If you delete a table with point-in-time recovery enabled,
- // a SYSTEM backup is automatically created and is retained for 35 days (at
- // no additional cost). System backups allow you to restore the deleted table
- // to the state it was in just before the point of deletion.
- //
- // * AWS_BACKUP - On-demand backup created by you from AWS Backup service.
- BackupType *string `type:"string" enum:"BackupType"`
+// Message returns the exception's message.
+func (s *BackupInUseException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *BackupInUseException) OrigErr() error {
+ return nil
+}
+
+func (s *BackupInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *BackupInUseException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *BackupInUseException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Backup not found for the given BackupARN.
+type BackupNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s BackupNotFoundException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s BackupNotFoundException) GoString() string {
+ return s.String()
+}
+
+func newErrorBackupNotFoundException(v protocol.ResponseMetadata) error {
+ return &BackupNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *BackupNotFoundException) Code() string {
+ return "BackupNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *BackupNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *BackupNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *BackupNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *BackupNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *BackupNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Contains details for the backup.
+type BackupSummary struct {
+ _ struct{} `type:"structure"`
+
+ // ARN associated with the backup.
+ BackupArn *string `min:"37" type:"string"`
+
+ // Time at which the backup was created.
+ BackupCreationDateTime *time.Time `type:"timestamp"`
+
+ // Time at which the automatic on-demand backup created by DynamoDB will expire.
+ // This SYSTEM on-demand backup expires automatically 35 days after its creation.
+ BackupExpiryDateTime *time.Time `type:"timestamp"`
+
+ // Name of the specified backup.
+ BackupName *string `min:"3" type:"string"`
+
+ // Size of the backup in bytes.
+ BackupSizeBytes *int64 `type:"long"`
+
+ // Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
+ BackupStatus *string `type:"string" enum:"BackupStatus"`
+
+ // BackupType:
+ //
+ // * USER - You create and manage these using the on-demand backup feature.
+ //
+ // * SYSTEM - If you delete a table with point-in-time recovery enabled,
+ // a SYSTEM backup is automatically created and is retained for 35 days (at
+ // no additional cost). System backups allow you to restore the deleted table
+ // to the state it was in just before the point of deletion.
+ //
+ // * AWS_BACKUP - On-demand backup created by you from AWS Backup service.
+ BackupType *string `type:"string" enum:"BackupType"`
// ARN associated with the table.
TableArn *string `type:"string"`
@@ -6897,7 +7732,7 @@ func (s *Condition) SetComparisonOperator(v string) *Condition {
}
// Represents a request to perform a check that an item exists or to check the
-// condition of specific attributes of the item..
+// condition of specific attributes of the item.
type ConditionCheck struct {
_ struct{} `type:"structure"`
@@ -6997,6 +7832,63 @@ func (s *ConditionCheck) SetTableName(v string) *ConditionCheck {
return s
}
+// A condition specified in the operation could not be evaluated.
+type ConditionalCheckFailedException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // The conditional request failed.
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ConditionalCheckFailedException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ConditionalCheckFailedException) GoString() string {
+ return s.String()
+}
+
+func newErrorConditionalCheckFailedException(v protocol.ResponseMetadata) error {
+ return &ConditionalCheckFailedException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ConditionalCheckFailedException) Code() string {
+ return "ConditionalCheckFailedException"
+}
+
+// Message returns the exception's message.
+func (s *ConditionalCheckFailedException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ConditionalCheckFailedException) OrigErr() error {
+ return nil
+}
+
+func (s *ConditionalCheckFailedException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ConditionalCheckFailedException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ConditionalCheckFailedException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// The capacity units consumed by an operation. The data returned includes the
// total provisioned throughput consumed, along with statistics for the table
// and any indexes involved in the operation. ConsumedCapacity is only returned
@@ -7116,6 +8008,105 @@ func (s *ContinuousBackupsDescription) SetPointInTimeRecoveryDescription(v *Poin
return s
}
+// Backups have not yet been enabled for this table.
+type ContinuousBackupsUnavailableException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ContinuousBackupsUnavailableException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ContinuousBackupsUnavailableException) GoString() string {
+ return s.String()
+}
+
+func newErrorContinuousBackupsUnavailableException(v protocol.ResponseMetadata) error {
+ return &ContinuousBackupsUnavailableException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ContinuousBackupsUnavailableException) Code() string {
+ return "ContinuousBackupsUnavailableException"
+}
+
+// Message returns the exception's message.
+func (s *ContinuousBackupsUnavailableException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ContinuousBackupsUnavailableException) OrigErr() error {
+ return nil
+}
+
+func (s *ContinuousBackupsUnavailableException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ContinuousBackupsUnavailableException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ContinuousBackupsUnavailableException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Represents a Contributor Insights summary entry..
+type ContributorInsightsSummary struct {
+ _ struct{} `type:"structure"`
+
+ // Describes the current status for contributor insights for the given table
+ // and index, if applicable.
+ ContributorInsightsStatus *string `type:"string" enum:"ContributorInsightsStatus"`
+
+ // Name of the index associated with the summary, if any.
+ IndexName *string `min:"3" type:"string"`
+
+ // Name of the table associated with the summary.
+ TableName *string `min:"3" type:"string"`
+}
+
+// String returns the string representation
+func (s ContributorInsightsSummary) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ContributorInsightsSummary) GoString() string {
+ return s.String()
+}
+
+// SetContributorInsightsStatus sets the ContributorInsightsStatus field's value.
+func (s *ContributorInsightsSummary) SetContributorInsightsStatus(v string) *ContributorInsightsSummary {
+ s.ContributorInsightsStatus = &v
+ return s
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *ContributorInsightsSummary) SetIndexName(v string) *ContributorInsightsSummary {
+ s.IndexName = &v
+ return s
+}
+
+// SetTableName sets the TableName field's value.
+func (s *ContributorInsightsSummary) SetTableName(v string) *ContributorInsightsSummary {
+ s.TableName = &v
+ return s
+}
+
type CreateBackupInput struct {
_ struct{} `type:"structure"`
@@ -7388,7 +8379,7 @@ func (s *CreateGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDescri
type CreateReplicaAction struct {
_ struct{} `type:"structure"`
- // The region of the replica to be added.
+ // The Region of the replica to be added.
//
// RegionName is a required field
RegionName *string `type:"string" required:"true"`
@@ -7423,6 +8414,94 @@ func (s *CreateReplicaAction) SetRegionName(v string) *CreateReplicaAction {
return s
}
+// Represents a replica to be created.
+type CreateReplicationGroupMemberAction struct {
+ _ struct{} `type:"structure"`
+
+ // Replica-specific global secondary index settings.
+ GlobalSecondaryIndexes []*ReplicaGlobalSecondaryIndex `min:"1" type:"list"`
+
+ // The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption
+ // in the new replica. To specify a CMK, use its key ID, Amazon Resource Name
+ // (ARN), alias name, or alias ARN. Note that you should only provide this parameter
+ // if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.
+ KMSMasterKeyId *string `type:"string"`
+
+ // Replica-specific provisioned throughput. If not specified, uses the source
+ // table's provisioned throughput settings.
+ ProvisionedThroughputOverride *ProvisionedThroughputOverride `type:"structure"`
+
+ // The Region where the new replica will be created.
+ //
+ // RegionName is a required field
+ RegionName *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s CreateReplicationGroupMemberAction) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateReplicationGroupMemberAction) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateReplicationGroupMemberAction) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateReplicationGroupMemberAction"}
+ if s.GlobalSecondaryIndexes != nil && len(s.GlobalSecondaryIndexes) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("GlobalSecondaryIndexes", 1))
+ }
+ if s.RegionName == nil {
+ invalidParams.Add(request.NewErrParamRequired("RegionName"))
+ }
+ if s.GlobalSecondaryIndexes != nil {
+ for i, v := range s.GlobalSecondaryIndexes {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexes", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.ProvisionedThroughputOverride != nil {
+ if err := s.ProvisionedThroughputOverride.Validate(); err != nil {
+ invalidParams.AddNested("ProvisionedThroughputOverride", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value.
+func (s *CreateReplicationGroupMemberAction) SetGlobalSecondaryIndexes(v []*ReplicaGlobalSecondaryIndex) *CreateReplicationGroupMemberAction {
+ s.GlobalSecondaryIndexes = v
+ return s
+}
+
+// SetKMSMasterKeyId sets the KMSMasterKeyId field's value.
+func (s *CreateReplicationGroupMemberAction) SetKMSMasterKeyId(v string) *CreateReplicationGroupMemberAction {
+ s.KMSMasterKeyId = &v
+ return s
+}
+
+// SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value.
+func (s *CreateReplicationGroupMemberAction) SetProvisionedThroughputOverride(v *ProvisionedThroughputOverride) *CreateReplicationGroupMemberAction {
+ s.ProvisionedThroughputOverride = v
+ return s
+}
+
+// SetRegionName sets the RegionName field's value.
+func (s *CreateReplicationGroupMemberAction) SetRegionName(v string) *CreateReplicationGroupMemberAction {
+ s.RegionName = &v
+ return s
+}
+
// Represents the input of a CreateTable operation.
type CreateTableInput struct {
_ struct{} `type:"structure"`
@@ -7435,11 +8514,11 @@ type CreateTableInput struct {
// Controls how you are charged for read and write throughput and how you manage
// capacity. This setting can be changed later.
//
- // * PROVISIONED - Sets the billing mode to PROVISIONED. We recommend using
- // PROVISIONED for predictable workloads.
+ // * PROVISIONED - We recommend using PROVISIONED for predictable workloads.
+ // PROVISIONED sets the billing mode to Provisioned Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual).
//
- // * PAY_PER_REQUEST - Sets the billing mode to PAY_PER_REQUEST. We recommend
- // using PAY_PER_REQUEST for unpredictable workloads.
+ // * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable
+ // workloads. PAY_PER_REQUEST sets the billing mode to On-Demand Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand).
BillingMode *string `type:"string" enum:"BillingMode"`
// One or more global secondary indexes (the maximum is 20) to be created on
@@ -7642,6 +8721,11 @@ func (s *CreateTableInput) Validate() error {
invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams))
}
}
+ if s.StreamSpecification != nil {
+ if err := s.StreamSpecification.Validate(); err != nil {
+ invalidParams.AddNested("StreamSpecification", err.(request.ErrInvalidParams))
+ }
+ }
if s.Tags != nil {
for i, v := range s.Tags {
if v == nil {
@@ -8243,7 +9327,7 @@ func (s *DeleteItemOutput) SetItemCollectionMetrics(v *ItemCollectionMetrics) *D
type DeleteReplicaAction struct {
_ struct{} `type:"structure"`
- // The region of the replica to be removed.
+ // The Region of the replica to be removed.
//
// RegionName is a required field
RegionName *string `type:"string" required:"true"`
@@ -8278,6 +9362,45 @@ func (s *DeleteReplicaAction) SetRegionName(v string) *DeleteReplicaAction {
return s
}
+// Represents a replica to be deleted.
+type DeleteReplicationGroupMemberAction struct {
+ _ struct{} `type:"structure"`
+
+ // The Region where the replica exists.
+ //
+ // RegionName is a required field
+ RegionName *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteReplicationGroupMemberAction) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteReplicationGroupMemberAction) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteReplicationGroupMemberAction) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteReplicationGroupMemberAction"}
+ if s.RegionName == nil {
+ invalidParams.Add(request.NewErrParamRequired("RegionName"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetRegionName sets the RegionName field's value.
+func (s *DeleteReplicationGroupMemberAction) SetRegionName(v string) *DeleteReplicationGroupMemberAction {
+ s.RegionName = &v
+ return s
+}
+
// Represents a request to perform a DeleteItem operation on an item.
type DeleteRequest struct {
_ struct{} `type:"structure"`
@@ -8502,13 +9625,149 @@ func (s *DescribeContinuousBackupsOutput) SetContinuousBackupsDescription(v *Con
return s
}
-type DescribeEndpointsInput struct {
+type DescribeContributorInsightsInput struct {
_ struct{} `type:"structure"`
-}
-// String returns the string representation
-func (s DescribeEndpointsInput) String() string {
- return awsutil.Prettify(s)
+ // The name of the global secondary index to describe, if applicable.
+ IndexName *string `min:"3" type:"string"`
+
+ // The name of the table to describe.
+ //
+ // TableName is a required field
+ TableName *string `min:"3" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DescribeContributorInsightsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeContributorInsightsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeContributorInsightsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeContributorInsightsInput"}
+ if s.IndexName != nil && len(*s.IndexName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
+ }
+ if s.TableName == nil {
+ invalidParams.Add(request.NewErrParamRequired("TableName"))
+ }
+ if s.TableName != nil && len(*s.TableName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *DescribeContributorInsightsInput) SetIndexName(v string) *DescribeContributorInsightsInput {
+ s.IndexName = &v
+ return s
+}
+
+// SetTableName sets the TableName field's value.
+func (s *DescribeContributorInsightsInput) SetTableName(v string) *DescribeContributorInsightsInput {
+ s.TableName = &v
+ return s
+}
+
+type DescribeContributorInsightsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // List of names of the associated Alpine rules.
+ ContributorInsightsRuleList []*string `type:"list"`
+
+ // Current Status contributor insights.
+ ContributorInsightsStatus *string `type:"string" enum:"ContributorInsightsStatus"`
+
+ // Returns information about the last failure that encountered.
+ //
+ // The most common exceptions for a FAILED status are:
+ //
+ // * LimitExceededException - Per-account Amazon CloudWatch Contributor Insights
+ // rule limit reached. Please disable Contributor Insights for other tables/indexes
+ // OR disable Contributor Insights rules before retrying.
+ //
+ // * AccessDeniedException - Amazon CloudWatch Contributor Insights rules
+ // cannot be modified due to insufficient permissions.
+ //
+ // * AccessDeniedException - Failed to create service-linked role for Contributor
+ // Insights due to insufficient permissions.
+ //
+ // * InternalServerError - Failed to create Amazon CloudWatch Contributor
+ // Insights rules. Please retry request.
+ FailureException *FailureException `type:"structure"`
+
+ // The name of the global secondary index being described.
+ IndexName *string `min:"3" type:"string"`
+
+ // Timestamp of the last time the status was changed.
+ LastUpdateDateTime *time.Time `type:"timestamp"`
+
+ // The name of the table being described.
+ TableName *string `min:"3" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeContributorInsightsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeContributorInsightsOutput) GoString() string {
+ return s.String()
+}
+
+// SetContributorInsightsRuleList sets the ContributorInsightsRuleList field's value.
+func (s *DescribeContributorInsightsOutput) SetContributorInsightsRuleList(v []*string) *DescribeContributorInsightsOutput {
+ s.ContributorInsightsRuleList = v
+ return s
+}
+
+// SetContributorInsightsStatus sets the ContributorInsightsStatus field's value.
+func (s *DescribeContributorInsightsOutput) SetContributorInsightsStatus(v string) *DescribeContributorInsightsOutput {
+ s.ContributorInsightsStatus = &v
+ return s
+}
+
+// SetFailureException sets the FailureException field's value.
+func (s *DescribeContributorInsightsOutput) SetFailureException(v *FailureException) *DescribeContributorInsightsOutput {
+ s.FailureException = v
+ return s
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *DescribeContributorInsightsOutput) SetIndexName(v string) *DescribeContributorInsightsOutput {
+ s.IndexName = &v
+ return s
+}
+
+// SetLastUpdateDateTime sets the LastUpdateDateTime field's value.
+func (s *DescribeContributorInsightsOutput) SetLastUpdateDateTime(v time.Time) *DescribeContributorInsightsOutput {
+ s.LastUpdateDateTime = &v
+ return s
+}
+
+// SetTableName sets the TableName field's value.
+func (s *DescribeContributorInsightsOutput) SetTableName(v string) *DescribeContributorInsightsOutput {
+ s.TableName = &v
+ return s
+}
+
+type DescribeEndpointsInput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeEndpointsInput) String() string {
+ return awsutil.Prettify(s)
}
// GoString returns the string representation
@@ -8816,6 +10075,70 @@ func (s *DescribeTableOutput) SetTable(v *TableDescription) *DescribeTableOutput
return s
}
+type DescribeTableReplicaAutoScalingInput struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the table.
+ //
+ // TableName is a required field
+ TableName *string `min:"3" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DescribeTableReplicaAutoScalingInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeTableReplicaAutoScalingInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeTableReplicaAutoScalingInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeTableReplicaAutoScalingInput"}
+ if s.TableName == nil {
+ invalidParams.Add(request.NewErrParamRequired("TableName"))
+ }
+ if s.TableName != nil && len(*s.TableName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetTableName sets the TableName field's value.
+func (s *DescribeTableReplicaAutoScalingInput) SetTableName(v string) *DescribeTableReplicaAutoScalingInput {
+ s.TableName = &v
+ return s
+}
+
+type DescribeTableReplicaAutoScalingOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Represents the auto scaling properties of the table.
+ TableAutoScalingDescription *TableAutoScalingDescription `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeTableReplicaAutoScalingOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeTableReplicaAutoScalingOutput) GoString() string {
+ return s.String()
+}
+
+// SetTableAutoScalingDescription sets the TableAutoScalingDescription field's value.
+func (s *DescribeTableReplicaAutoScalingOutput) SetTableAutoScalingDescription(v *TableAutoScalingDescription) *DescribeTableReplicaAutoScalingOutput {
+ s.TableAutoScalingDescription = v
+ return s
+}
+
type DescribeTimeToLiveInput struct {
_ struct{} `type:"structure"`
@@ -8918,7 +10241,7 @@ func (s *Endpoint) SetCachePeriodInMinutes(v int64) *Endpoint {
}
// Represents a condition to be compared with an attribute value. This condition
-// can be used with DeleteItem, PutItem or UpdateItem operations; if the comparison
+// can be used with DeleteItem, PutItem, or UpdateItem operations; if the comparison
// evaluates to true, the operation succeeds; if not, the operation fails. You
// can use ExpectedAttributeValue in one of two different ways:
//
@@ -9137,6 +10460,39 @@ func (s *ExpectedAttributeValue) SetValue(v *AttributeValue) *ExpectedAttributeV
return s
}
+// Represents a failure a contributor insights operation.
+type FailureException struct {
+ _ struct{} `type:"structure"`
+
+ // Description of the failure.
+ ExceptionDescription *string `type:"string"`
+
+ // Exception name.
+ ExceptionName *string `type:"string"`
+}
+
+// String returns the string representation
+func (s FailureException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FailureException) GoString() string {
+ return s.String()
+}
+
+// SetExceptionDescription sets the ExceptionDescription field's value.
+func (s *FailureException) SetExceptionDescription(v string) *FailureException {
+ s.ExceptionDescription = &v
+ return s
+}
+
+// SetExceptionName sets the ExceptionName field's value.
+func (s *FailureException) SetExceptionName(v string) *FailureException {
+ s.ExceptionName = &v
+ return s
+}
+
// Specifies an item and related attribute values to retrieve in a TransactGetItem
// object.
type Get struct {
@@ -9443,7 +10799,7 @@ type GlobalSecondaryIndex struct {
// * RANGE - sort key
//
// The partition key of an item is also known as its hash attribute. The term
- // "hash attribute" derives from DynamoDB' usage of an internal hash function
+ // "hash attribute" derives from DynamoDB's usage of an internal hash function
// to evenly distribute data items across partitions, based on their partition
// key values.
//
@@ -9549,6 +10905,59 @@ func (s *GlobalSecondaryIndex) SetProvisionedThroughput(v *ProvisionedThroughput
return s
}
+// Represents the auto scaling settings of a global secondary index for a global
+// table that will be modified.
+type GlobalSecondaryIndexAutoScalingUpdate struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the global secondary index.
+ IndexName *string `min:"3" type:"string"`
+
+ // Represents the auto scaling settings to be modified for a global table or
+ // global secondary index.
+ ProvisionedWriteCapacityAutoScalingUpdate *AutoScalingSettingsUpdate `type:"structure"`
+}
+
+// String returns the string representation
+func (s GlobalSecondaryIndexAutoScalingUpdate) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GlobalSecondaryIndexAutoScalingUpdate) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *GlobalSecondaryIndexAutoScalingUpdate) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "GlobalSecondaryIndexAutoScalingUpdate"}
+ if s.IndexName != nil && len(*s.IndexName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
+ }
+ if s.ProvisionedWriteCapacityAutoScalingUpdate != nil {
+ if err := s.ProvisionedWriteCapacityAutoScalingUpdate.Validate(); err != nil {
+ invalidParams.AddNested("ProvisionedWriteCapacityAutoScalingUpdate", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *GlobalSecondaryIndexAutoScalingUpdate) SetIndexName(v string) *GlobalSecondaryIndexAutoScalingUpdate {
+ s.IndexName = &v
+ return s
+}
+
+// SetProvisionedWriteCapacityAutoScalingUpdate sets the ProvisionedWriteCapacityAutoScalingUpdate field's value.
+func (s *GlobalSecondaryIndexAutoScalingUpdate) SetProvisionedWriteCapacityAutoScalingUpdate(v *AutoScalingSettingsUpdate) *GlobalSecondaryIndexAutoScalingUpdate {
+ s.ProvisionedWriteCapacityAutoScalingUpdate = v
+ return s
+}
+
// Represents the properties of a global secondary index.
type GlobalSecondaryIndexDescription struct {
_ struct{} `type:"structure"`
@@ -9560,6 +10969,11 @@ type GlobalSecondaryIndexDescription struct {
// DynamoDB will do so. After all items have been processed, the backfilling
// operation is complete and Backfilling is false.
//
+ // You can delete an index that is being created during the Backfilling phase
+ // when IndexStatus is set to CREATING and Backfilling is true. You can't delete
+ // the index that is being created when IndexStatus is set to CREATING and Backfilling
+ // is false.
+ //
// For indexes that were created during a CreateTable operation, the Backfilling
// attribute does not appear in the DescribeTable output.
Backfilling *bool `type:"boolean"`
@@ -9598,7 +11012,7 @@ type GlobalSecondaryIndexDescription struct {
// * RANGE - sort key
//
// The partition key of an item is also known as its hash attribute. The term
- // "hash attribute" derives from DynamoDB' usage of an internal hash function
+ // "hash attribute" derives from DynamoDB's usage of an internal hash function
// to evenly distribute data items across partitions, based on their partition
// key values.
//
@@ -9701,7 +11115,7 @@ type GlobalSecondaryIndexInfo struct {
// * RANGE - sort key
//
// The partition key of an item is also known as its hash attribute. The term
- // "hash attribute" derives from DynamoDB' usage of an internal hash function
+ // "hash attribute" derives from DynamoDB's usage of an internal hash function
// to evenly distribute data items across partitions, based on their partition
// key values.
//
@@ -9847,7 +11261,7 @@ type GlobalTable struct {
// The global table name.
GlobalTableName *string `min:"3" type:"string"`
- // The regions where the global table has replicas.
+ // The Regions where the global table has replicas.
ReplicationGroup []*Replica `type:"list"`
}
@@ -9873,6 +11287,62 @@ func (s *GlobalTable) SetReplicationGroup(v []*Replica) *GlobalTable {
return s
}
+// The specified global table already exists.
+type GlobalTableAlreadyExistsException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s GlobalTableAlreadyExistsException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GlobalTableAlreadyExistsException) GoString() string {
+ return s.String()
+}
+
+func newErrorGlobalTableAlreadyExistsException(v protocol.ResponseMetadata) error {
+ return &GlobalTableAlreadyExistsException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *GlobalTableAlreadyExistsException) Code() string {
+ return "GlobalTableAlreadyExistsException"
+}
+
+// Message returns the exception's message.
+func (s *GlobalTableAlreadyExistsException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *GlobalTableAlreadyExistsException) OrigErr() error {
+ return nil
+}
+
+func (s *GlobalTableAlreadyExistsException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *GlobalTableAlreadyExistsException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *GlobalTableAlreadyExistsException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Contains details about the global table.
type GlobalTableDescription struct {
_ struct{} `type:"structure"`
@@ -9897,7 +11367,7 @@ type GlobalTableDescription struct {
// * ACTIVE - The global table is ready for use.
GlobalTableStatus *string `type:"string" enum:"GlobalTableStatus"`
- // The regions where the global table has replicas.
+ // The Regions where the global table has replicas.
ReplicationGroup []*ReplicaDescription `type:"list"`
}
@@ -9952,7 +11422,7 @@ type GlobalTableGlobalSecondaryIndexSettingsUpdate struct {
// IndexName is a required field
IndexName *string `min:"3" type:"string" required:"true"`
- // AutoScaling settings for managing a global secondary index's write capacity
+ // Auto scaling settings for managing a global secondary index's write capacity
// units.
ProvisionedWriteCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"`
@@ -10013,43 +11483,326 @@ func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetProvisionedWriteCapac
return s
}
-// Information about item collections, if any, that were affected by the operation.
-// ItemCollectionMetrics is only returned if the request asked for it. If the
-// table does not have any local secondary indexes, this information is not
-// returned in the response.
-type ItemCollectionMetrics struct {
- _ struct{} `type:"structure"`
-
- // The partition key value of the item collection. This value is the same as
- // the partition key value of the item.
- ItemCollectionKey map[string]*AttributeValue `type:"map"`
+// The specified global table does not exist.
+type GlobalTableNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
- // An estimate of item collection size, in gigabytes. This value is a two-element
- // array containing a lower bound and an upper bound for the estimate. The estimate
- // includes the size of all the items in the table, plus the size of all attributes
- // projected into all of the local secondary indexes on that table. Use this
- // estimate to measure whether a local secondary index is approaching its size
- // limit.
- //
- // The estimate is subject to change over time; therefore, do not rely on the
- // precision or accuracy of the estimate.
- SizeEstimateRangeGB []*float64 `type:"list"`
+ Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
-func (s ItemCollectionMetrics) String() string {
+func (s GlobalTableNotFoundException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ItemCollectionMetrics) GoString() string {
+func (s GlobalTableNotFoundException) GoString() string {
return s.String()
}
-// SetItemCollectionKey sets the ItemCollectionKey field's value.
-func (s *ItemCollectionMetrics) SetItemCollectionKey(v map[string]*AttributeValue) *ItemCollectionMetrics {
- s.ItemCollectionKey = v
- return s
+func newErrorGlobalTableNotFoundException(v protocol.ResponseMetadata) error {
+ return &GlobalTableNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *GlobalTableNotFoundException) Code() string {
+ return "GlobalTableNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *GlobalTableNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *GlobalTableNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *GlobalTableNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *GlobalTableNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *GlobalTableNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// DynamoDB rejected the request because you retried a request with a different
+// payload but with an idempotent token that was already used.
+type IdempotentParameterMismatchException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s IdempotentParameterMismatchException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IdempotentParameterMismatchException) GoString() string {
+ return s.String()
+}
+
+func newErrorIdempotentParameterMismatchException(v protocol.ResponseMetadata) error {
+ return &IdempotentParameterMismatchException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *IdempotentParameterMismatchException) Code() string {
+ return "IdempotentParameterMismatchException"
+}
+
+// Message returns the exception's message.
+func (s *IdempotentParameterMismatchException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *IdempotentParameterMismatchException) OrigErr() error {
+ return nil
+}
+
+func (s *IdempotentParameterMismatchException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *IdempotentParameterMismatchException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *IdempotentParameterMismatchException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The operation tried to access a nonexistent index.
+type IndexNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s IndexNotFoundException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IndexNotFoundException) GoString() string {
+ return s.String()
+}
+
+func newErrorIndexNotFoundException(v protocol.ResponseMetadata) error {
+ return &IndexNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *IndexNotFoundException) Code() string {
+ return "IndexNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *IndexNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *IndexNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *IndexNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *IndexNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *IndexNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// An error occurred on the server side.
+type InternalServerError struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // The server encountered an internal error trying to fulfill the request.
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InternalServerError) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InternalServerError) GoString() string {
+ return s.String()
+}
+
+func newErrorInternalServerError(v protocol.ResponseMetadata) error {
+ return &InternalServerError{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InternalServerError) Code() string {
+ return "InternalServerError"
+}
+
+// Message returns the exception's message.
+func (s *InternalServerError) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InternalServerError) OrigErr() error {
+ return nil
+}
+
+func (s *InternalServerError) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InternalServerError) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InternalServerError) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime
+// and LatestRestorableDateTime.
+type InvalidRestoreTimeException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidRestoreTimeException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidRestoreTimeException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidRestoreTimeException(v protocol.ResponseMetadata) error {
+ return &InvalidRestoreTimeException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidRestoreTimeException) Code() string {
+ return "InvalidRestoreTimeException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidRestoreTimeException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidRestoreTimeException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidRestoreTimeException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidRestoreTimeException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidRestoreTimeException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Information about item collections, if any, that were affected by the operation.
+// ItemCollectionMetrics is only returned if the request asked for it. If the
+// table does not have any local secondary indexes, this information is not
+// returned in the response.
+type ItemCollectionMetrics struct {
+ _ struct{} `type:"structure"`
+
+ // The partition key value of the item collection. This value is the same as
+ // the partition key value of the item.
+ ItemCollectionKey map[string]*AttributeValue `type:"map"`
+
+ // An estimate of item collection size, in gigabytes. This value is a two-element
+ // array containing a lower bound and an upper bound for the estimate. The estimate
+ // includes the size of all the items in the table, plus the size of all attributes
+ // projected into all of the local secondary indexes on that table. Use this
+ // estimate to measure whether a local secondary index is approaching its size
+ // limit.
+ //
+ // The estimate is subject to change over time; therefore, do not rely on the
+ // precision or accuracy of the estimate.
+ SizeEstimateRangeGB []*float64 `type:"list"`
+}
+
+// String returns the string representation
+func (s ItemCollectionMetrics) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ItemCollectionMetrics) GoString() string {
+ return s.String()
+}
+
+// SetItemCollectionKey sets the ItemCollectionKey field's value.
+func (s *ItemCollectionMetrics) SetItemCollectionKey(v map[string]*AttributeValue) *ItemCollectionMetrics {
+ s.ItemCollectionKey = v
+ return s
}
// SetSizeEstimateRangeGB sets the SizeEstimateRangeGB field's value.
@@ -10058,6 +11811,65 @@ func (s *ItemCollectionMetrics) SetSizeEstimateRangeGB(v []*float64) *ItemCollec
return s
}
+// An item collection is too large. This exception is only returned for tables
+// that have one or more local secondary indexes.
+type ItemCollectionSizeLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // The total size of an item collection has exceeded the maximum limit of 10
+ // gigabytes.
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ItemCollectionSizeLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ItemCollectionSizeLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorItemCollectionSizeLimitExceededException(v protocol.ResponseMetadata) error {
+ return &ItemCollectionSizeLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ItemCollectionSizeLimitExceededException) Code() string {
+ return "ItemCollectionSizeLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *ItemCollectionSizeLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ItemCollectionSizeLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *ItemCollectionSizeLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ItemCollectionSizeLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ItemCollectionSizeLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Details for the requested item.
type ItemResponse struct {
_ struct{} `type:"structure"`
@@ -10108,7 +11920,7 @@ type KeySchemaElement struct {
// * RANGE - sort key
//
// The partition key of an item is also known as its hash attribute. The term
- // "hash attribute" derives from DynamoDB' usage of an internal hash function
+ // "hash attribute" derives from DynamoDB's usage of an internal hash function
// to evenly distribute data items across partitions, based on their partition
// key values.
//
@@ -10295,6 +12107,74 @@ func (s *KeysAndAttributes) SetProjectionExpression(v string) *KeysAndAttributes
return s
}
+// There is no limit to the number of daily on-demand backups that can be taken.
+//
+// Up to 50 simultaneous table operations are allowed per account. These operations
+// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
+// and RestoreTableToPointInTime.
+//
+// The only exception is when you are creating a table with one or more secondary
+// indexes. You can have up to 25 such requests running at a time; however,
+// if the table or index specifications are complex, DynamoDB might temporarily
+// reduce the number of concurrent operations.
+//
+// There is a soft account limit of 256 tables.
+type LimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // Too many operations for a given subscriber.
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s LimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorLimitExceededException(v protocol.ResponseMetadata) error {
+ return &LimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *LimitExceededException) Code() string {
+ return "LimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *LimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *LimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *LimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *LimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *LimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
type ListBackupsInput struct {
_ struct{} `type:"structure"`
@@ -10436,37 +12316,34 @@ func (s *ListBackupsOutput) SetLastEvaluatedBackupArn(v string) *ListBackupsOutp
return s
}
-type ListGlobalTablesInput struct {
+type ListContributorInsightsInput struct {
_ struct{} `type:"structure"`
- // The first global table name that this operation will evaluate.
- ExclusiveStartGlobalTableName *string `min:"3" type:"string"`
+ // Maximum number of results to return per page.
+ MaxResults *int64 `type:"integer"`
- // The maximum number of table names to return.
- Limit *int64 `min:"1" type:"integer"`
+ // A token to for the desired page, if there is one.
+ NextToken *string `type:"string"`
- // Lists the global tables in a specific Region.
- RegionName *string `type:"string"`
+ // The name of the table.
+ TableName *string `min:"3" type:"string"`
}
// String returns the string representation
-func (s ListGlobalTablesInput) String() string {
+func (s ListContributorInsightsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ListGlobalTablesInput) GoString() string {
+func (s ListContributorInsightsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListGlobalTablesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListGlobalTablesInput"}
- if s.ExclusiveStartGlobalTableName != nil && len(*s.ExclusiveStartGlobalTableName) < 3 {
- invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartGlobalTableName", 3))
- }
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
+func (s *ListContributorInsightsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListContributorInsightsInput"}
+ if s.TableName != nil && len(*s.TableName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
}
if invalidParams.Len() > 0 {
@@ -10475,21 +12352,116 @@ func (s *ListGlobalTablesInput) Validate() error {
return nil
}
-// SetExclusiveStartGlobalTableName sets the ExclusiveStartGlobalTableName field's value.
-func (s *ListGlobalTablesInput) SetExclusiveStartGlobalTableName(v string) *ListGlobalTablesInput {
- s.ExclusiveStartGlobalTableName = &v
+// SetMaxResults sets the MaxResults field's value.
+func (s *ListContributorInsightsInput) SetMaxResults(v int64) *ListContributorInsightsInput {
+ s.MaxResults = &v
return s
}
-// SetLimit sets the Limit field's value.
-func (s *ListGlobalTablesInput) SetLimit(v int64) *ListGlobalTablesInput {
- s.Limit = &v
+// SetNextToken sets the NextToken field's value.
+func (s *ListContributorInsightsInput) SetNextToken(v string) *ListContributorInsightsInput {
+ s.NextToken = &v
return s
}
-// SetRegionName sets the RegionName field's value.
-func (s *ListGlobalTablesInput) SetRegionName(v string) *ListGlobalTablesInput {
- s.RegionName = &v
+// SetTableName sets the TableName field's value.
+func (s *ListContributorInsightsInput) SetTableName(v string) *ListContributorInsightsInput {
+ s.TableName = &v
+ return s
+}
+
+type ListContributorInsightsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // A list of ContributorInsightsSummary.
+ ContributorInsightsSummaries []*ContributorInsightsSummary `type:"list"`
+
+ // A token to go to the next page if there is one.
+ NextToken *string `type:"string"`
+}
+
+// String returns the string representation
+func (s ListContributorInsightsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListContributorInsightsOutput) GoString() string {
+ return s.String()
+}
+
+// SetContributorInsightsSummaries sets the ContributorInsightsSummaries field's value.
+func (s *ListContributorInsightsOutput) SetContributorInsightsSummaries(v []*ContributorInsightsSummary) *ListContributorInsightsOutput {
+ s.ContributorInsightsSummaries = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *ListContributorInsightsOutput) SetNextToken(v string) *ListContributorInsightsOutput {
+ s.NextToken = &v
+ return s
+}
+
+type ListGlobalTablesInput struct {
+ _ struct{} `type:"structure"`
+
+ // The first global table name that this operation will evaluate.
+ ExclusiveStartGlobalTableName *string `min:"3" type:"string"`
+
+ // The maximum number of table names to return, if the parameter is not specified
+ // DynamoDB defaults to 100.
+ //
+ // If the number of global tables DynamoDB finds reaches this limit, it stops
+ // the operation and returns the table names collected up to that point, with
+ // a table name in the LastEvaluatedGlobalTableName to apply in a subsequent
+ // operation to the ExclusiveStartGlobalTableName parameter.
+ Limit *int64 `min:"1" type:"integer"`
+
+ // Lists the global tables in a specific Region.
+ RegionName *string `type:"string"`
+}
+
+// String returns the string representation
+func (s ListGlobalTablesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListGlobalTablesInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ListGlobalTablesInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListGlobalTablesInput"}
+ if s.ExclusiveStartGlobalTableName != nil && len(*s.ExclusiveStartGlobalTableName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartGlobalTableName", 3))
+ }
+ if s.Limit != nil && *s.Limit < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetExclusiveStartGlobalTableName sets the ExclusiveStartGlobalTableName field's value.
+func (s *ListGlobalTablesInput) SetExclusiveStartGlobalTableName(v string) *ListGlobalTablesInput {
+ s.ExclusiveStartGlobalTableName = &v
+ return s
+}
+
+// SetLimit sets the Limit field's value.
+func (s *ListGlobalTablesInput) SetLimit(v int64) *ListGlobalTablesInput {
+ s.Limit = &v
+ return s
+}
+
+// SetRegionName sets the RegionName field's value.
+func (s *ListGlobalTablesInput) SetRegionName(v string) *ListGlobalTablesInput {
+ s.RegionName = &v
return s
}
@@ -10725,7 +12697,7 @@ type LocalSecondaryIndex struct {
// * RANGE - sort key
//
// The partition key of an item is also known as its hash attribute. The term
- // "hash attribute" derives from DynamoDB' usage of an internal hash function
+ // "hash attribute" derives from DynamoDB's usage of an internal hash function
// to evenly distribute data items across partitions, based on their partition
// key values.
//
@@ -10839,7 +12811,7 @@ type LocalSecondaryIndexDescription struct {
// * RANGE - sort key
//
// The partition key of an item is also known as its hash attribute. The term
- // "hash attribute" derives from DynamoDB' usage of an internal hash function
+ // "hash attribute" derives from DynamoDB's usage of an internal hash function
// to evenly distribute data items across partitions, based on their partition
// key values.
//
@@ -10916,7 +12888,7 @@ type LocalSecondaryIndexInfo struct {
// * RANGE - sort key
//
// The partition key of an item is also known as its hash attribute. The term
- // "hash attribute" derives from DynamoDB' usage of an internal hash function
+ // "hash attribute" derives from DynamoDB's usage of an internal hash function
// to evenly distribute data items across partitions, based on their partition
// key values.
//
@@ -10963,8 +12935,8 @@ func (s *LocalSecondaryIndexInfo) SetProjection(v *Projection) *LocalSecondaryIn
type PointInTimeRecoveryDescription struct {
_ struct{} `type:"structure"`
- // Specifies the earliest point in time you can restore your table to. It You
- // can restore your table to any point in time during the last 35 days.
+ // Specifies the earliest point in time you can restore your table to. You can
+ // restore your table to any point in time during the last 35 days.
EarliestRestorableDateTime *time.Time `type:"timestamp"`
// LatestRestorableDateTime is typically 5 minutes before the current time.
@@ -11048,6 +13020,62 @@ func (s *PointInTimeRecoverySpecification) SetPointInTimeRecoveryEnabled(v bool)
return s
}
+// Point in time recovery has not yet been enabled for this source table.
+type PointInTimeRecoveryUnavailableException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s PointInTimeRecoveryUnavailableException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PointInTimeRecoveryUnavailableException) GoString() string {
+ return s.String()
+}
+
+func newErrorPointInTimeRecoveryUnavailableException(v protocol.ResponseMetadata) error {
+ return &PointInTimeRecoveryUnavailableException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *PointInTimeRecoveryUnavailableException) Code() string {
+ return "PointInTimeRecoveryUnavailableException"
+}
+
+// Message returns the exception's message.
+func (s *PointInTimeRecoveryUnavailableException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *PointInTimeRecoveryUnavailableException) OrigErr() error {
+ return nil
+}
+
+func (s *PointInTimeRecoveryUnavailableException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *PointInTimeRecoveryUnavailableException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *PointInTimeRecoveryUnavailableException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Represents attributes that are copied (projected) from the table into an
// index. These are in addition to the primary key attributes and index key
// attributes, which are automatically projected.
@@ -11067,7 +13095,7 @@ type Projection struct {
// * KEYS_ONLY - Only the index and primary keys are projected into the index.
//
// * INCLUDE - Only the specified table attributes are projected into the
- // index. The list of projected attributes are in NonKeyAttributes.
+ // index. The list of projected attributes is in NonKeyAttributes.
//
// * ALL - All of the table attributes are projected into the index.
ProjectionType *string `type:"string" enum:"ProjectionType"`
@@ -11250,6 +13278,107 @@ func (s *ProvisionedThroughputDescription) SetWriteCapacityUnits(v int64) *Provi
return s
}
+// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
+// requests that receive this exception. Your request is eventually successful,
+// unless your retry queue is too large to finish. Reduce the frequency of requests
+// and use exponential backoff. For more information, go to Error Retries and
+// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
+// in the Amazon DynamoDB Developer Guide.
+type ProvisionedThroughputExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // You exceeded your maximum allowed provisioned throughput.
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ProvisionedThroughputExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ProvisionedThroughputExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorProvisionedThroughputExceededException(v protocol.ResponseMetadata) error {
+ return &ProvisionedThroughputExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ProvisionedThroughputExceededException) Code() string {
+ return "ProvisionedThroughputExceededException"
+}
+
+// Message returns the exception's message.
+func (s *ProvisionedThroughputExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ProvisionedThroughputExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *ProvisionedThroughputExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ProvisionedThroughputExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ProvisionedThroughputExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Replica-specific provisioned throughput settings. If not specified, uses
+// the source table's provisioned throughput settings.
+type ProvisionedThroughputOverride struct {
+ _ struct{} `type:"structure"`
+
+ // Replica-specific read capacity units. If not specified, uses the source table's
+ // read capacity settings.
+ ReadCapacityUnits *int64 `min:"1" type:"long"`
+}
+
+// String returns the string representation
+func (s ProvisionedThroughputOverride) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ProvisionedThroughputOverride) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ProvisionedThroughputOverride) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ProvisionedThroughputOverride"}
+ if s.ReadCapacityUnits != nil && *s.ReadCapacityUnits < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("ReadCapacityUnits", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetReadCapacityUnits sets the ReadCapacityUnits field's value.
+func (s *ProvisionedThroughputOverride) SetReadCapacityUnits(v int64) *ProvisionedThroughputOverride {
+ s.ReadCapacityUnits = &v
+ return s
+}
+
// Represents a request to perform a PutItem operation.
type Put struct {
_ struct{} `type:"structure"`
@@ -11451,6 +13580,10 @@ type PutItemInput struct {
// types for those attributes must match those of the schema in the table's
// attribute definition.
//
+ // Empty String and Binary attribute values are allowed. Attribute values of
+ // type String and Binary must have a length greater than zero if the attribute
+ // is used as a key attribute for a table or index.
+ //
// For more information about primary keys, see Primary Key (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey)
// in the Amazon DynamoDB Developer Guide.
//
@@ -11662,7 +13795,7 @@ type PutRequest struct {
// A map of attribute name to attribute values, representing the primary key
// of an item to be processed by PutItem. All of the table's primary key attributes
// must be specified, and their data types must match those of the table's key
- // schema. If any attributes are present in the item which are part of an index
+ // schema. If any attributes are present in the item that are part of an index
// key schema for the table, their types must match the index key schema.
//
// Item is a required field
@@ -12225,7 +14358,7 @@ func (s *QueryOutput) SetScannedCount(v int64) *QueryOutput {
type Replica struct {
_ struct{} `type:"structure"`
- // The region where the replica needs to be created.
+ // The Region where the replica needs to be created.
RegionName *string `type:"string"`
}
@@ -12245,105 +14378,575 @@ func (s *Replica) SetRegionName(v string) *Replica {
return s
}
-// Contains the details of the replica.
-type ReplicaDescription struct {
- _ struct{} `type:"structure"`
+// The specified replica is already part of the global table.
+type ReplicaAlreadyExistsException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
- // The name of the region.
- RegionName *string `type:"string"`
+ Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
-func (s ReplicaDescription) String() string {
+func (s ReplicaAlreadyExistsException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ReplicaDescription) GoString() string {
+func (s ReplicaAlreadyExistsException) GoString() string {
return s.String()
}
-// SetRegionName sets the RegionName field's value.
-func (s *ReplicaDescription) SetRegionName(v string) *ReplicaDescription {
- s.RegionName = &v
- return s
+func newErrorReplicaAlreadyExistsException(v protocol.ResponseMetadata) error {
+ return &ReplicaAlreadyExistsException{
+ RespMetadata: v,
+ }
}
-// Represents the properties of a global secondary index.
-type ReplicaGlobalSecondaryIndexSettingsDescription struct {
+// Code returns the exception type name.
+func (s *ReplicaAlreadyExistsException) Code() string {
+ return "ReplicaAlreadyExistsException"
+}
+
+// Message returns the exception's message.
+func (s *ReplicaAlreadyExistsException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ReplicaAlreadyExistsException) OrigErr() error {
+ return nil
+}
+
+func (s *ReplicaAlreadyExistsException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ReplicaAlreadyExistsException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ReplicaAlreadyExistsException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Represents the auto scaling settings of the replica.
+type ReplicaAutoScalingDescription struct {
_ struct{} `type:"structure"`
- // The name of the global secondary index. The name must be unique among all
- // other indexes on this table.
- //
- // IndexName is a required field
- IndexName *string `min:"3" type:"string" required:"true"`
+ // Replica-specific global secondary index auto scaling settings.
+ GlobalSecondaryIndexes []*ReplicaGlobalSecondaryIndexAutoScalingDescription `type:"list"`
- // The current status of the global secondary index:
+ // The Region where the replica exists.
+ RegionName *string `type:"string"`
+
+ // Represents the auto scaling settings for a global table or global secondary
+ // index.
+ ReplicaProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
+
+ // Represents the auto scaling settings for a global table or global secondary
+ // index.
+ ReplicaProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
+
+ // The current state of the replica:
//
- // * CREATING - The global secondary index is being created.
+ // * CREATING - The replica is being created.
//
- // * UPDATING - The global secondary index is being updated.
+ // * UPDATING - The replica is being updated.
//
- // * DELETING - The global secondary index is being deleted.
+ // * DELETING - The replica is being deleted.
//
- // * ACTIVE - The global secondary index is ready for use.
- IndexStatus *string `type:"string" enum:"IndexStatus"`
-
- // Autoscaling settings for a global secondary index replica's read capacity
- // units.
- ProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
-
- // The maximum number of strongly consistent reads consumed per second before
- // DynamoDB returns a ThrottlingException.
- ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"`
-
- // AutoScaling settings for a global secondary index replica's write capacity
- // units.
- ProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
-
- // The maximum number of writes consumed per second before DynamoDB returns
- // a ThrottlingException.
- ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"`
+ // * ACTIVE - The replica is ready for use.
+ ReplicaStatus *string `type:"string" enum:"ReplicaStatus"`
}
// String returns the string representation
-func (s ReplicaGlobalSecondaryIndexSettingsDescription) String() string {
+func (s ReplicaAutoScalingDescription) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ReplicaGlobalSecondaryIndexSettingsDescription) GoString() string {
+func (s ReplicaAutoScalingDescription) GoString() string {
return s.String()
}
-// SetIndexName sets the IndexName field's value.
-func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsDescription {
- s.IndexName = &v
+// SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value.
+func (s *ReplicaAutoScalingDescription) SetGlobalSecondaryIndexes(v []*ReplicaGlobalSecondaryIndexAutoScalingDescription) *ReplicaAutoScalingDescription {
+ s.GlobalSecondaryIndexes = v
return s
}
-// SetIndexStatus sets the IndexStatus field's value.
-func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexStatus(v string) *ReplicaGlobalSecondaryIndexSettingsDescription {
- s.IndexStatus = &v
+// SetRegionName sets the RegionName field's value.
+func (s *ReplicaAutoScalingDescription) SetRegionName(v string) *ReplicaAutoScalingDescription {
+ s.RegionName = &v
return s
}
-// SetProvisionedReadCapacityAutoScalingSettings sets the ProvisionedReadCapacityAutoScalingSettings field's value.
-func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexSettingsDescription {
- s.ProvisionedReadCapacityAutoScalingSettings = v
+// SetReplicaProvisionedReadCapacityAutoScalingSettings sets the ReplicaProvisionedReadCapacityAutoScalingSettings field's value.
+func (s *ReplicaAutoScalingDescription) SetReplicaProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaAutoScalingDescription {
+ s.ReplicaProvisionedReadCapacityAutoScalingSettings = v
return s
}
-// SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value.
-func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription {
- s.ProvisionedReadCapacityUnits = &v
+// SetReplicaProvisionedWriteCapacityAutoScalingSettings sets the ReplicaProvisionedWriteCapacityAutoScalingSettings field's value.
+func (s *ReplicaAutoScalingDescription) SetReplicaProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaAutoScalingDescription {
+ s.ReplicaProvisionedWriteCapacityAutoScalingSettings = v
return s
}
-// SetProvisionedWriteCapacityAutoScalingSettings sets the ProvisionedWriteCapacityAutoScalingSettings field's value.
-func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexSettingsDescription {
- s.ProvisionedWriteCapacityAutoScalingSettings = v
+// SetReplicaStatus sets the ReplicaStatus field's value.
+func (s *ReplicaAutoScalingDescription) SetReplicaStatus(v string) *ReplicaAutoScalingDescription {
+ s.ReplicaStatus = &v
+ return s
+}
+
+// Represents the auto scaling settings of a replica that will be modified.
+type ReplicaAutoScalingUpdate struct {
+ _ struct{} `type:"structure"`
+
+ // The Region where the replica exists.
+ //
+ // RegionName is a required field
+ RegionName *string `type:"string" required:"true"`
+
+ // Represents the auto scaling settings of global secondary indexes that will
+ // be modified.
+ ReplicaGlobalSecondaryIndexUpdates []*ReplicaGlobalSecondaryIndexAutoScalingUpdate `type:"list"`
+
+ // Represents the auto scaling settings to be modified for a global table or
+ // global secondary index.
+ ReplicaProvisionedReadCapacityAutoScalingUpdate *AutoScalingSettingsUpdate `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplicaAutoScalingUpdate) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicaAutoScalingUpdate) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ReplicaAutoScalingUpdate) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ReplicaAutoScalingUpdate"}
+ if s.RegionName == nil {
+ invalidParams.Add(request.NewErrParamRequired("RegionName"))
+ }
+ if s.ReplicaGlobalSecondaryIndexUpdates != nil {
+ for i, v := range s.ReplicaGlobalSecondaryIndexUpdates {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaGlobalSecondaryIndexUpdates", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.ReplicaProvisionedReadCapacityAutoScalingUpdate != nil {
+ if err := s.ReplicaProvisionedReadCapacityAutoScalingUpdate.Validate(); err != nil {
+ invalidParams.AddNested("ReplicaProvisionedReadCapacityAutoScalingUpdate", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetRegionName sets the RegionName field's value.
+func (s *ReplicaAutoScalingUpdate) SetRegionName(v string) *ReplicaAutoScalingUpdate {
+ s.RegionName = &v
+ return s
+}
+
+// SetReplicaGlobalSecondaryIndexUpdates sets the ReplicaGlobalSecondaryIndexUpdates field's value.
+func (s *ReplicaAutoScalingUpdate) SetReplicaGlobalSecondaryIndexUpdates(v []*ReplicaGlobalSecondaryIndexAutoScalingUpdate) *ReplicaAutoScalingUpdate {
+ s.ReplicaGlobalSecondaryIndexUpdates = v
+ return s
+}
+
+// SetReplicaProvisionedReadCapacityAutoScalingUpdate sets the ReplicaProvisionedReadCapacityAutoScalingUpdate field's value.
+func (s *ReplicaAutoScalingUpdate) SetReplicaProvisionedReadCapacityAutoScalingUpdate(v *AutoScalingSettingsUpdate) *ReplicaAutoScalingUpdate {
+ s.ReplicaProvisionedReadCapacityAutoScalingUpdate = v
+ return s
+}
+
+// Contains the details of the replica.
+type ReplicaDescription struct {
+ _ struct{} `type:"structure"`
+
+ // Replica-specific global secondary index settings.
+ GlobalSecondaryIndexes []*ReplicaGlobalSecondaryIndexDescription `type:"list"`
+
+ // The AWS KMS customer master key (CMK) of the replica that will be used for
+ // AWS KMS encryption.
+ KMSMasterKeyId *string `type:"string"`
+
+ // Replica-specific provisioned throughput. If not described, uses the source
+ // table's provisioned throughput settings.
+ ProvisionedThroughputOverride *ProvisionedThroughputOverride `type:"structure"`
+
+ // The name of the Region.
+ RegionName *string `type:"string"`
+
+ // The current state of the replica:
+ //
+ // * CREATING - The replica is being created.
+ //
+ // * UPDATING - The replica is being updated.
+ //
+ // * DELETING - The replica is being deleted.
+ //
+ // * ACTIVE - The replica is ready for use.
+ ReplicaStatus *string `type:"string" enum:"ReplicaStatus"`
+
+ // Detailed information about the replica status.
+ ReplicaStatusDescription *string `type:"string"`
+
+ // Specifies the progress of a Create, Update, or Delete action on the replica
+ // as a percentage.
+ ReplicaStatusPercentProgress *string `type:"string"`
+}
+
+// String returns the string representation
+func (s ReplicaDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicaDescription) GoString() string {
+ return s.String()
+}
+
+// SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value.
+func (s *ReplicaDescription) SetGlobalSecondaryIndexes(v []*ReplicaGlobalSecondaryIndexDescription) *ReplicaDescription {
+ s.GlobalSecondaryIndexes = v
+ return s
+}
+
+// SetKMSMasterKeyId sets the KMSMasterKeyId field's value.
+func (s *ReplicaDescription) SetKMSMasterKeyId(v string) *ReplicaDescription {
+ s.KMSMasterKeyId = &v
+ return s
+}
+
+// SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value.
+func (s *ReplicaDescription) SetProvisionedThroughputOverride(v *ProvisionedThroughputOverride) *ReplicaDescription {
+ s.ProvisionedThroughputOverride = v
+ return s
+}
+
+// SetRegionName sets the RegionName field's value.
+func (s *ReplicaDescription) SetRegionName(v string) *ReplicaDescription {
+ s.RegionName = &v
+ return s
+}
+
+// SetReplicaStatus sets the ReplicaStatus field's value.
+func (s *ReplicaDescription) SetReplicaStatus(v string) *ReplicaDescription {
+ s.ReplicaStatus = &v
+ return s
+}
+
+// SetReplicaStatusDescription sets the ReplicaStatusDescription field's value.
+func (s *ReplicaDescription) SetReplicaStatusDescription(v string) *ReplicaDescription {
+ s.ReplicaStatusDescription = &v
+ return s
+}
+
+// SetReplicaStatusPercentProgress sets the ReplicaStatusPercentProgress field's value.
+func (s *ReplicaDescription) SetReplicaStatusPercentProgress(v string) *ReplicaDescription {
+ s.ReplicaStatusPercentProgress = &v
+ return s
+}
+
+// Represents the properties of a replica global secondary index.
+type ReplicaGlobalSecondaryIndex struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the global secondary index.
+ //
+ // IndexName is a required field
+ IndexName *string `min:"3" type:"string" required:"true"`
+
+ // Replica table GSI-specific provisioned throughput. If not specified, uses
+ // the source table GSI's read capacity settings.
+ ProvisionedThroughputOverride *ProvisionedThroughputOverride `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplicaGlobalSecondaryIndex) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicaGlobalSecondaryIndex) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ReplicaGlobalSecondaryIndex) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ReplicaGlobalSecondaryIndex"}
+ if s.IndexName == nil {
+ invalidParams.Add(request.NewErrParamRequired("IndexName"))
+ }
+ if s.IndexName != nil && len(*s.IndexName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
+ }
+ if s.ProvisionedThroughputOverride != nil {
+ if err := s.ProvisionedThroughputOverride.Validate(); err != nil {
+ invalidParams.AddNested("ProvisionedThroughputOverride", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *ReplicaGlobalSecondaryIndex) SetIndexName(v string) *ReplicaGlobalSecondaryIndex {
+ s.IndexName = &v
+ return s
+}
+
+// SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value.
+func (s *ReplicaGlobalSecondaryIndex) SetProvisionedThroughputOverride(v *ProvisionedThroughputOverride) *ReplicaGlobalSecondaryIndex {
+ s.ProvisionedThroughputOverride = v
+ return s
+}
+
+// Represents the auto scaling configuration for a replica global secondary
+// index.
+type ReplicaGlobalSecondaryIndexAutoScalingDescription struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the global secondary index.
+ IndexName *string `min:"3" type:"string"`
+
+ // The current state of the replica global secondary index:
+ //
+ // * CREATING - The index is being created.
+ //
+ // * UPDATING - The index is being updated.
+ //
+ // * DELETING - The index is being deleted.
+ //
+ // * ACTIVE - The index is ready for use.
+ IndexStatus *string `type:"string" enum:"IndexStatus"`
+
+ // Represents the auto scaling settings for a global table or global secondary
+ // index.
+ ProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
+
+ // Represents the auto scaling settings for a global table or global secondary
+ // index.
+ ProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplicaGlobalSecondaryIndexAutoScalingDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicaGlobalSecondaryIndexAutoScalingDescription) GoString() string {
+ return s.String()
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *ReplicaGlobalSecondaryIndexAutoScalingDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexAutoScalingDescription {
+ s.IndexName = &v
+ return s
+}
+
+// SetIndexStatus sets the IndexStatus field's value.
+func (s *ReplicaGlobalSecondaryIndexAutoScalingDescription) SetIndexStatus(v string) *ReplicaGlobalSecondaryIndexAutoScalingDescription {
+ s.IndexStatus = &v
+ return s
+}
+
+// SetProvisionedReadCapacityAutoScalingSettings sets the ProvisionedReadCapacityAutoScalingSettings field's value.
+func (s *ReplicaGlobalSecondaryIndexAutoScalingDescription) SetProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexAutoScalingDescription {
+ s.ProvisionedReadCapacityAutoScalingSettings = v
+ return s
+}
+
+// SetProvisionedWriteCapacityAutoScalingSettings sets the ProvisionedWriteCapacityAutoScalingSettings field's value.
+func (s *ReplicaGlobalSecondaryIndexAutoScalingDescription) SetProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexAutoScalingDescription {
+ s.ProvisionedWriteCapacityAutoScalingSettings = v
+ return s
+}
+
+// Represents the auto scaling settings of a global secondary index for a replica
+// that will be modified.
+type ReplicaGlobalSecondaryIndexAutoScalingUpdate struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the global secondary index.
+ IndexName *string `min:"3" type:"string"`
+
+ // Represents the auto scaling settings to be modified for a global table or
+ // global secondary index.
+ ProvisionedReadCapacityAutoScalingUpdate *AutoScalingSettingsUpdate `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplicaGlobalSecondaryIndexAutoScalingUpdate) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicaGlobalSecondaryIndexAutoScalingUpdate) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ReplicaGlobalSecondaryIndexAutoScalingUpdate) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ReplicaGlobalSecondaryIndexAutoScalingUpdate"}
+ if s.IndexName != nil && len(*s.IndexName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
+ }
+ if s.ProvisionedReadCapacityAutoScalingUpdate != nil {
+ if err := s.ProvisionedReadCapacityAutoScalingUpdate.Validate(); err != nil {
+ invalidParams.AddNested("ProvisionedReadCapacityAutoScalingUpdate", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *ReplicaGlobalSecondaryIndexAutoScalingUpdate) SetIndexName(v string) *ReplicaGlobalSecondaryIndexAutoScalingUpdate {
+ s.IndexName = &v
+ return s
+}
+
+// SetProvisionedReadCapacityAutoScalingUpdate sets the ProvisionedReadCapacityAutoScalingUpdate field's value.
+func (s *ReplicaGlobalSecondaryIndexAutoScalingUpdate) SetProvisionedReadCapacityAutoScalingUpdate(v *AutoScalingSettingsUpdate) *ReplicaGlobalSecondaryIndexAutoScalingUpdate {
+ s.ProvisionedReadCapacityAutoScalingUpdate = v
+ return s
+}
+
+// Represents the properties of a replica global secondary index.
+type ReplicaGlobalSecondaryIndexDescription struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the global secondary index.
+ IndexName *string `min:"3" type:"string"`
+
+ // If not described, uses the source table GSI's read capacity settings.
+ ProvisionedThroughputOverride *ProvisionedThroughputOverride `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplicaGlobalSecondaryIndexDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicaGlobalSecondaryIndexDescription) GoString() string {
+ return s.String()
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *ReplicaGlobalSecondaryIndexDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexDescription {
+ s.IndexName = &v
+ return s
+}
+
+// SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value.
+func (s *ReplicaGlobalSecondaryIndexDescription) SetProvisionedThroughputOverride(v *ProvisionedThroughputOverride) *ReplicaGlobalSecondaryIndexDescription {
+ s.ProvisionedThroughputOverride = v
+ return s
+}
+
+// Represents the properties of a global secondary index.
+type ReplicaGlobalSecondaryIndexSettingsDescription struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the global secondary index. The name must be unique among all
+ // other indexes on this table.
+ //
+ // IndexName is a required field
+ IndexName *string `min:"3" type:"string" required:"true"`
+
+ // The current status of the global secondary index:
+ //
+ // * CREATING - The global secondary index is being created.
+ //
+ // * UPDATING - The global secondary index is being updated.
+ //
+ // * DELETING - The global secondary index is being deleted.
+ //
+ // * ACTIVE - The global secondary index is ready for use.
+ IndexStatus *string `type:"string" enum:"IndexStatus"`
+
+ // Auto scaling settings for a global secondary index replica's read capacity
+ // units.
+ ProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
+
+ // The maximum number of strongly consistent reads consumed per second before
+ // DynamoDB returns a ThrottlingException.
+ ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"`
+
+ // Auto scaling settings for a global secondary index replica's write capacity
+ // units.
+ ProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
+
+ // The maximum number of writes consumed per second before DynamoDB returns
+ // a ThrottlingException.
+ ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"`
+}
+
+// String returns the string representation
+func (s ReplicaGlobalSecondaryIndexSettingsDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicaGlobalSecondaryIndexSettingsDescription) GoString() string {
+ return s.String()
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsDescription {
+ s.IndexName = &v
+ return s
+}
+
+// SetIndexStatus sets the IndexStatus field's value.
+func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexStatus(v string) *ReplicaGlobalSecondaryIndexSettingsDescription {
+ s.IndexStatus = &v
+ return s
+}
+
+// SetProvisionedReadCapacityAutoScalingSettings sets the ProvisionedReadCapacityAutoScalingSettings field's value.
+func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexSettingsDescription {
+ s.ProvisionedReadCapacityAutoScalingSettings = v
+ return s
+}
+
+// SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value.
+func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription {
+ s.ProvisionedReadCapacityUnits = &v
+ return s
+}
+
+// SetProvisionedWriteCapacityAutoScalingSettings sets the ProvisionedWriteCapacityAutoScalingSettings field's value.
+func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexSettingsDescription {
+ s.ProvisionedWriteCapacityAutoScalingSettings = v
return s
}
@@ -12364,7 +14967,7 @@ type ReplicaGlobalSecondaryIndexSettingsUpdate struct {
// IndexName is a required field
IndexName *string `min:"3" type:"string" required:"true"`
- // Autoscaling settings for managing a global secondary index replica's read
+ // Auto scaling settings for managing a global secondary index replica's read
// capacity units.
ProvisionedReadCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"`
@@ -12425,11 +15028,67 @@ func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetProvisionedReadCapacityUn
return s
}
+// The specified replica is no longer part of the global table.
+type ReplicaNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ReplicaNotFoundException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicaNotFoundException) GoString() string {
+ return s.String()
+}
+
+func newErrorReplicaNotFoundException(v protocol.ResponseMetadata) error {
+ return &ReplicaNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ReplicaNotFoundException) Code() string {
+ return "ReplicaNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *ReplicaNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ReplicaNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *ReplicaNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ReplicaNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ReplicaNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Represents the properties of a replica.
type ReplicaSettingsDescription struct {
_ struct{} `type:"structure"`
- // The region name of the replica.
+ // The Region name of the replica.
//
// RegionName is a required field
RegionName *string `type:"string" required:"true"`
@@ -12440,7 +15099,7 @@ type ReplicaSettingsDescription struct {
// Replica global secondary index settings for the global table.
ReplicaGlobalSecondaryIndexSettings []*ReplicaGlobalSecondaryIndexSettingsDescription `type:"list"`
- // Autoscaling settings for a global table replica's read capacity units.
+ // Auto scaling settings for a global table replica's read capacity units.
ReplicaProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
// The maximum number of strongly consistent reads consumed per second before
@@ -12449,7 +15108,7 @@ type ReplicaSettingsDescription struct {
// in the Amazon DynamoDB Developer Guide.
ReplicaProvisionedReadCapacityUnits *int64 `type:"long"`
- // AutoScaling settings for a global table replica's write capacity units.
+ // Auto scaling settings for a global table replica's write capacity units.
ReplicaProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
// The maximum number of writes consumed per second before DynamoDB returns
@@ -12458,15 +15117,15 @@ type ReplicaSettingsDescription struct {
// in the Amazon DynamoDB Developer Guide.
ReplicaProvisionedWriteCapacityUnits *int64 `type:"long"`
- // The current state of the region:
+ // The current state of the Region:
//
- // * CREATING - The region is being created.
+ // * CREATING - The Region is being created.
//
- // * UPDATING - The region is being updated.
+ // * UPDATING - The Region is being updated.
//
- // * DELETING - The region is being deleted.
+ // * DELETING - The Region is being deleted.
//
- // * ACTIVE - The region is ready for use.
+ // * ACTIVE - The Region is ready for use.
ReplicaStatus *string `type:"string" enum:"ReplicaStatus"`
}
@@ -12528,11 +15187,11 @@ func (s *ReplicaSettingsDescription) SetReplicaStatus(v string) *ReplicaSettings
return s
}
-// Represents the settings for a global table in a region that will be modified.
+// Represents the settings for a global table in a Region that will be modified.
type ReplicaSettingsUpdate struct {
_ struct{} `type:"structure"`
- // The region of the replica to be added.
+ // The Region of the replica to be added.
//
// RegionName is a required field
RegionName *string `type:"string" required:"true"`
@@ -12541,7 +15200,7 @@ type ReplicaSettingsUpdate struct {
// will be modified.
ReplicaGlobalSecondaryIndexSettingsUpdate []*ReplicaGlobalSecondaryIndexSettingsUpdate `min:"1" type:"list"`
- // Autoscaling settings for managing a global table replica's read capacity
+ // Auto scaling settings for managing a global table replica's read capacity
// units.
ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"`
@@ -12590,93 +15249,346 @@ func (s *ReplicaSettingsUpdate) Validate() error {
}
}
- if invalidParams.Len() > 0 {
- return invalidParams
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetRegionName sets the RegionName field's value.
+func (s *ReplicaSettingsUpdate) SetRegionName(v string) *ReplicaSettingsUpdate {
+ s.RegionName = &v
+ return s
+}
+
+// SetReplicaGlobalSecondaryIndexSettingsUpdate sets the ReplicaGlobalSecondaryIndexSettingsUpdate field's value.
+func (s *ReplicaSettingsUpdate) SetReplicaGlobalSecondaryIndexSettingsUpdate(v []*ReplicaGlobalSecondaryIndexSettingsUpdate) *ReplicaSettingsUpdate {
+ s.ReplicaGlobalSecondaryIndexSettingsUpdate = v
+ return s
+}
+
+// SetReplicaProvisionedReadCapacityAutoScalingSettingsUpdate sets the ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate field's value.
+func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *ReplicaSettingsUpdate {
+ s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate = v
+ return s
+}
+
+// SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value.
+func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsUpdate {
+ s.ReplicaProvisionedReadCapacityUnits = &v
+ return s
+}
+
+// Represents one of the following:
+//
+// * A new replica to be added to an existing global table.
+//
+// * New parameters for an existing replica.
+//
+// * An existing replica to be removed from an existing global table.
+type ReplicaUpdate struct {
+ _ struct{} `type:"structure"`
+
+ // The parameters required for creating a replica on an existing global table.
+ Create *CreateReplicaAction `type:"structure"`
+
+ // The name of the existing replica to be removed.
+ Delete *DeleteReplicaAction `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplicaUpdate) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicaUpdate) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ReplicaUpdate) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ReplicaUpdate"}
+ if s.Create != nil {
+ if err := s.Create.Validate(); err != nil {
+ invalidParams.AddNested("Create", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.Delete != nil {
+ if err := s.Delete.Validate(); err != nil {
+ invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetCreate sets the Create field's value.
+func (s *ReplicaUpdate) SetCreate(v *CreateReplicaAction) *ReplicaUpdate {
+ s.Create = v
+ return s
+}
+
+// SetDelete sets the Delete field's value.
+func (s *ReplicaUpdate) SetDelete(v *DeleteReplicaAction) *ReplicaUpdate {
+ s.Delete = v
+ return s
+}
+
+// Represents one of the following:
+//
+// * A new replica to be added to an existing regional table or global table.
+// This request invokes the CreateTableReplica action in the destination
+// Region.
+//
+// * New parameters for an existing replica. This request invokes the UpdateTable
+// action in the destination Region.
+//
+// * An existing replica to be deleted. The request invokes the DeleteTableReplica
+// action in the destination Region, deleting the replica and all if its
+// items in the destination Region.
+type ReplicationGroupUpdate struct {
+ _ struct{} `type:"structure"`
+
+ // The parameters required for creating a replica for the table.
+ Create *CreateReplicationGroupMemberAction `type:"structure"`
+
+ // The parameters required for deleting a replica for the table.
+ Delete *DeleteReplicationGroupMemberAction `type:"structure"`
+
+ // The parameters required for updating a replica for the table.
+ Update *UpdateReplicationGroupMemberAction `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplicationGroupUpdate) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicationGroupUpdate) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ReplicationGroupUpdate) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ReplicationGroupUpdate"}
+ if s.Create != nil {
+ if err := s.Create.Validate(); err != nil {
+ invalidParams.AddNested("Create", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.Delete != nil {
+ if err := s.Delete.Validate(); err != nil {
+ invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.Update != nil {
+ if err := s.Update.Validate(); err != nil {
+ invalidParams.AddNested("Update", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetCreate sets the Create field's value.
+func (s *ReplicationGroupUpdate) SetCreate(v *CreateReplicationGroupMemberAction) *ReplicationGroupUpdate {
+ s.Create = v
+ return s
+}
+
+// SetDelete sets the Delete field's value.
+func (s *ReplicationGroupUpdate) SetDelete(v *DeleteReplicationGroupMemberAction) *ReplicationGroupUpdate {
+ s.Delete = v
+ return s
+}
+
+// SetUpdate sets the Update field's value.
+func (s *ReplicationGroupUpdate) SetUpdate(v *UpdateReplicationGroupMemberAction) *ReplicationGroupUpdate {
+ s.Update = v
+ return s
+}
+
+// Throughput exceeds the current throughput limit for your account. Please
+// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
+// a limit increase.
+type RequestLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s RequestLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RequestLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorRequestLimitExceeded(v protocol.ResponseMetadata) error {
+ return &RequestLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *RequestLimitExceeded) Code() string {
+ return "RequestLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *RequestLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *RequestLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *RequestLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *RequestLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *RequestLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The operation conflicts with the resource's availability. For example, you
+// attempted to recreate an existing table, or tried to delete a table currently
+// in the CREATING state.
+type ResourceInUseException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // The resource which is being attempted to be changed is in use.
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceInUseException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceInUseException) GoString() string {
+ return s.String()
+}
+
+func newErrorResourceInUseException(v protocol.ResponseMetadata) error {
+ return &ResourceInUseException{
+ RespMetadata: v,
}
- return nil
}
-// SetRegionName sets the RegionName field's value.
-func (s *ReplicaSettingsUpdate) SetRegionName(v string) *ReplicaSettingsUpdate {
- s.RegionName = &v
- return s
+// Code returns the exception type name.
+func (s *ResourceInUseException) Code() string {
+ return "ResourceInUseException"
}
-// SetReplicaGlobalSecondaryIndexSettingsUpdate sets the ReplicaGlobalSecondaryIndexSettingsUpdate field's value.
-func (s *ReplicaSettingsUpdate) SetReplicaGlobalSecondaryIndexSettingsUpdate(v []*ReplicaGlobalSecondaryIndexSettingsUpdate) *ReplicaSettingsUpdate {
- s.ReplicaGlobalSecondaryIndexSettingsUpdate = v
- return s
+// Message returns the exception's message.
+func (s *ResourceInUseException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
}
-// SetReplicaProvisionedReadCapacityAutoScalingSettingsUpdate sets the ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate field's value.
-func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *ReplicaSettingsUpdate {
- s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate = v
- return s
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ResourceInUseException) OrigErr() error {
+ return nil
}
-// SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value.
-func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsUpdate {
- s.ReplicaProvisionedReadCapacityUnits = &v
- return s
+func (s *ResourceInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
-// Represents one of the following:
-//
-// * A new replica to be added to an existing global table.
-//
-// * New parameters for an existing replica.
-//
-// * An existing replica to be removed from an existing global table.
-type ReplicaUpdate struct {
- _ struct{} `type:"structure"`
+// Status code returns the HTTP status code for the request's response error.
+func (s *ResourceInUseException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
- // The parameters required for creating a replica on an existing global table.
- Create *CreateReplicaAction `type:"structure"`
+// RequestID returns the service's response RequestID for request.
+func (s *ResourceInUseException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
- // The name of the existing replica to be removed.
- Delete *DeleteReplicaAction `type:"structure"`
+// The operation tried to access a nonexistent table or index. The resource
+// might not be specified correctly, or its status might not be ACTIVE.
+type ResourceNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // The resource which is being requested does not exist.
+ Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
-func (s ReplicaUpdate) String() string {
+func (s ResourceNotFoundException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ReplicaUpdate) GoString() string {
+func (s ResourceNotFoundException) GoString() string {
return s.String()
}
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicaUpdate) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicaUpdate"}
- if s.Create != nil {
- if err := s.Create.Validate(); err != nil {
- invalidParams.AddNested("Create", err.(request.ErrInvalidParams))
- }
- }
- if s.Delete != nil {
- if err := s.Delete.Validate(); err != nil {
- invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
- }
+func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
+ return &ResourceNotFoundException{
+ RespMetadata: v,
}
+}
- if invalidParams.Len() > 0 {
- return invalidParams
+// Code returns the exception type name.
+func (s *ResourceNotFoundException) Code() string {
+ return "ResourceNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *ResourceNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
}
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ResourceNotFoundException) OrigErr() error {
return nil
}
-// SetCreate sets the Create field's value.
-func (s *ReplicaUpdate) SetCreate(v *CreateReplicaAction) *ReplicaUpdate {
- s.Create = v
- return s
+func (s *ResourceNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
-// SetDelete sets the Delete field's value.
-func (s *ReplicaUpdate) SetDelete(v *DeleteReplicaAction) *ReplicaUpdate {
- s.Delete = v
- return s
+// Status code returns the HTTP status code for the request's response error.
+func (s *ResourceNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ResourceNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
}
// Contains details for the restore.
@@ -12693,10 +15605,10 @@ type RestoreSummary struct {
// RestoreInProgress is a required field
RestoreInProgress *bool `type:"boolean" required:"true"`
- // ARN of the backup from which the table was restored.
+ // The Amazon Resource Name (ARN) of the backup from which the table was restored.
SourceBackupArn *string `min:"37" type:"string"`
- // ARN of the source table of the backup that is being restored.
+ // The ARN of the source table of the backup that is being restored.
SourceTableArn *string `type:"string"`
}
@@ -12742,6 +15654,25 @@ type RestoreTableFromBackupInput struct {
// BackupArn is a required field
BackupArn *string `min:"37" type:"string" required:"true"`
+ // The billing mode of the restored table.
+ BillingModeOverride *string `type:"string" enum:"BillingMode"`
+
+ // List of global secondary indexes for the restored table. The indexes provided
+ // should match existing secondary indexes. You can choose to exclude some or
+ // all of the indexes at the time of restore.
+ GlobalSecondaryIndexOverride []*GlobalSecondaryIndex `type:"list"`
+
+ // List of local secondary indexes for the restored table. The indexes provided
+ // should match existing secondary indexes. You can choose to exclude some or
+ // all of the indexes at the time of restore.
+ LocalSecondaryIndexOverride []*LocalSecondaryIndex `type:"list"`
+
+ // Provisioned throughput settings for the restored table.
+ ProvisionedThroughputOverride *ProvisionedThroughput `type:"structure"`
+
+ // The new server-side encryption settings for the restored table.
+ SSESpecificationOverride *SSESpecification `type:"structure"`
+
// The name of the new table to which the backup must be restored.
//
// TargetTableName is a required field
@@ -12773,6 +15704,31 @@ func (s *RestoreTableFromBackupInput) Validate() error {
if s.TargetTableName != nil && len(*s.TargetTableName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("TargetTableName", 3))
}
+ if s.GlobalSecondaryIndexOverride != nil {
+ for i, v := range s.GlobalSecondaryIndexOverride {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexOverride", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.LocalSecondaryIndexOverride != nil {
+ for i, v := range s.LocalSecondaryIndexOverride {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LocalSecondaryIndexOverride", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.ProvisionedThroughputOverride != nil {
+ if err := s.ProvisionedThroughputOverride.Validate(); err != nil {
+ invalidParams.AddNested("ProvisionedThroughputOverride", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -12786,6 +15742,36 @@ func (s *RestoreTableFromBackupInput) SetBackupArn(v string) *RestoreTableFromBa
return s
}
+// SetBillingModeOverride sets the BillingModeOverride field's value.
+func (s *RestoreTableFromBackupInput) SetBillingModeOverride(v string) *RestoreTableFromBackupInput {
+ s.BillingModeOverride = &v
+ return s
+}
+
+// SetGlobalSecondaryIndexOverride sets the GlobalSecondaryIndexOverride field's value.
+func (s *RestoreTableFromBackupInput) SetGlobalSecondaryIndexOverride(v []*GlobalSecondaryIndex) *RestoreTableFromBackupInput {
+ s.GlobalSecondaryIndexOverride = v
+ return s
+}
+
+// SetLocalSecondaryIndexOverride sets the LocalSecondaryIndexOverride field's value.
+func (s *RestoreTableFromBackupInput) SetLocalSecondaryIndexOverride(v []*LocalSecondaryIndex) *RestoreTableFromBackupInput {
+ s.LocalSecondaryIndexOverride = v
+ return s
+}
+
+// SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value.
+func (s *RestoreTableFromBackupInput) SetProvisionedThroughputOverride(v *ProvisionedThroughput) *RestoreTableFromBackupInput {
+ s.ProvisionedThroughputOverride = v
+ return s
+}
+
+// SetSSESpecificationOverride sets the SSESpecificationOverride field's value.
+func (s *RestoreTableFromBackupInput) SetSSESpecificationOverride(v *SSESpecification) *RestoreTableFromBackupInput {
+ s.SSESpecificationOverride = v
+ return s
+}
+
// SetTargetTableName sets the TargetTableName field's value.
func (s *RestoreTableFromBackupInput) SetTargetTableName(v string) *RestoreTableFromBackupInput {
s.TargetTableName = &v
@@ -12818,13 +15804,34 @@ func (s *RestoreTableFromBackupOutput) SetTableDescription(v *TableDescription)
type RestoreTableToPointInTimeInput struct {
_ struct{} `type:"structure"`
+ // The billing mode of the restored table.
+ BillingModeOverride *string `type:"string" enum:"BillingMode"`
+
+ // List of global secondary indexes for the restored table. The indexes provided
+ // should match existing secondary indexes. You can choose to exclude some or
+ // all of the indexes at the time of restore.
+ GlobalSecondaryIndexOverride []*GlobalSecondaryIndex `type:"list"`
+
+ // List of local secondary indexes for the restored table. The indexes provided
+ // should match existing secondary indexes. You can choose to exclude some or
+ // all of the indexes at the time of restore.
+ LocalSecondaryIndexOverride []*LocalSecondaryIndex `type:"list"`
+
+ // Provisioned throughput settings for the restored table.
+ ProvisionedThroughputOverride *ProvisionedThroughput `type:"structure"`
+
// Time in the past to restore the table to.
RestoreDateTime *time.Time `type:"timestamp"`
+ // The new server-side encryption settings for the restored table.
+ SSESpecificationOverride *SSESpecification `type:"structure"`
+
+ // The DynamoDB table that will be restored. This value is an Amazon Resource
+ // Name (ARN).
+ SourceTableArn *string `type:"string"`
+
// Name of the source table that is being restored.
- //
- // SourceTableName is a required field
- SourceTableName *string `min:"3" type:"string" required:"true"`
+ SourceTableName *string `min:"3" type:"string"`
// The name of the new table to which it must be restored to.
//
@@ -12849,9 +15856,6 @@ func (s RestoreTableToPointInTimeInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *RestoreTableToPointInTimeInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RestoreTableToPointInTimeInput"}
- if s.SourceTableName == nil {
- invalidParams.Add(request.NewErrParamRequired("SourceTableName"))
- }
if s.SourceTableName != nil && len(*s.SourceTableName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("SourceTableName", 3))
}
@@ -12861,6 +15865,31 @@ func (s *RestoreTableToPointInTimeInput) Validate() error {
if s.TargetTableName != nil && len(*s.TargetTableName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("TargetTableName", 3))
}
+ if s.GlobalSecondaryIndexOverride != nil {
+ for i, v := range s.GlobalSecondaryIndexOverride {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexOverride", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.LocalSecondaryIndexOverride != nil {
+ for i, v := range s.LocalSecondaryIndexOverride {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LocalSecondaryIndexOverride", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.ProvisionedThroughputOverride != nil {
+ if err := s.ProvisionedThroughputOverride.Validate(); err != nil {
+ invalidParams.AddNested("ProvisionedThroughputOverride", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -12868,12 +15897,48 @@ func (s *RestoreTableToPointInTimeInput) Validate() error {
return nil
}
+// SetBillingModeOverride sets the BillingModeOverride field's value.
+func (s *RestoreTableToPointInTimeInput) SetBillingModeOverride(v string) *RestoreTableToPointInTimeInput {
+ s.BillingModeOverride = &v
+ return s
+}
+
+// SetGlobalSecondaryIndexOverride sets the GlobalSecondaryIndexOverride field's value.
+func (s *RestoreTableToPointInTimeInput) SetGlobalSecondaryIndexOverride(v []*GlobalSecondaryIndex) *RestoreTableToPointInTimeInput {
+ s.GlobalSecondaryIndexOverride = v
+ return s
+}
+
+// SetLocalSecondaryIndexOverride sets the LocalSecondaryIndexOverride field's value.
+func (s *RestoreTableToPointInTimeInput) SetLocalSecondaryIndexOverride(v []*LocalSecondaryIndex) *RestoreTableToPointInTimeInput {
+ s.LocalSecondaryIndexOverride = v
+ return s
+}
+
+// SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value.
+func (s *RestoreTableToPointInTimeInput) SetProvisionedThroughputOverride(v *ProvisionedThroughput) *RestoreTableToPointInTimeInput {
+ s.ProvisionedThroughputOverride = v
+ return s
+}
+
// SetRestoreDateTime sets the RestoreDateTime field's value.
func (s *RestoreTableToPointInTimeInput) SetRestoreDateTime(v time.Time) *RestoreTableToPointInTimeInput {
s.RestoreDateTime = &v
return s
}
+// SetSSESpecificationOverride sets the SSESpecificationOverride field's value.
+func (s *RestoreTableToPointInTimeInput) SetSSESpecificationOverride(v *SSESpecification) *RestoreTableToPointInTimeInput {
+ s.SSESpecificationOverride = v
+ return s
+}
+
+// SetSourceTableArn sets the SourceTableArn field's value.
+func (s *RestoreTableToPointInTimeInput) SetSourceTableArn(v string) *RestoreTableToPointInTimeInput {
+ s.SourceTableArn = &v
+ return s
+}
+
// SetSourceTableName sets the SourceTableName field's value.
func (s *RestoreTableToPointInTimeInput) SetSourceTableName(v string) *RestoreTableToPointInTimeInput {
s.SourceTableName = &v
@@ -12919,13 +15984,21 @@ func (s *RestoreTableToPointInTimeOutput) SetTableDescription(v *TableDescriptio
type SSEDescription struct {
_ struct{} `type:"structure"`
- // The KMS customer master key (CMK) ARN used for the KMS encryption.
+ // Indicates the time, in UNIX epoch date format, when DynamoDB detected that
+ // the table's AWS KMS key was inaccessible. This attribute will automatically
+ // be cleared when DynamoDB detects that the table's AWS KMS key is accessible
+ // again. DynamoDB will initiate the table archival process when table's AWS
+ // KMS key remains inaccessible for more than seven days from this date.
+ InaccessibleEncryptionDateTime *time.Time `type:"timestamp"`
+
+ // The AWS KMS customer master key (CMK) ARN used for the AWS KMS encryption.
KMSMasterKeyArn *string `type:"string"`
// Server-side encryption type. The only supported value is:
//
- // * KMS - Server-side encryption which uses AWS Key Management Service.
- // Key is stored in your account and is managed by AWS KMS (KMS charges apply).
+ // * KMS - Server-side encryption that uses AWS Key Management Service. The
+ // key is stored in your account and is managed by AWS KMS (AWS KMS charges
+ // apply).
SSEType *string `type:"string" enum:"SSEType"`
// Represents the current state of server-side encryption. The only supported
@@ -12947,6 +16020,12 @@ func (s SSEDescription) GoString() string {
return s.String()
}
+// SetInaccessibleEncryptionDateTime sets the InaccessibleEncryptionDateTime field's value.
+func (s *SSEDescription) SetInaccessibleEncryptionDateTime(v time.Time) *SSEDescription {
+ s.InaccessibleEncryptionDateTime = &v
+ return s
+}
+
// SetKMSMasterKeyArn sets the KMSMasterKeyArn field's value.
func (s *SSEDescription) SetKMSMasterKeyArn(v string) *SSEDescription {
s.KMSMasterKeyArn = &v
@@ -12975,16 +16054,17 @@ type SSESpecification struct {
// (false) or not specified, server-side encryption is set to AWS owned CMK.
Enabled *bool `type:"boolean"`
- // The KMS Customer Master Key (CMK) which should be used for the KMS encryption.
- // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
- // or alias ARN. Note that you should only provide this parameter if the key
- // is different from the default DynamoDB Customer Master Key alias/aws/dynamodb.
+ // The AWS KMS customer master key (CMK) that should be used for the AWS KMS
+ // encryption. To specify a CMK, use its key ID, Amazon Resource Name (ARN),
+ // alias name, or alias ARN. Note that you should only provide this parameter
+ // if the key is different from the default DynamoDB customer master key alias/aws/dynamodb.
KMSMasterKeyId *string `type:"string"`
// Server-side encryption type. The only supported value is:
//
- // * KMS - Server-side encryption which uses AWS Key Management Service.
- // Key is stored in your account and is managed by AWS KMS (KMS charges apply).
+ // * KMS - Server-side encryption that uses AWS Key Management Service. The
+ // key is stored in your account and is managed by AWS KMS (AWS KMS charges
+ // apply).
SSEType *string `type:"string" enum:"SSEType"`
}
@@ -13502,7 +16582,7 @@ type SourceTableDetails struct {
// We recommend using PAY_PER_REQUEST for unpredictable workloads.
BillingMode *string `type:"string" enum:"BillingMode"`
- // Number of items in the table. Please note this is an approximate value.
+ // Number of items in the table. Note that this is an approximate value.
ItemCount *int64 `type:"long"`
// Schema of the table.
@@ -13533,7 +16613,7 @@ type SourceTableDetails struct {
// TableName is a required field
TableName *string `min:"3" type:"string" required:"true"`
- // Size of the table in bytes. Please note this is an approximate value.
+ // Size of the table in bytes. Note that this is an approximate value.
TableSizeBytes *int64 `type:"long"`
}
@@ -13607,7 +16687,7 @@ type SourceTableFeatureDetails struct {
_ struct{} `type:"structure"`
// Represents the GSI properties for the table when the backup was created.
- // It includes the IndexName, KeySchema, Projection and ProvisionedThroughput
+ // It includes the IndexName, KeySchema, Projection, and ProvisionedThroughput
// for the GSIs on the table at the time of backup.
GlobalSecondaryIndexes []*GlobalSecondaryIndexInfo `type:"list"`
@@ -13673,7 +16753,9 @@ type StreamSpecification struct {
// Indicates whether DynamoDB Streams is enabled (true) or disabled (false)
// on the table.
- StreamEnabled *bool `type:"boolean"`
+ //
+ // StreamEnabled is a required field
+ StreamEnabled *bool `type:"boolean" required:"true"`
// When an item in the table is modified, StreamViewType determines what information
// is written to the stream for this table. Valid values for StreamViewType
@@ -13703,6 +16785,19 @@ func (s StreamSpecification) GoString() string {
return s.String()
}
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *StreamSpecification) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "StreamSpecification"}
+ if s.StreamEnabled == nil {
+ invalidParams.Add(request.NewErrParamRequired("StreamEnabled"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
// SetStreamEnabled sets the StreamEnabled field's value.
func (s *StreamSpecification) SetStreamEnabled(v bool) *StreamSpecification {
s.StreamEnabled = &v
@@ -13715,10 +16810,119 @@ func (s *StreamSpecification) SetStreamViewType(v string) *StreamSpecification {
return s
}
+// A target table with the specified name already exists.
+type TableAlreadyExistsException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s TableAlreadyExistsException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TableAlreadyExistsException) GoString() string {
+ return s.String()
+}
+
+func newErrorTableAlreadyExistsException(v protocol.ResponseMetadata) error {
+ return &TableAlreadyExistsException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TableAlreadyExistsException) Code() string {
+ return "TableAlreadyExistsException"
+}
+
+// Message returns the exception's message.
+func (s *TableAlreadyExistsException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TableAlreadyExistsException) OrigErr() error {
+ return nil
+}
+
+func (s *TableAlreadyExistsException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TableAlreadyExistsException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TableAlreadyExistsException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Represents the auto scaling configuration for a global table.
+type TableAutoScalingDescription struct {
+ _ struct{} `type:"structure"`
+
+ // Represents replicas of the global table.
+ Replicas []*ReplicaAutoScalingDescription `type:"list"`
+
+ // The name of the table.
+ TableName *string `min:"3" type:"string"`
+
+ // The current state of the table:
+ //
+ // * CREATING - The table is being created.
+ //
+ // * UPDATING - The table is being updated.
+ //
+ // * DELETING - The table is being deleted.
+ //
+ // * ACTIVE - The table is ready for use.
+ TableStatus *string `type:"string" enum:"TableStatus"`
+}
+
+// String returns the string representation
+func (s TableAutoScalingDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TableAutoScalingDescription) GoString() string {
+ return s.String()
+}
+
+// SetReplicas sets the Replicas field's value.
+func (s *TableAutoScalingDescription) SetReplicas(v []*ReplicaAutoScalingDescription) *TableAutoScalingDescription {
+ s.Replicas = v
+ return s
+}
+
+// SetTableName sets the TableName field's value.
+func (s *TableAutoScalingDescription) SetTableName(v string) *TableAutoScalingDescription {
+ s.TableName = &v
+ return s
+}
+
+// SetTableStatus sets the TableStatus field's value.
+func (s *TableAutoScalingDescription) SetTableStatus(v string) *TableAutoScalingDescription {
+ s.TableStatus = &v
+ return s
+}
+
// Represents the properties of a table.
type TableDescription struct {
_ struct{} `type:"structure"`
+ // Contains information about the table archive.
+ ArchivalSummary *ArchivalSummary `type:"structure"`
+
// An array of AttributeDefinition objects. Each of these objects describes
// one attribute in the table and index key schema.
//
@@ -13741,9 +16945,14 @@ type TableDescription struct {
//
// * Backfilling - If true, then the index is currently in the backfilling
// phase. Backfilling occurs only when a new global secondary index is added
- // to the table; it is the process by which DynamoDB populates the new index
+ // to the table. It is the process by which DynamoDB populates the new index
// with data from the table. (This attribute does not appear for indexes
- // that were created during a CreateTable operation.)
+ // that were created during a CreateTable operation.) You can delete an index
+ // that is being created during the Backfilling phase when IndexStatus is
+ // set to CREATING and Backfilling is true. You can't delete the index that
+ // is being created when IndexStatus is set to CREATING and Backfilling is
+ // false. (This attribute does not appear for indexes that were created during
+ // a CreateTable operation.)
//
// * IndexName - The name of the global secondary index.
//
@@ -13769,7 +16978,7 @@ type TableDescription struct {
// specification is composed of: ProjectionType - One of the following: KEYS_ONLY
// - Only the index and primary keys are projected into the index. INCLUDE
// - Only the specified table attributes are projected into the index. The
- // list of projected attributes are in NonKeyAttributes. ALL - All of the
+ // list of projected attributes is in NonKeyAttributes. ALL - All of the
// table attributes are projected into the index. NonKeyAttributes - A list
// of one or more non-key attribute names that are projected into the secondary
// index. The total count of attributes provided in NonKeyAttributes, summed
@@ -13785,6 +16994,10 @@ type TableDescription struct {
// be returned.
GlobalSecondaryIndexes []*GlobalSecondaryIndexDescription `type:"list"`
+ // Represents the version of global tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html)
+ // in use, if the table is replicated across AWS Regions.
+ GlobalTableVersion *string `type:"string"`
+
// The number of items in the specified table. DynamoDB updates this value approximately
// every six hours. Recent changes might not be reflected in this value.
ItemCount *int64 `type:"long"`
@@ -13817,11 +17030,11 @@ type TableDescription struct {
// However, the combination of the following three elements is guaranteed to
// be unique:
//
- // * the AWS customer ID.
+ // * AWS customer ID
//
- // * the table name.
+ // * Table name
//
- // * the StreamLabel.
+ // * StreamLabel
LatestStreamLabel *string `type:"string"`
// Represents one or more local secondary indexes on the table. Each index is
@@ -13842,7 +17055,7 @@ type TableDescription struct {
// specification is composed of: ProjectionType - One of the following: KEYS_ONLY
// - Only the index and primary keys are projected into the index. INCLUDE
// - Only the specified table attributes are projected into the index. The
- // list of projected attributes are in NonKeyAttributes. ALL - All of the
+ // list of projected attributes is in NonKeyAttributes. ALL - All of the
// table attributes are projected into the index. NonKeyAttributes - A list
// of one or more non-key attribute names that are projected into the secondary
// index. The total count of attributes provided in NonKeyAttributes, summed
@@ -13866,6 +17079,9 @@ type TableDescription struct {
// write capacity units, along with data about increases and decreases.
ProvisionedThroughput *ProvisionedThroughputDescription `type:"structure"`
+ // Represents replicas of the table.
+ Replicas []*ReplicaDescription `type:"list"`
+
// Contains details for the restore.
RestoreSummary *RestoreSummary `type:"structure"`
@@ -13895,9 +17111,20 @@ type TableDescription struct {
//
// * UPDATING - The table is being updated.
//
- // * DELETING - The table is being deleted.
+ // * DELETING - The table is being deleted.
+ //
+ // * ACTIVE - The table is ready for use.
+ //
+ // * INACCESSIBLE_ENCRYPTION_CREDENTIALS - The AWS KMS key used to encrypt
+ // the table in inaccessible. Table operations may fail due to failure to
+ // use the AWS KMS key. DynamoDB will initiate the table archival process
+ // when a table's AWS KMS key remains inaccessible for more than seven days.
+ //
+ // * ARCHIVING - The table is being archived. Operations are not allowed
+ // until archival is complete.
//
- // * ACTIVE - The table is ready for use.
+ // * ARCHIVED - The table has been archived. See the ArchivalReason for more
+ // information.
TableStatus *string `type:"string" enum:"TableStatus"`
}
@@ -13911,6 +17138,12 @@ func (s TableDescription) GoString() string {
return s.String()
}
+// SetArchivalSummary sets the ArchivalSummary field's value.
+func (s *TableDescription) SetArchivalSummary(v *ArchivalSummary) *TableDescription {
+ s.ArchivalSummary = v
+ return s
+}
+
// SetAttributeDefinitions sets the AttributeDefinitions field's value.
func (s *TableDescription) SetAttributeDefinitions(v []*AttributeDefinition) *TableDescription {
s.AttributeDefinitions = v
@@ -13935,6 +17168,12 @@ func (s *TableDescription) SetGlobalSecondaryIndexes(v []*GlobalSecondaryIndexDe
return s
}
+// SetGlobalTableVersion sets the GlobalTableVersion field's value.
+func (s *TableDescription) SetGlobalTableVersion(v string) *TableDescription {
+ s.GlobalTableVersion = &v
+ return s
+}
+
// SetItemCount sets the ItemCount field's value.
func (s *TableDescription) SetItemCount(v int64) *TableDescription {
s.ItemCount = &v
@@ -13971,6 +17210,12 @@ func (s *TableDescription) SetProvisionedThroughput(v *ProvisionedThroughputDesc
return s
}
+// SetReplicas sets the Replicas field's value.
+func (s *TableDescription) SetReplicas(v []*ReplicaDescription) *TableDescription {
+ s.Replicas = v
+ return s
+}
+
// SetRestoreSummary sets the RestoreSummary field's value.
func (s *TableDescription) SetRestoreSummary(v *RestoreSummary) *TableDescription {
s.RestoreSummary = v
@@ -14019,6 +17264,119 @@ func (s *TableDescription) SetTableStatus(v string) *TableDescription {
return s
}
+// A target table with the specified name is either being created or deleted.
+type TableInUseException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s TableInUseException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TableInUseException) GoString() string {
+ return s.String()
+}
+
+func newErrorTableInUseException(v protocol.ResponseMetadata) error {
+ return &TableInUseException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TableInUseException) Code() string {
+ return "TableInUseException"
+}
+
+// Message returns the exception's message.
+func (s *TableInUseException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TableInUseException) OrigErr() error {
+ return nil
+}
+
+func (s *TableInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TableInUseException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TableInUseException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// A source table with the name TableName does not currently exist within the
+// subscriber's account.
+type TableNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s TableNotFoundException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TableNotFoundException) GoString() string {
+ return s.String()
+}
+
+func newErrorTableNotFoundException(v protocol.ResponseMetadata) error {
+ return &TableNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TableNotFoundException) Code() string {
+ return "TableNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *TableNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TableNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *TableNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TableNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TableNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Describes a tag. A tag is a key-value pair. You can add up to 50 tags to
// a single DynamoDB table.
//
@@ -14646,6 +18004,261 @@ func (s *TransactWriteItemsOutput) SetItemCollectionMetrics(v map[string][]*Item
return s
}
+// The entire transaction request was canceled.
+//
+// DynamoDB cancels a TransactWriteItems request under the following circumstances:
+//
+// * A condition in one of the condition expressions is not met.
+//
+// * A table in the TransactWriteItems request is in a different account
+// or region.
+//
+// * More than one action in the TransactWriteItems operation targets the
+// same item.
+//
+// * There is insufficient provisioned capacity for the transaction to be
+// completed.
+//
+// * An item size becomes too large (larger than 400 KB), or a local secondary
+// index (LSI) becomes too large, or a similar validation error occurs because
+// of changes made by the transaction.
+//
+// * There is a user error, such as an invalid data format.
+//
+// DynamoDB cancels a TransactGetItems request under the following circumstances:
+//
+// * There is an ongoing TransactGetItems operation that conflicts with a
+// concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request.
+// In this case the TransactGetItems operation fails with a TransactionCanceledException.
+//
+// * A table in the TransactGetItems request is in a different account or
+// region.
+//
+// * There is insufficient provisioned capacity for the transaction to be
+// completed.
+//
+// * There is a user error, such as an invalid data format.
+//
+// If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons
+// property. This property is not set for other languages. Transaction cancellation
+// reasons are ordered in the order of requested items, if an item has no error
+// it will have NONE code and Null message.
+//
+// Cancellation reason codes and possible error messages:
+//
+// * No Errors: Code: NONE Message: null
+//
+// * Conditional Check Failed: Code: ConditionalCheckFailed Message: The
+// conditional request failed.
+//
+// * Item Collection Size Limit Exceeded: Code: ItemCollectionSizeLimitExceeded
+// Message: Collection size exceeded.
+//
+// * Transaction Conflict: Code: TransactionConflict Message: Transaction
+// is ongoing for the item.
+//
+// * Provisioned Throughput Exceeded: Code: ProvisionedThroughputExceeded
+// Messages: The level of configured provisioned throughput for the table
+// was exceeded. Consider increasing your provisioning level with the UpdateTable
+// API. This Message is received when provisioned throughput is exceeded
+// is on a provisioned DynamoDB table. The level of configured provisioned
+// throughput for one or more global secondary indexes of the table was exceeded.
+// Consider increasing your provisioning level for the under-provisioned
+// global secondary indexes with the UpdateTable API. This message is returned
+// when provisioned throughput is exceeded is on a provisioned GSI.
+//
+// * Throttling Error: Code: ThrottlingError Messages: Throughput exceeds
+// the current capacity of your table or index. DynamoDB is automatically
+// scaling your table or index so please try again shortly. If exceptions
+// persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html.
+// This message is returned when writes get throttled on an On-Demand table
+// as DynamoDB is automatically scaling the table. Throughput exceeds the
+// current capacity for one or more global secondary indexes. DynamoDB is
+// automatically scaling your index so please try again shortly. This message
+// is returned when when writes get throttled on an On-Demand GSI as DynamoDB
+// is automatically scaling the GSI.
+//
+// * Validation Error: Code: ValidationError Messages: One or more parameter
+// values were invalid. The update expression attempted to update the secondary
+// index key beyond allowed size limits. The update expression attempted
+// to update the secondary index key to unsupported type. An operand in the
+// update expression has an incorrect data type. Item size to update has
+// exceeded the maximum allowed size. Number overflow. Attempting to store
+// a number with magnitude larger than supported range. Type mismatch for
+// attribute to update. Nesting Levels have exceeded supported limits. The
+// document path provided in the update expression is invalid for update.
+// The provided expression refers to an attribute that does not exist in
+// the item.
+type TransactionCanceledException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // A list of cancellation reasons.
+ CancellationReasons []*CancellationReason `min:"1" type:"list"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s TransactionCanceledException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TransactionCanceledException) GoString() string {
+ return s.String()
+}
+
+func newErrorTransactionCanceledException(v protocol.ResponseMetadata) error {
+ return &TransactionCanceledException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TransactionCanceledException) Code() string {
+ return "TransactionCanceledException"
+}
+
+// Message returns the exception's message.
+func (s *TransactionCanceledException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TransactionCanceledException) OrigErr() error {
+ return nil
+}
+
+func (s *TransactionCanceledException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TransactionCanceledException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TransactionCanceledException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Operation was rejected because there is an ongoing transaction for the item.
+type TransactionConflictException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s TransactionConflictException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TransactionConflictException) GoString() string {
+ return s.String()
+}
+
+func newErrorTransactionConflictException(v protocol.ResponseMetadata) error {
+ return &TransactionConflictException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TransactionConflictException) Code() string {
+ return "TransactionConflictException"
+}
+
+// Message returns the exception's message.
+func (s *TransactionConflictException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TransactionConflictException) OrigErr() error {
+ return nil
+}
+
+func (s *TransactionConflictException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TransactionConflictException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TransactionConflictException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The transaction with the given request token is already in progress.
+type TransactionInProgressException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s TransactionInProgressException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TransactionInProgressException) GoString() string {
+ return s.String()
+}
+
+func newErrorTransactionInProgressException(v protocol.ResponseMetadata) error {
+ return &TransactionInProgressException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TransactionInProgressException) Code() string {
+ return "TransactionInProgressException"
+}
+
+// Message returns the exception's message.
+func (s *TransactionInProgressException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TransactionInProgressException) OrigErr() error {
+ return nil
+}
+
+func (s *TransactionInProgressException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TransactionInProgressException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TransactionInProgressException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
type UntagResourceInput struct {
_ struct{} `type:"structure"`
@@ -14815,25 +18428,112 @@ func (s *Update) SetReturnValuesOnConditionCheckFailure(v string) *Update {
return s
}
-// SetTableName sets the TableName field's value.
-func (s *Update) SetTableName(v string) *Update {
- s.TableName = &v
- return s
+// SetTableName sets the TableName field's value.
+func (s *Update) SetTableName(v string) *Update {
+ s.TableName = &v
+ return s
+}
+
+// SetUpdateExpression sets the UpdateExpression field's value.
+func (s *Update) SetUpdateExpression(v string) *Update {
+ s.UpdateExpression = &v
+ return s
+}
+
+type UpdateContinuousBackupsInput struct {
+ _ struct{} `type:"structure"`
+
+ // Represents the settings used to enable point in time recovery.
+ //
+ // PointInTimeRecoverySpecification is a required field
+ PointInTimeRecoverySpecification *PointInTimeRecoverySpecification `type:"structure" required:"true"`
+
+ // The name of the table.
+ //
+ // TableName is a required field
+ TableName *string `min:"3" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s UpdateContinuousBackupsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateContinuousBackupsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *UpdateContinuousBackupsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "UpdateContinuousBackupsInput"}
+ if s.PointInTimeRecoverySpecification == nil {
+ invalidParams.Add(request.NewErrParamRequired("PointInTimeRecoverySpecification"))
+ }
+ if s.TableName == nil {
+ invalidParams.Add(request.NewErrParamRequired("TableName"))
+ }
+ if s.TableName != nil && len(*s.TableName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
+ }
+ if s.PointInTimeRecoverySpecification != nil {
+ if err := s.PointInTimeRecoverySpecification.Validate(); err != nil {
+ invalidParams.AddNested("PointInTimeRecoverySpecification", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetPointInTimeRecoverySpecification sets the PointInTimeRecoverySpecification field's value.
+func (s *UpdateContinuousBackupsInput) SetPointInTimeRecoverySpecification(v *PointInTimeRecoverySpecification) *UpdateContinuousBackupsInput {
+ s.PointInTimeRecoverySpecification = v
+ return s
+}
+
+// SetTableName sets the TableName field's value.
+func (s *UpdateContinuousBackupsInput) SetTableName(v string) *UpdateContinuousBackupsInput {
+ s.TableName = &v
+ return s
+}
+
+type UpdateContinuousBackupsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Represents the continuous backups and point in time recovery settings on
+ // the table.
+ ContinuousBackupsDescription *ContinuousBackupsDescription `type:"structure"`
+}
+
+// String returns the string representation
+func (s UpdateContinuousBackupsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateContinuousBackupsOutput) GoString() string {
+ return s.String()
}
-// SetUpdateExpression sets the UpdateExpression field's value.
-func (s *Update) SetUpdateExpression(v string) *Update {
- s.UpdateExpression = &v
+// SetContinuousBackupsDescription sets the ContinuousBackupsDescription field's value.
+func (s *UpdateContinuousBackupsOutput) SetContinuousBackupsDescription(v *ContinuousBackupsDescription) *UpdateContinuousBackupsOutput {
+ s.ContinuousBackupsDescription = v
return s
}
-type UpdateContinuousBackupsInput struct {
+type UpdateContributorInsightsInput struct {
_ struct{} `type:"structure"`
- // Represents the settings used to enable point in time recovery.
+ // Represents the contributor insights action.
//
- // PointInTimeRecoverySpecification is a required field
- PointInTimeRecoverySpecification *PointInTimeRecoverySpecification `type:"structure" required:"true"`
+ // ContributorInsightsAction is a required field
+ ContributorInsightsAction *string `type:"string" required:"true" enum:"ContributorInsightsAction"`
+
+ // The global secondary index name, if applicable.
+ IndexName *string `min:"3" type:"string"`
// The name of the table.
//
@@ -14842,20 +18542,23 @@ type UpdateContinuousBackupsInput struct {
}
// String returns the string representation
-func (s UpdateContinuousBackupsInput) String() string {
+func (s UpdateContributorInsightsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s UpdateContinuousBackupsInput) GoString() string {
+func (s UpdateContributorInsightsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *UpdateContinuousBackupsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateContinuousBackupsInput"}
- if s.PointInTimeRecoverySpecification == nil {
- invalidParams.Add(request.NewErrParamRequired("PointInTimeRecoverySpecification"))
+func (s *UpdateContributorInsightsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "UpdateContributorInsightsInput"}
+ if s.ContributorInsightsAction == nil {
+ invalidParams.Add(request.NewErrParamRequired("ContributorInsightsAction"))
+ }
+ if s.IndexName != nil && len(*s.IndexName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
}
if s.TableName == nil {
invalidParams.Add(request.NewErrParamRequired("TableName"))
@@ -14863,11 +18566,6 @@ func (s *UpdateContinuousBackupsInput) Validate() error {
if s.TableName != nil && len(*s.TableName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
}
- if s.PointInTimeRecoverySpecification != nil {
- if err := s.PointInTimeRecoverySpecification.Validate(); err != nil {
- invalidParams.AddNested("PointInTimeRecoverySpecification", err.(request.ErrInvalidParams))
- }
- }
if invalidParams.Len() > 0 {
return invalidParams
@@ -14875,39 +18573,62 @@ func (s *UpdateContinuousBackupsInput) Validate() error {
return nil
}
-// SetPointInTimeRecoverySpecification sets the PointInTimeRecoverySpecification field's value.
-func (s *UpdateContinuousBackupsInput) SetPointInTimeRecoverySpecification(v *PointInTimeRecoverySpecification) *UpdateContinuousBackupsInput {
- s.PointInTimeRecoverySpecification = v
+// SetContributorInsightsAction sets the ContributorInsightsAction field's value.
+func (s *UpdateContributorInsightsInput) SetContributorInsightsAction(v string) *UpdateContributorInsightsInput {
+ s.ContributorInsightsAction = &v
+ return s
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *UpdateContributorInsightsInput) SetIndexName(v string) *UpdateContributorInsightsInput {
+ s.IndexName = &v
return s
}
// SetTableName sets the TableName field's value.
-func (s *UpdateContinuousBackupsInput) SetTableName(v string) *UpdateContinuousBackupsInput {
+func (s *UpdateContributorInsightsInput) SetTableName(v string) *UpdateContributorInsightsInput {
s.TableName = &v
return s
}
-type UpdateContinuousBackupsOutput struct {
+type UpdateContributorInsightsOutput struct {
_ struct{} `type:"structure"`
- // Represents the continuous backups and point in time recovery settings on
- // the table.
- ContinuousBackupsDescription *ContinuousBackupsDescription `type:"structure"`
+ // The status of contributor insights
+ ContributorInsightsStatus *string `type:"string" enum:"ContributorInsightsStatus"`
+
+ // The name of the global secondary index, if applicable.
+ IndexName *string `min:"3" type:"string"`
+
+ // The name of the table.
+ TableName *string `min:"3" type:"string"`
}
// String returns the string representation
-func (s UpdateContinuousBackupsOutput) String() string {
+func (s UpdateContributorInsightsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s UpdateContinuousBackupsOutput) GoString() string {
+func (s UpdateContributorInsightsOutput) GoString() string {
return s.String()
}
-// SetContinuousBackupsDescription sets the ContinuousBackupsDescription field's value.
-func (s *UpdateContinuousBackupsOutput) SetContinuousBackupsDescription(v *ContinuousBackupsDescription) *UpdateContinuousBackupsOutput {
- s.ContinuousBackupsDescription = v
+// SetContributorInsightsStatus sets the ContributorInsightsStatus field's value.
+func (s *UpdateContributorInsightsOutput) SetContributorInsightsStatus(v string) *UpdateContributorInsightsOutput {
+ s.ContributorInsightsStatus = &v
+ return s
+}
+
+// SetIndexName sets the IndexName field's value.
+func (s *UpdateContributorInsightsOutput) SetIndexName(v string) *UpdateContributorInsightsOutput {
+ s.IndexName = &v
+ return s
+}
+
+// SetTableName sets the TableName field's value.
+func (s *UpdateContributorInsightsOutput) SetTableName(v string) *UpdateContributorInsightsOutput {
+ s.TableName = &v
return s
}
@@ -15071,6 +18792,12 @@ type UpdateGlobalTableSettingsInput struct {
// The billing mode of the global table. If GlobalTableBillingMode is not specified,
// the global table defaults to PROVISIONED capacity billing mode.
+ //
+ // * PROVISIONED - We recommend using PROVISIONED for predictable workloads.
+ // PROVISIONED sets the billing mode to Provisioned Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual).
+ //
+ // * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable
+ // workloads. PAY_PER_REQUEST sets the billing mode to On-Demand Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand).
GlobalTableBillingMode *string `type:"string" enum:"BillingMode"`
// Represents the settings of a global secondary index for a global table that
@@ -15607,6 +19334,95 @@ func (s *UpdateItemOutput) SetItemCollectionMetrics(v *ItemCollectionMetrics) *U
return s
}
+// Represents a replica to be modified.
+type UpdateReplicationGroupMemberAction struct {
+ _ struct{} `type:"structure"`
+
+ // Replica-specific global secondary index settings.
+ GlobalSecondaryIndexes []*ReplicaGlobalSecondaryIndex `min:"1" type:"list"`
+
+ // The AWS KMS customer master key (CMK) of the replica that should be used
+ // for AWS KMS encryption. To specify a CMK, use its key ID, Amazon Resource
+ // Name (ARN), alias name, or alias ARN. Note that you should only provide this
+ // parameter if the key is different from the default DynamoDB KMS master key
+ // alias/aws/dynamodb.
+ KMSMasterKeyId *string `type:"string"`
+
+ // Replica-specific provisioned throughput. If not specified, uses the source
+ // table's provisioned throughput settings.
+ ProvisionedThroughputOverride *ProvisionedThroughputOverride `type:"structure"`
+
+ // The Region where the replica exists.
+ //
+ // RegionName is a required field
+ RegionName *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s UpdateReplicationGroupMemberAction) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateReplicationGroupMemberAction) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *UpdateReplicationGroupMemberAction) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "UpdateReplicationGroupMemberAction"}
+ if s.GlobalSecondaryIndexes != nil && len(s.GlobalSecondaryIndexes) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("GlobalSecondaryIndexes", 1))
+ }
+ if s.RegionName == nil {
+ invalidParams.Add(request.NewErrParamRequired("RegionName"))
+ }
+ if s.GlobalSecondaryIndexes != nil {
+ for i, v := range s.GlobalSecondaryIndexes {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexes", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.ProvisionedThroughputOverride != nil {
+ if err := s.ProvisionedThroughputOverride.Validate(); err != nil {
+ invalidParams.AddNested("ProvisionedThroughputOverride", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value.
+func (s *UpdateReplicationGroupMemberAction) SetGlobalSecondaryIndexes(v []*ReplicaGlobalSecondaryIndex) *UpdateReplicationGroupMemberAction {
+ s.GlobalSecondaryIndexes = v
+ return s
+}
+
+// SetKMSMasterKeyId sets the KMSMasterKeyId field's value.
+func (s *UpdateReplicationGroupMemberAction) SetKMSMasterKeyId(v string) *UpdateReplicationGroupMemberAction {
+ s.KMSMasterKeyId = &v
+ return s
+}
+
+// SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value.
+func (s *UpdateReplicationGroupMemberAction) SetProvisionedThroughputOverride(v *ProvisionedThroughputOverride) *UpdateReplicationGroupMemberAction {
+ s.ProvisionedThroughputOverride = v
+ return s
+}
+
+// SetRegionName sets the RegionName field's value.
+func (s *UpdateReplicationGroupMemberAction) SetRegionName(v string) *UpdateReplicationGroupMemberAction {
+ s.RegionName = &v
+ return s
+}
+
// Represents the input of an UpdateTable operation.
type UpdateTableInput struct {
_ struct{} `type:"structure"`
@@ -15622,11 +19438,11 @@ type UpdateTableInput struct {
// values are estimated based on the consumed read and write capacity of your
// table and global secondary indexes over the past 30 minutes.
//
- // * PROVISIONED - Sets the billing mode to PROVISIONED. We recommend using
- // PROVISIONED for predictable workloads.
+ // * PROVISIONED - We recommend using PROVISIONED for predictable workloads.
+ // PROVISIONED sets the billing mode to Provisioned Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual).
//
- // * PAY_PER_REQUEST - Sets the billing mode to PAY_PER_REQUEST. We recommend
- // using PAY_PER_REQUEST for unpredictable workloads.
+ // * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable
+ // workloads. PAY_PER_REQUEST sets the billing mode to On-Demand Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand).
BillingMode *string `type:"string" enum:"BillingMode"`
// An array of one or more global secondary indexes for the table. For each
@@ -15639,6 +19455,9 @@ type UpdateTableInput struct {
//
// * Delete - remove a global secondary index from the table.
//
+ // You can create or delete only one global secondary index per UpdateTable
+ // operation.
+ //
// For more information, see Managing Global Secondary Indexes (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html)
// in the Amazon DynamoDB Developer Guide.
GlobalSecondaryIndexUpdates []*GlobalSecondaryIndexUpdate `type:"list"`
@@ -15646,6 +19465,12 @@ type UpdateTableInput struct {
// The new provisioned throughput settings for the specified table or index.
ProvisionedThroughput *ProvisionedThroughput `type:"structure"`
+ // A list of replica update actions (create, delete, or update) for the table.
+ //
+ // This property only applies to Version 2019.11.21 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html)
+ // of global tables.
+ ReplicaUpdates []*ReplicationGroupUpdate `min:"1" type:"list"`
+
// The new server-side encryption settings for the specified table.
SSESpecification *SSESpecification `type:"structure"`
@@ -15675,6 +19500,9 @@ func (s UpdateTableInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateTableInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateTableInput"}
+ if s.ReplicaUpdates != nil && len(s.ReplicaUpdates) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ReplicaUpdates", 1))
+ }
if s.TableName == nil {
invalidParams.Add(request.NewErrParamRequired("TableName"))
}
@@ -15706,6 +19534,21 @@ func (s *UpdateTableInput) Validate() error {
invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams))
}
}
+ if s.ReplicaUpdates != nil {
+ for i, v := range s.ReplicaUpdates {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaUpdates", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.StreamSpecification != nil {
+ if err := s.StreamSpecification.Validate(); err != nil {
+ invalidParams.AddNested("StreamSpecification", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -15737,6 +19580,12 @@ func (s *UpdateTableInput) SetProvisionedThroughput(v *ProvisionedThroughput) *U
return s
}
+// SetReplicaUpdates sets the ReplicaUpdates field's value.
+func (s *UpdateTableInput) SetReplicaUpdates(v []*ReplicationGroupUpdate) *UpdateTableInput {
+ s.ReplicaUpdates = v
+ return s
+}
+
// SetSSESpecification sets the SSESpecification field's value.
func (s *UpdateTableInput) SetSSESpecification(v *SSESpecification) *UpdateTableInput {
s.SSESpecification = v
@@ -15779,6 +19628,131 @@ func (s *UpdateTableOutput) SetTableDescription(v *TableDescription) *UpdateTabl
return s
}
+type UpdateTableReplicaAutoScalingInput struct {
+ _ struct{} `type:"structure"`
+
+ // Represents the auto scaling settings of the global secondary indexes of the
+ // replica to be updated.
+ GlobalSecondaryIndexUpdates []*GlobalSecondaryIndexAutoScalingUpdate `min:"1" type:"list"`
+
+ // Represents the auto scaling settings to be modified for a global table or
+ // global secondary index.
+ ProvisionedWriteCapacityAutoScalingUpdate *AutoScalingSettingsUpdate `type:"structure"`
+
+ // Represents the auto scaling settings of replicas of the table that will be
+ // modified.
+ ReplicaUpdates []*ReplicaAutoScalingUpdate `min:"1" type:"list"`
+
+ // The name of the global table to be updated.
+ //
+ // TableName is a required field
+ TableName *string `min:"3" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s UpdateTableReplicaAutoScalingInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateTableReplicaAutoScalingInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *UpdateTableReplicaAutoScalingInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "UpdateTableReplicaAutoScalingInput"}
+ if s.GlobalSecondaryIndexUpdates != nil && len(s.GlobalSecondaryIndexUpdates) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("GlobalSecondaryIndexUpdates", 1))
+ }
+ if s.ReplicaUpdates != nil && len(s.ReplicaUpdates) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ReplicaUpdates", 1))
+ }
+ if s.TableName == nil {
+ invalidParams.Add(request.NewErrParamRequired("TableName"))
+ }
+ if s.TableName != nil && len(*s.TableName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
+ }
+ if s.GlobalSecondaryIndexUpdates != nil {
+ for i, v := range s.GlobalSecondaryIndexUpdates {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexUpdates", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.ProvisionedWriteCapacityAutoScalingUpdate != nil {
+ if err := s.ProvisionedWriteCapacityAutoScalingUpdate.Validate(); err != nil {
+ invalidParams.AddNested("ProvisionedWriteCapacityAutoScalingUpdate", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.ReplicaUpdates != nil {
+ for i, v := range s.ReplicaUpdates {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaUpdates", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetGlobalSecondaryIndexUpdates sets the GlobalSecondaryIndexUpdates field's value.
+func (s *UpdateTableReplicaAutoScalingInput) SetGlobalSecondaryIndexUpdates(v []*GlobalSecondaryIndexAutoScalingUpdate) *UpdateTableReplicaAutoScalingInput {
+ s.GlobalSecondaryIndexUpdates = v
+ return s
+}
+
+// SetProvisionedWriteCapacityAutoScalingUpdate sets the ProvisionedWriteCapacityAutoScalingUpdate field's value.
+func (s *UpdateTableReplicaAutoScalingInput) SetProvisionedWriteCapacityAutoScalingUpdate(v *AutoScalingSettingsUpdate) *UpdateTableReplicaAutoScalingInput {
+ s.ProvisionedWriteCapacityAutoScalingUpdate = v
+ return s
+}
+
+// SetReplicaUpdates sets the ReplicaUpdates field's value.
+func (s *UpdateTableReplicaAutoScalingInput) SetReplicaUpdates(v []*ReplicaAutoScalingUpdate) *UpdateTableReplicaAutoScalingInput {
+ s.ReplicaUpdates = v
+ return s
+}
+
+// SetTableName sets the TableName field's value.
+func (s *UpdateTableReplicaAutoScalingInput) SetTableName(v string) *UpdateTableReplicaAutoScalingInput {
+ s.TableName = &v
+ return s
+}
+
+type UpdateTableReplicaAutoScalingOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Returns information about the auto scaling settings of a table with replicas.
+ TableAutoScalingDescription *TableAutoScalingDescription `type:"structure"`
+}
+
+// String returns the string representation
+func (s UpdateTableReplicaAutoScalingOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateTableReplicaAutoScalingOutput) GoString() string {
+ return s.String()
+}
+
+// SetTableAutoScalingDescription sets the TableAutoScalingDescription field's value.
+func (s *UpdateTableReplicaAutoScalingOutput) SetTableAutoScalingDescription(v *TableAutoScalingDescription) *UpdateTableReplicaAutoScalingOutput {
+ s.TableAutoScalingDescription = v
+ return s
+}
+
// Represents the input of an UpdateTimeToLive operation.
type UpdateTimeToLiveInput struct {
_ struct{} `type:"structure"`
@@ -15866,8 +19840,8 @@ func (s *UpdateTimeToLiveOutput) SetTimeToLiveSpecification(v *TimeToLiveSpecifi
// Represents an operation to perform - either DeleteItem or PutItem. You can
// only request one of these operations, not both, in a single WriteRequest.
-// If you do need to perform both of these operations, you will need to provide
-// two separate WriteRequest objects.
+// If you do need to perform both of these operations, you need to provide two
+// separate WriteRequest objects.
type WriteRequest struct {
_ struct{} `type:"structure"`
@@ -16012,6 +19986,31 @@ const (
ContinuousBackupsStatusDisabled = "DISABLED"
)
+const (
+ // ContributorInsightsActionEnable is a ContributorInsightsAction enum value
+ ContributorInsightsActionEnable = "ENABLE"
+
+ // ContributorInsightsActionDisable is a ContributorInsightsAction enum value
+ ContributorInsightsActionDisable = "DISABLE"
+)
+
+const (
+ // ContributorInsightsStatusEnabling is a ContributorInsightsStatus enum value
+ ContributorInsightsStatusEnabling = "ENABLING"
+
+ // ContributorInsightsStatusEnabled is a ContributorInsightsStatus enum value
+ ContributorInsightsStatusEnabled = "ENABLED"
+
+ // ContributorInsightsStatusDisabling is a ContributorInsightsStatus enum value
+ ContributorInsightsStatusDisabling = "DISABLING"
+
+ // ContributorInsightsStatusDisabled is a ContributorInsightsStatus enum value
+ ContributorInsightsStatusDisabled = "DISABLED"
+
+ // ContributorInsightsStatusFailed is a ContributorInsightsStatus enum value
+ ContributorInsightsStatusFailed = "FAILED"
+)
+
const (
// GlobalTableStatusCreating is a GlobalTableStatus enum value
GlobalTableStatusCreating = "CREATING"
@@ -16071,6 +20070,9 @@ const (
// ReplicaStatusCreating is a ReplicaStatus enum value
ReplicaStatusCreating = "CREATING"
+ // ReplicaStatusCreationFailed is a ReplicaStatus enum value
+ ReplicaStatusCreationFailed = "CREATION_FAILED"
+
// ReplicaStatusUpdating is a ReplicaStatus enum value
ReplicaStatusUpdating = "UPDATING"
@@ -16214,6 +20216,15 @@ const (
// TableStatusActive is a TableStatus enum value
TableStatusActive = "ACTIVE"
+
+ // TableStatusInaccessibleEncryptionCredentials is a TableStatus enum value
+ TableStatusInaccessibleEncryptionCredentials = "INACCESSIBLE_ENCRYPTION_CREDENTIALS"
+
+ // TableStatusArchiving is a TableStatus enum value
+ TableStatusArchiving = "ARCHIVING"
+
+ // TableStatusArchived is a TableStatus enum value
+ TableStatusArchived = "ARCHIVED"
)
const (
diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/decode.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/decode.go
index 9e816cda..c038b25c 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/decode.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/decode.go
@@ -174,23 +174,23 @@ func (d *Decoder) decode(av *dynamodb.AttributeValue, v reflect.Value, fieldTag
}
switch {
- case len(av.B) != 0 || (av.B != nil && d.EnableEmptyCollections):
+ case av.B != nil:
return d.decodeBinary(av.B, v)
case av.BOOL != nil:
return d.decodeBool(av.BOOL, v)
- case len(av.BS) != 0 || (av.BS != nil && d.EnableEmptyCollections):
+ case av.BS != nil:
return d.decodeBinarySet(av.BS, v)
- case len(av.L) != 0 || (av.L != nil && d.EnableEmptyCollections):
+ case av.L != nil:
return d.decodeList(av.L, v)
- case len(av.M) != 0 || (av.M != nil && d.EnableEmptyCollections):
+ case av.M != nil:
return d.decodeMap(av.M, v)
case av.N != nil:
return d.decodeNumber(av.N, v, fieldTag)
- case len(av.NS) != 0 || (av.NS != nil && d.EnableEmptyCollections):
+ case av.NS != nil:
return d.decodeNumberSet(av.NS, v)
- case av.S != nil: // DynamoDB does not allow for empty strings, so we do not consider the length or EnableEmptyCollections flag here
+ case av.S != nil:
return d.decodeString(av.S, v, fieldTag)
- case len(av.SS) != 0 || (av.SS != nil && d.EnableEmptyCollections):
+ case av.SS != nil:
return d.decodeStringSet(av.SS, v)
}
@@ -500,11 +500,8 @@ func (d *Decoder) decodeMap(avMap map[string]*dynamodb.AttributeValue, v reflect
} else if v.Kind() == reflect.Struct {
fields := unionStructFields(v.Type(), d.MarshalOptions)
for k, av := range avMap {
- if f, ok := fieldByName(fields, k); ok {
- fv := fieldByIndex(v, f.Index, func(v *reflect.Value) bool {
- v.Set(reflect.New(v.Type().Elem()))
- return true // to continue the loop.
- })
+ if f, ok := fields.FieldByName(k); ok {
+ fv := decoderFieldByIndex(v, f.Index)
if err := d.decode(av, fv, f.tag); err != nil {
return err
}
@@ -614,6 +611,21 @@ func decodeUnixTime(n string) (time.Time, error) {
return time.Unix(v, 0), nil
}
+// decoderFieldByIndex finds the field with the provided nested index, allocating
+// embedded parent structs if needed
+func decoderFieldByIndex(v reflect.Value, index []int) reflect.Value {
+ for i, x := range index {
+ if i > 0 && v.Kind() == reflect.Ptr && v.Type().Elem().Kind() == reflect.Struct {
+ if v.IsNil() {
+ v.Set(reflect.New(v.Type().Elem()))
+ }
+ v = v.Elem()
+ }
+ v = v.Field(x)
+ }
+ return v
+}
+
// indirect will walk a value's interface or pointer value types. Returning
// the final value or the value a unmarshaler is defined on.
//
diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/encode.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/encode.go
index c03e01d5..a8888829 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/encode.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/encode.go
@@ -208,12 +208,18 @@ type Encoder struct {
MarshalOptions
// Empty strings, "", will be marked as NULL AttributeValue types.
- // Empty strings are not valid values for DynamoDB. Will not apply
- // to lists, sets, or maps. Use the struct tag `omitemptyelem`
+ // Will not apply to lists, sets, or maps. Use the struct tag `omitemptyelem`
// to skip empty (zero) values in lists, sets and maps.
//
// Enabled by default.
NullEmptyString bool
+
+ // Empty byte slices, len([]byte{}) == 0, will be marked as NULL AttributeValue types.
+ // Will not apply to lists, sets, or maps. Use the struct tag `omitemptyelem`
+ // to skip empty (zero) values in lists, sets and maps.
+ //
+ // Enabled by default.
+ NullEmptyByteSlice bool
}
// NewEncoder creates a new Encoder with default configuration. Use
@@ -223,7 +229,8 @@ func NewEncoder(opts ...func(*Encoder)) *Encoder {
MarshalOptions: MarshalOptions{
SupportJSONTags: true,
},
- NullEmptyString: true,
+ NullEmptyString: true,
+ NullEmptyByteSlice: true,
}
for _, o := range opts {
o(e)
@@ -243,23 +250,6 @@ func (e *Encoder) Encode(in interface{}) (*dynamodb.AttributeValue, error) {
return av, nil
}
-func fieldByIndex(v reflect.Value, index []int,
- OnEmbeddedNilStruct func(*reflect.Value) bool) reflect.Value {
- fv := v
- for i, x := range index {
- if i > 0 {
- if fv.Kind() == reflect.Ptr && fv.Type().Elem().Kind() == reflect.Struct {
- if fv.IsNil() && !OnEmbeddedNilStruct(&fv) {
- break
- }
- fv = fv.Elem()
- }
- }
- fv = fv.Field(x)
- }
- return fv
-}
-
func (e *Encoder) encode(av *dynamodb.AttributeValue, v reflect.Value, fieldTag tag) error {
// We should check for omitted values first before dereferencing.
if fieldTag.OmitEmpty && emptyValue(v, e.EnableEmptyCollections) {
@@ -310,16 +300,12 @@ func (e *Encoder) encodeStruct(av *dynamodb.AttributeValue, v reflect.Value, fie
av.M = map[string]*dynamodb.AttributeValue{}
fields := unionStructFields(v.Type(), e.MarshalOptions)
- for _, f := range fields {
+ for _, f := range fields.All() {
if f.Name == "" {
return &InvalidMarshalError{msg: "map key cannot be empty"}
}
- found := true
- fv := fieldByIndex(v, f.Index, func(v *reflect.Value) bool {
- found = false
- return false // to break the loop.
- })
+ fv, found := encoderFieldByIndex(v, f.Index)
if !found {
continue
}
@@ -384,7 +370,7 @@ func (e *Encoder) encodeSlice(av *dynamodb.AttributeValue, v reflect.Value, fiel
reflect.Copy(slice, v)
b := slice.Bytes()
- if (v.Kind() == reflect.Slice && v.IsNil()) || (len(b) == 0 && !e.EnableEmptyCollections) {
+ if (v.Kind() == reflect.Slice && v.IsNil()) || (len(b) == 0 && !e.EnableEmptyCollections && e.NullEmptyByteSlice) {
encodeNull(av)
return nil
}
@@ -549,6 +535,20 @@ func encodeNull(av *dynamodb.AttributeValue) {
*av = dynamodb.AttributeValue{NULL: &t}
}
+// encoderFieldByIndex finds the field with the provided nested index
+func encoderFieldByIndex(v reflect.Value, index []int) (reflect.Value, bool) {
+ for i, x := range index {
+ if i > 0 && v.Kind() == reflect.Ptr && v.Type().Elem().Kind() == reflect.Struct {
+ if v.IsNil() {
+ return reflect.Value{}, false
+ }
+ v = v.Elem()
+ }
+ v = v.Field(x)
+ }
+ return v, true
+}
+
func valueElem(v reflect.Value) reflect.Value {
switch v.Kind() {
case reflect.Interface, reflect.Ptr:
diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/field.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/field.go
index f1c74fec..c14024a5 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/field.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/field.go
@@ -16,21 +16,25 @@ type field struct {
Type reflect.Type
}
-func fieldByName(fields []field, name string) (field, bool) {
- foldExists := false
- foldField := field{}
+type cachedFields struct {
+ fields []field
+ fieldsByName map[string]int
+}
+
+func (f *cachedFields) All() []field {
+ return f.fields
+}
- for _, f := range fields {
- if f.Name == name {
+func (f *cachedFields) FieldByName(name string) (field, bool) {
+ if i, ok := f.fieldsByName[name]; ok {
+ return f.fields[i], ok
+ }
+ for _, f := range f.fields {
+ if strings.EqualFold(f.Name, name) {
return f, true
}
- if !foldExists && strings.EqualFold(f.Name, name) {
- foldField = f
- foldExists = true
- }
}
-
- return foldField, foldExists
+ return field{}, false
}
func buildField(pIdx []int, i int, sf reflect.StructField, fieldTag tag) field {
@@ -51,14 +55,27 @@ func buildField(pIdx []int, i int, sf reflect.StructField, fieldTag tag) field {
return f
}
-func unionStructFields(t reflect.Type, opts MarshalOptions) []field {
- fields := enumFields(t, opts)
+// unionStructFields returns a list of fields for the given type. Type info is cached
+// to avoid repeated calls into the reflect package
+func unionStructFields(t reflect.Type, opts MarshalOptions) *cachedFields {
+ if cached, ok := fieldCache.Load(t); ok {
+ return cached
+ }
- sort.Sort(fieldsByName(fields))
+ f := enumFields(t, opts)
+ sort.Sort(fieldsByName(f))
+ f = visibleFields(f)
- fields = visibleFields(fields)
+ fs := &cachedFields{
+ fields: f,
+ fieldsByName: make(map[string]int, len(f)),
+ }
+ for i, f := range fs.fields {
+ fs.fieldsByName[f.Name] = i
+ }
- return fields
+ cached, _ := fieldCache.LoadOrStore(t, fs)
+ return cached
}
// enumFields will recursively iterate through a structure and its nested
diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go
index 71f3e7d3..0cead118 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go
@@ -2,6 +2,10 @@
package dynamodb
+import (
+ "github.com/aws/aws-sdk-go/private/protocol"
+)
+
const (
// ErrCodeBackupInUseException for service response error code
@@ -184,8 +188,6 @@ const (
// index (LSI) becomes too large, or a similar validation error occurs because
// of changes made by the transaction.
//
- // * The aggregate size of the items in the transaction exceeds 4 MBs.
- //
// * There is a user error, such as an invalid data format.
//
// DynamoDB cancels a TransactGetItems request under the following circumstances:
@@ -200,8 +202,6 @@ const (
// * There is insufficient provisioned capacity for the transaction to be
// completed.
//
- // * The aggregate size of the items in the transaction exceeds 4 MBs.
- //
// * There is a user error, such as an invalid data format.
//
// If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons
@@ -268,3 +268,31 @@ const (
// The transaction with the given request token is already in progress.
ErrCodeTransactionInProgressException = "TransactionInProgressException"
)
+
+var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
+ "BackupInUseException": newErrorBackupInUseException,
+ "BackupNotFoundException": newErrorBackupNotFoundException,
+ "ConditionalCheckFailedException": newErrorConditionalCheckFailedException,
+ "ContinuousBackupsUnavailableException": newErrorContinuousBackupsUnavailableException,
+ "GlobalTableAlreadyExistsException": newErrorGlobalTableAlreadyExistsException,
+ "GlobalTableNotFoundException": newErrorGlobalTableNotFoundException,
+ "IdempotentParameterMismatchException": newErrorIdempotentParameterMismatchException,
+ "IndexNotFoundException": newErrorIndexNotFoundException,
+ "InternalServerError": newErrorInternalServerError,
+ "InvalidRestoreTimeException": newErrorInvalidRestoreTimeException,
+ "ItemCollectionSizeLimitExceededException": newErrorItemCollectionSizeLimitExceededException,
+ "LimitExceededException": newErrorLimitExceededException,
+ "PointInTimeRecoveryUnavailableException": newErrorPointInTimeRecoveryUnavailableException,
+ "ProvisionedThroughputExceededException": newErrorProvisionedThroughputExceededException,
+ "ReplicaAlreadyExistsException": newErrorReplicaAlreadyExistsException,
+ "ReplicaNotFoundException": newErrorReplicaNotFoundException,
+ "RequestLimitExceeded": newErrorRequestLimitExceeded,
+ "ResourceInUseException": newErrorResourceInUseException,
+ "ResourceNotFoundException": newErrorResourceNotFoundException,
+ "TableAlreadyExistsException": newErrorTableAlreadyExistsException,
+ "TableInUseException": newErrorTableInUseException,
+ "TableNotFoundException": newErrorTableNotFoundException,
+ "TransactionCanceledException": newErrorTransactionCanceledException,
+ "TransactionConflictException": newErrorTransactionConflictException,
+ "TransactionInProgressException": newErrorTransactionInProgressException,
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/expression/condition.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/expression/condition.go
index 5d5c5c59..39e11031 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/expression/condition.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/expression/condition.go
@@ -1330,7 +1330,7 @@ func (nb NameBuilder) BeginsWith(prefix string) ConditionBuilder {
//
// // condition represents the boolean condition of whether the item
// // attribute "InviteList" has the value "Ben"
-// condition := expression.Contains(expression.Name("InviteList"), expression.Value("Ben"))
+// condition := expression.Contains(expression.Name("InviteList"), "Ben")
//
// // Used in another Condition Expression
// anotherCondition := expression.Not(condition)
@@ -1339,7 +1339,7 @@ func (nb NameBuilder) BeginsWith(prefix string) ConditionBuilder {
//
// Expression Equivalent:
//
-// expression.Contains(expression.Name("InviteList"), expression.Value("Ben"))
+// expression.Contains(expression.Name("InviteList"), "Ben")
// // Let :ben be an ExpressionAttributeValue representing the value "Ben"
// "contains (InviteList, :ben)"
func Contains(nameBuilder NameBuilder, substr string) ConditionBuilder {
@@ -1361,7 +1361,7 @@ func Contains(nameBuilder NameBuilder, substr string) ConditionBuilder {
//
// // condition represents the boolean condition of whether the item
// // attribute "InviteList" has the value "Ben"
-// condition := expression.Name("InviteList").Contains(expression.Value("Ben"))
+// condition := expression.Name("InviteList").Contains("Ben")
//
// // Used in another Condition Expression
// anotherCondition := expression.Not(condition)
@@ -1370,7 +1370,7 @@ func Contains(nameBuilder NameBuilder, substr string) ConditionBuilder {
//
// Expression Equivalent:
//
-// expression.Name("InviteList").Contains(expression.Value("Ben"))
+// expression.Name("InviteList").Contains("Ben")
// // Let :ben be an ExpressionAttributeValue representing the value "Ben"
// "contains (InviteList, :ben)"
func (nb NameBuilder) Contains(substr string) ConditionBuilder {
diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/expression/operand.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/expression/operand.go
index 54e31529..58bb83cc 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/expression/operand.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/expression/operand.go
@@ -137,14 +137,20 @@ func Name(name string) NameBuilder {
}
}
-// Value creates a ValueBuilder. The argument should represent the desired item
-// attribute. The value is marshalled using the dynamodbattribute package by the
-// Build() method for type Builder.
+// Value creates a ValueBuilder and sets its value to the argument. The value
+// will be marshalled using the dynamodbattribute package, unless it is of
+// type dynamodb.AttributeValue, where it will be used directly.
+//
+// Empty slices and maps will be converted to NULL dynamodb.AttributeValue
+// values. If an empty value is required, pass a dynamodb.AttributeValue, e.g.:
+// emptyList := (&dynamodb.AttributeValue{}).SetL([]*dynamodb.AttributeValue{})
//
// Example:
//
// // Use Value() to create a condition expression
// condition := expression.Name("foo").Equal(expression.Value(10))
+// // Use Value() to set the value of a set expression.
+// update := Set(expression.Name("greets"), expression.Value((&dynamodb.AttributeValue{}).SetS("hello")))
func Value(value interface{}) ValueBuilder {
return ValueBuilder{
value: value,
@@ -519,9 +525,21 @@ func (nb NameBuilder) BuildOperand() (Operand, error) {
// words.
// More information on reserved words at http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html
func (vb ValueBuilder) BuildOperand() (Operand, error) {
- expr, err := dynamodbattribute.Marshal(vb.value)
- if err != nil {
- return Operand{}, newInvalidParameterError("BuildOperand", "ValueBuilder")
+ var (
+ expr *dynamodb.AttributeValue
+ err error
+ )
+
+ switch v := vb.value.(type) {
+ case *dynamodb.AttributeValue:
+ expr = v
+ case dynamodb.AttributeValue:
+ expr = &v
+ default:
+ expr, err = dynamodbattribute.Marshal(vb.value)
+ if err != nil {
+ return Operand{}, newInvalidParameterError("BuildOperand", "ValueBuilder")
+ }
}
// Create a string with special characters that can be substituted later: $v
diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go
index edcb5b85..8bae9d23 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go
@@ -9,6 +9,7 @@ import (
"github.com/aws/aws-sdk-go/aws/crr"
"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"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
@@ -33,7 +34,7 @@ var initRequest func(*request.Request)
const (
ServiceName = "dynamodb" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "DynamoDB" // ServiceID is a unique identifer of a specific service.
+ ServiceID = "DynamoDB" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the DynamoDB client with a session.
@@ -41,6 +42,8 @@ const (
// aws.Config parameter to add your extra config.
//
// Example:
+// mySession := session.Must(session.NewSession())
+//
// // Create a DynamoDB client from just a session.
// svc := dynamodb.New(mySession)
//
@@ -48,11 +51,11 @@ const (
// svc := dynamodb.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *DynamoDB {
c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
+ return newClient(*c.Config, c.Handlers, c.PartitionID, 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) *DynamoDB {
+func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *DynamoDB {
svc := &DynamoDB{
Client: client.New(
cfg,
@@ -61,6 +64,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
+ PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2012-08-10",
JSONVersion: "1.0",
@@ -76,7 +80,9 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
+ svc.Handlers.UnmarshalError.PushBackNamed(
+ protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
+ )
// Run custom client initialization if present
if initClient != nil {
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 64f25432..1a854732 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
@@ -1284,7 +1284,8 @@ func (c *IAM) CreateOpenIDConnectProviderRequest(input *CreateOpenIDConnectProvi
// * A list of client IDs (also known as audiences) that identify the application
// or applications that are allowed to authenticate using the OIDC provider
//
-// * A list of thumbprints of the server certificate(s) that the IdP uses
+// * A list of thumbprints of one or more server certificates that the IdP
+// uses
//
// You get all of this information from the OIDC IdP that you want to use to
// access AWS.
@@ -5301,7 +5302,9 @@ func (c *IAM) GenerateServiceLastAccessedDetailsRequest(input *GenerateServiceLa
// * GetServiceLastAccessedDetails – Use this operation for users, groups,
// roles, or policies to list every AWS service that the resource could access
// using permissions policies. For each service, the response includes information
-// about the most recent access attempt.
+// about the most recent access attempt. The JobId returned by GenerateServiceLastAccessedDetail
+// must be used by the same role within a session, or by the same user when
+// used to call GetServiceLastAccessedDetail.
//
// * GetServiceLastAccessedDetailsWithEntities – Use this operation for
// groups and policies to list information about the associated entities
@@ -5323,8 +5326,8 @@ func (c *IAM) GenerateServiceLastAccessedDetailsRequest(input *GenerateServiceLa
// see Evaluating Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics)
// in the IAM User Guide.
//
-// For more information about service last accessed data, see Reducing Policy
-// Scope by Viewing User Activity (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html)
+// For more information about service and action last accessed data, see Reducing
+// Permissions Using Service Last Accessed Data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html)
// in the IAM User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -5583,10 +5586,12 @@ func (c *IAM) GetAccountAuthorizationDetailsPagesWithContext(ctx aws.Context, in
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*GetAccountAuthorizationDetailsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*GetAccountAuthorizationDetailsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -6178,10 +6183,12 @@ func (c *IAM) GetGroupPagesWithContext(ctx aws.Context, input *GetGroupInput, fn
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*GetGroupOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*GetGroupOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -7403,6 +7410,15 @@ func (c *IAM) GetServiceLastAccessedDetailsRequest(input *GetServiceLastAccessed
//
// By default, the list is sorted by service namespace.
//
+// If you specified ACTION_LEVEL granularity when you generated the report,
+// this operation returns service and action last accessed data. This includes
+// the most recent access attempt for each tracked action within a service.
+// Otherwise, this operation returns only service data.
+//
+// For more information about service and action last accessed data, see Reducing
+// Permissions Using Service Last Accessed Data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html)
+// 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.
@@ -7973,10 +7989,12 @@ func (c *IAM) ListAccessKeysPagesWithContext(ctx aws.Context, input *ListAccessK
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListAccessKeysOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListAccessKeysOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -8112,10 +8130,12 @@ func (c *IAM) ListAccountAliasesPagesWithContext(ctx aws.Context, input *ListAcc
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListAccountAliasesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListAccountAliasesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -8267,10 +8287,12 @@ func (c *IAM) ListAttachedGroupPoliciesPagesWithContext(ctx aws.Context, input *
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListAttachedGroupPoliciesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListAttachedGroupPoliciesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -8422,10 +8444,12 @@ func (c *IAM) ListAttachedRolePoliciesPagesWithContext(ctx aws.Context, input *L
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListAttachedRolePoliciesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListAttachedRolePoliciesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -8577,10 +8601,12 @@ func (c *IAM) ListAttachedUserPoliciesPagesWithContext(ctx aws.Context, input *L
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListAttachedUserPoliciesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListAttachedUserPoliciesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -8729,10 +8755,12 @@ func (c *IAM) ListEntitiesForPolicyPagesWithContext(ctx aws.Context, input *List
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListEntitiesForPolicyOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListEntitiesForPolicyOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -8880,10 +8908,12 @@ func (c *IAM) ListGroupPoliciesPagesWithContext(ctx aws.Context, input *ListGrou
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListGroupPoliciesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListGroupPoliciesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -9018,10 +9048,12 @@ func (c *IAM) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListGroupsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -9160,10 +9192,12 @@ func (c *IAM) ListGroupsForUserPagesWithContext(ctx aws.Context, input *ListGrou
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListGroupsForUserOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListGroupsForUserOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -9300,10 +9334,12 @@ func (c *IAM) ListInstanceProfilesPagesWithContext(ctx aws.Context, input *ListI
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListInstanceProfilesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListInstanceProfilesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -9444,10 +9480,12 @@ func (c *IAM) ListInstanceProfilesForRolePagesWithContext(ctx aws.Context, input
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListInstanceProfilesForRoleOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListInstanceProfilesForRoleOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -9589,10 +9627,12 @@ func (c *IAM) ListMFADevicesPagesWithContext(ctx aws.Context, input *ListMFADevi
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListMFADevicesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListMFADevicesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -9818,10 +9858,12 @@ func (c *IAM) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesI
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -10085,10 +10127,12 @@ func (c *IAM) ListPolicyVersionsPagesWithContext(ctx aws.Context, input *ListPol
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListPolicyVersionsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListPolicyVersionsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -10235,10 +10279,12 @@ func (c *IAM) ListRolePoliciesPagesWithContext(ctx aws.Context, input *ListRoleP
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListRolePoliciesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListRolePoliciesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -10462,10 +10508,12 @@ func (c *IAM) ListRolesPagesWithContext(ctx aws.Context, input *ListRolesInput,
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListRolesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListRolesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -10690,10 +10738,12 @@ func (c *IAM) ListSSHPublicKeysPagesWithContext(ctx aws.Context, input *ListSSHP
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListSSHPublicKeysOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListSSHPublicKeysOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -10834,10 +10884,12 @@ func (c *IAM) ListServerCertificatesPagesWithContext(ctx aws.Context, input *Lis
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListServerCertificatesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListServerCertificatesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -11073,10 +11125,12 @@ func (c *IAM) ListSigningCertificatesPagesWithContext(ctx aws.Context, input *Li
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListSigningCertificatesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListSigningCertificatesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -11222,10 +11276,12 @@ func (c *IAM) ListUserPoliciesPagesWithContext(ctx aws.Context, input *ListUserP
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListUserPoliciesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListUserPoliciesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -11449,10 +11505,12 @@ func (c *IAM) ListUsersPagesWithContext(ctx aws.Context, input *ListUsersInput,
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListUsersOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -11584,10 +11642,12 @@ func (c *IAM) ListVirtualMFADevicesPagesWithContext(ctx aws.Context, input *List
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListVirtualMFADevicesOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListVirtualMFADevicesOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -12873,13 +12933,14 @@ func (c *IAM) SimulateCustomPolicyRequest(input *SimulateCustomPolicyInput) (req
// The simulation does not perform the API operations; it only checks the authorization
// to determine if the simulated policies allow or deny the operations.
//
-// If you want to simulate existing policies attached to an IAM user, group,
-// or role, use SimulatePrincipalPolicy instead.
+// If you want to simulate existing policies that are attached to an IAM user,
+// group, or role, use SimulatePrincipalPolicy instead.
//
-// Context keys are variables maintained by AWS and its services that provide
-// details about the context of an API query request. You can use the Condition
-// element of an IAM policy to evaluate context keys. To get the list of context
-// keys that the policies require for correct simulation, use GetContextKeysForCustomPolicy.
+// Context keys are variables that are maintained by AWS and its services and
+// which provide details about the context of an API query request. You can
+// use the Condition element of an IAM policy to evaluate context keys. To get
+// the list of context keys that the policies require for correct simulation,
+// use GetContextKeysForCustomPolicy.
//
// If the output is long, you can use MaxItems and Marker parameters to paginate
// the results.
@@ -12965,10 +13026,12 @@ func (c *IAM) SimulateCustomPolicyPagesWithContext(ctx aws.Context, input *Simul
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -13135,10 +13198,12 @@ func (c *IAM) SimulatePrincipalPolicyPagesWithContext(ctx aws.Context, input *Si
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -15453,7 +15518,7 @@ type AccessKey struct {
// calls, while Inactive means it is not.
//
// Status is a required field
- Status *string `type:"string" required:"true" enum:"statusType"`
+ Status *string `type:"string" required:"true" enum:"StatusType"`
// The name of the IAM user that the access key is associated with.
//
@@ -15595,7 +15660,7 @@ type AccessKeyMetadata struct {
// The status of the access key. Active means that the key is valid for API
// calls; Inactive means it is not.
- Status *string `type:"string" enum:"statusType"`
+ Status *string `type:"string" enum:"StatusType"`
// The name of the IAM user that the key is associated with.
UserName *string `min:"1" type:"string"`
@@ -16162,7 +16227,7 @@ func (s *AttachedPermissionsBoundary) SetPermissionsBoundaryType(v string) *Atta
//
// For more information about managed policies, refer to Managed Policies and
// Inline Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
-// in the Using IAM guide.
+// in the IAM User Guide.
type AttachedPolicy struct {
_ struct{} `type:"structure"`
@@ -16287,7 +16352,7 @@ func (s ChangePasswordOutput) GoString() string {
// evaluating the Condition elements of the input policies.
//
// This data type is used as an input parameter to SimulateCustomPolicy and
-// SimulatePrincipalPolicy .
+// SimulatePrincipalPolicy.
type ContextEntry struct {
_ struct{} `type:"structure"`
@@ -19929,13 +19994,13 @@ type EntityInfo struct {
// The path to the entity (user or role). For more information about paths,
// see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
Path *string `min:"1" type:"string"`
// The type of entity (user or role).
//
// Type is a required field
- Type *string `type:"string" required:"true" enum:"policyOwnerEntityType"`
+ Type *string `type:"string" required:"true" enum:"PolicyOwnerEntityType"`
}
// String returns the string representation
@@ -20036,12 +20101,24 @@ type EvaluationResult struct {
// EvalDecision is a required field
EvalDecision *string `type:"string" required:"true" enum:"PolicyEvaluationDecisionType"`
- // Additional details about the results of the evaluation decision. When there
- // are both IAM policies and resource policies, this parameter explains how
- // each set of policies contributes to the final evaluation decision. When simulating
- // cross-account access to a resource, both the resource-based policy and the
- // caller's IAM policy must grant access. See How IAM Roles Differ from Resource-based
- // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_compare-resource-policies.html)
+ // Additional details about the results of the cross-account evaluation decision.
+ // This parameter is populated for only cross-account simulations. It contains
+ // a brief summary of how each policy type contributes to the final evaluation
+ // decision.
+ //
+ // If the simulation evaluates policies within the same account and includes
+ // a resource ARN, then the parameter is present but the response is empty.
+ // If the simulation evaluates policies within the same account and specifies
+ // all resources (*), then the parameter is not returned.
+ //
+ // When you make a cross-account request, AWS evaluates the request in the trusting
+ // account and the trusted account. The request is allowed only if both evaluations
+ // return true. For more information about how policies are evaluated, see Evaluating
+ // Policies Within a Single Account (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics).
+ //
+ // If an AWS Organizations SCP included in the evaluation denies access, the
+ // simulation ends. In this case, policy evaluation does not proceed any further
+ // and this parameter is not returned.
EvalDecisionDetails map[string]*string `type:"map"`
// The ARN of the resource that the indicated API operation was tested on.
@@ -20068,6 +20145,10 @@ type EvaluationResult struct {
// account is part of an organization.
OrganizationsDecisionDetail *OrganizationsDecisionDetail `type:"structure"`
+ // Contains information about the effect that a permissions boundary has on
+ // a policy simulation when the boundary is applied to an IAM entity.
+ PermissionsBoundaryDecisionDetail *PermissionsBoundaryDecisionDetail `type:"structure"`
+
// The individual results of the simulation of the API operation specified in
// EvalActionName on each resource.
ResourceSpecificResults []*ResourceSpecificResult `type:"list"`
@@ -20125,6 +20206,12 @@ func (s *EvaluationResult) SetOrganizationsDecisionDetail(v *OrganizationsDecisi
return s
}
+// SetPermissionsBoundaryDecisionDetail sets the PermissionsBoundaryDecisionDetail field's value.
+func (s *EvaluationResult) SetPermissionsBoundaryDecisionDetail(v *PermissionsBoundaryDecisionDetail) *EvaluationResult {
+ s.PermissionsBoundaryDecisionDetail = v
+ return s
+}
+
// SetResourceSpecificResults sets the ResourceSpecificResults field's value.
func (s *EvaluationResult) SetResourceSpecificResults(v []*ResourceSpecificResult) *EvaluationResult {
s.ResourceSpecificResults = v
@@ -20268,6 +20355,14 @@ type GenerateServiceLastAccessedDetailsInput struct {
//
// Arn is a required field
Arn *string `min:"20" type:"string" required:"true"`
+
+ // The level of detail that you want to generate. You can specify whether you
+ // want to generate information about the last attempt to access services or
+ // actions. If you specify service-level granularity, this operation generates
+ // only service data. If you specify action-level granularity, it generates
+ // service and action data. If you don't include this optional parameter, the
+ // operation generates service data.
+ Granularity *string `type:"string" enum:"AccessAdvisorUsageGranularityType"`
}
// String returns the string representation
@@ -20302,11 +20397,19 @@ func (s *GenerateServiceLastAccessedDetailsInput) SetArn(v string) *GenerateServ
return s
}
+// SetGranularity sets the Granularity field's value.
+func (s *GenerateServiceLastAccessedDetailsInput) SetGranularity(v string) *GenerateServiceLastAccessedDetailsInput {
+ s.Granularity = &v
+ return s
+}
+
type GenerateServiceLastAccessedDetailsOutput struct {
_ struct{} `type:"structure"`
- // The job ID that you can use in the GetServiceLastAccessedDetails or GetServiceLastAccessedDetailsWithEntities
- // operations.
+ // The JobId that you can use in the GetServiceLastAccessedDetails or GetServiceLastAccessedDetailsWithEntities
+ // operations. The JobId returned by GenerateServiceLastAccessedDetail must
+ // be used by the same role within a session, or by the same user when used
+ // to call GetServiceLastAccessedDetail.
JobId *string `min:"36" type:"string"`
}
@@ -21376,7 +21479,7 @@ type GetOrganizationsAccessReportInput struct {
// The key that is used to sort the results. If you choose the namespace key,
// the results are returned in alphabetical order. If you choose the time key,
// the results are sorted numerically by the date and time.
- SortKey *string `type:"string" enum:"sortKeyType"`
+ SortKey *string `type:"string" enum:"SortKeyType"`
}
// String returns the string representation
@@ -21473,7 +21576,7 @@ type GetOrganizationsAccessReportOutput struct {
// The status of the job.
//
// JobStatus is a required field
- JobStatus *string `type:"string" required:"true" enum:"jobStatusType"`
+ JobStatus *string `type:"string" required:"true" enum:"JobStatusType"`
// When IsTruncated is true, this element is present and contains the value
// to use for the Marker parameter in a subsequent pagination request.
@@ -21996,7 +22099,7 @@ type GetSSHPublicKeyInput struct {
// PEM format, use PEM.
//
// Encoding is a required field
- Encoding *string `type:"string" required:"true" enum:"encodingType"`
+ Encoding *string `type:"string" required:"true" enum:"EncodingType"`
// The unique identifier for the SSH public key.
//
@@ -22169,7 +22272,9 @@ type GetServiceLastAccessedDetailsInput struct {
_ struct{} `type:"structure"`
// The ID of the request generated by the GenerateServiceLastAccessedDetails
- // operation.
+ // operation. The JobId returned by GenerateServiceLastAccessedDetail must be
+ // used by the same role within a session, or by the same user when used to
+ // call GetServiceLastAccessedDetail.
//
// JobId is a required field
JobId *string `min:"36" type:"string" required:"true"`
@@ -22274,7 +22379,12 @@ type GetServiceLastAccessedDetailsOutput struct {
// The status of the job.
//
// JobStatus is a required field
- JobStatus *string `type:"string" required:"true" enum:"jobStatusType"`
+ JobStatus *string `type:"string" required:"true" enum:"JobStatusType"`
+
+ // The type of job. Service jobs return information about when each service
+ // was last accessed. Action jobs also include information about when tracked
+ // actions within the service were last accessed.
+ JobType *string `type:"string" enum:"AccessAdvisorUsageGranularityType"`
// When IsTruncated is true, this element is present and contains the value
// to use for the Marker parameter in a subsequent pagination request.
@@ -22327,6 +22437,12 @@ func (s *GetServiceLastAccessedDetailsOutput) SetJobStatus(v string) *GetService
return s
}
+// SetJobType sets the JobType field's value.
+func (s *GetServiceLastAccessedDetailsOutput) SetJobType(v string) *GetServiceLastAccessedDetailsOutput {
+ s.JobType = &v
+ return s
+}
+
// SetMarker sets the Marker field's value.
func (s *GetServiceLastAccessedDetailsOutput) SetMarker(v string) *GetServiceLastAccessedDetailsOutput {
s.Marker = &v
@@ -22481,7 +22597,7 @@ type GetServiceLastAccessedDetailsWithEntitiesOutput struct {
// The status of the job.
//
// JobStatus is a required field
- JobStatus *string `type:"string" required:"true" enum:"jobStatusType"`
+ JobStatus *string `type:"string" required:"true" enum:"JobStatusType"`
// When IsTruncated is true, this element is present and contains the value
// to use for the Marker parameter in a subsequent pagination request.
@@ -22832,7 +22948,7 @@ type Group struct {
// The Amazon Resource Name (ARN) specifying the group. For more information
// about ARNs and how to use them in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// Arn is a required field
Arn *string `min:"20" type:"string" required:"true"`
@@ -22845,7 +22961,7 @@ type Group struct {
// The stable and unique string identifying the group. For more information
// about IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// GroupId is a required field
GroupId *string `min:"16" type:"string" required:"true"`
@@ -22857,7 +22973,7 @@ type Group struct {
// The path to the group. For more information about paths, see IAM Identifiers
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// Path is a required field
Path *string `min:"1" type:"string" required:"true"`
@@ -22926,7 +23042,7 @@ type GroupDetail struct {
// The stable and unique string identifying the group. For more information
// about IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
GroupId *string `min:"16" type:"string"`
// The friendly name that identifies the group.
@@ -22937,7 +23053,7 @@ type GroupDetail struct {
// The path to the group. For more information about paths, see IAM Identifiers
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
Path *string `min:"1" type:"string"`
}
@@ -23010,7 +23126,7 @@ type InstanceProfile struct {
// The Amazon Resource Name (ARN) specifying the instance profile. For more
// information about ARNs and how to use them in policies, see IAM Identifiers
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// Arn is a required field
Arn *string `min:"20" type:"string" required:"true"`
@@ -23022,7 +23138,7 @@ type InstanceProfile struct {
// The stable and unique string identifying the instance profile. For more information
// about IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// InstanceProfileId is a required field
InstanceProfileId *string `min:"16" type:"string" required:"true"`
@@ -23034,7 +23150,7 @@ type InstanceProfile struct {
// The path to the instance profile. For more information about paths, see IAM
// Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// Path is a required field
Path *string `min:"1" type:"string" required:"true"`
@@ -25013,7 +25129,7 @@ type ListPoliciesInput struct {
//
// This parameter is optional. If it is not included, or if it is set to All,
// all policies are returned.
- Scope *string `type:"string" enum:"policyScopeType"`
+ Scope *string `type:"string" enum:"PolicyScopeType"`
}
// String returns the string representation
@@ -26544,7 +26660,7 @@ type ListVirtualMFADevicesInput struct {
// The status (Unassigned or Assigned) of the devices to list. If you do not
// specify an AssignmentStatus, the operation defaults to Any, which lists both
// assigned and unassigned virtual MFA devices.,
- AssignmentStatus *string `type:"string" enum:"assignmentStatusType"`
+ AssignmentStatus *string `type:"string" enum:"AssignmentStatusType"`
// Use this parameter only when paginating results and only after you receive
// a response indicating that the results are truncated. Set it to the value
@@ -26769,7 +26885,7 @@ func (s *MFADevice) SetUserName(v string) *MFADevice {
//
// For more information about managed policies, see Managed Policies and Inline
// Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
-// in the Using IAM guide.
+// in the IAM User Guide.
type ManagedPolicyDetail struct {
_ struct{} `type:"structure"`
@@ -26793,7 +26909,7 @@ type ManagedPolicyDetail struct {
//
// For more information about policy versions, see Versioning for Managed Policies
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
DefaultVersionId *string `type:"string"`
// A friendly description of the policy.
@@ -26805,7 +26921,7 @@ type ManagedPolicyDetail struct {
// The path to the policy.
//
// For more information about paths, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
Path *string `min:"1" type:"string"`
// The number of entities (users and roles) for which the policy is used as
@@ -26819,7 +26935,7 @@ type ManagedPolicyDetail struct {
// The stable and unique string identifying the policy.
//
// For more information about IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
PolicyId *string `min:"16" type:"string"`
// The friendly name (not ARN) identifying the policy.
@@ -27086,6 +27202,38 @@ func (s *PasswordPolicy) SetRequireUppercaseCharacters(v bool) *PasswordPolicy {
return s
}
+// Contains information about the effect that a permissions boundary has on
+// a policy simulation when the boundary is applied to an IAM entity.
+type PermissionsBoundaryDecisionDetail struct {
+ _ struct{} `type:"structure"`
+
+ // Specifies whether an action is allowed by a permissions boundary that is
+ // applied to an IAM entity (user or role). A value of true means that the permissions
+ // boundary does not deny the action. This means that the policy includes an
+ // Allow statement that matches the request. In this case, if an identity-based
+ // policy also allows the action, the request is allowed. A value of false means
+ // that either the requested action is not allowed (implicitly denied) or that
+ // the action is explicitly denied by the permissions boundary. In both of these
+ // cases, the action is not allowed, regardless of the identity-based policy.
+ AllowedByPermissionsBoundary *bool `type:"boolean"`
+}
+
+// String returns the string representation
+func (s PermissionsBoundaryDecisionDetail) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PermissionsBoundaryDecisionDetail) GoString() string {
+ return s.String()
+}
+
+// SetAllowedByPermissionsBoundary sets the AllowedByPermissionsBoundary field's value.
+func (s *PermissionsBoundaryDecisionDetail) SetAllowedByPermissionsBoundary(v bool) *PermissionsBoundaryDecisionDetail {
+ s.AllowedByPermissionsBoundary = &v
+ return s
+}
+
// Contains information about a managed policy.
//
// This data type is used as a response element in the CreatePolicy, GetPolicy,
@@ -27093,7 +27241,7 @@ func (s *PasswordPolicy) SetRequireUppercaseCharacters(v bool) *PasswordPolicy {
//
// For more information about managed policies, refer to Managed Policies and
// Inline Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
-// in the Using IAM guide.
+// in the IAM User Guide.
type Policy struct {
_ struct{} `type:"structure"`
@@ -27127,7 +27275,7 @@ type Policy struct {
// The path to the policy.
//
// For more information about paths, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
Path *string `min:"1" type:"string"`
// The number of entities (users and roles) for which the policy is used to
@@ -27141,7 +27289,7 @@ type Policy struct {
// The stable and unique string identifying the policy.
//
// For more information about IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
PolicyId *string `min:"16" type:"string"`
// The friendly name (not ARN) identifying the policy.
@@ -27290,7 +27438,7 @@ type PolicyGrantingServiceAccess struct {
// This field is null for managed policies. For more information about these
// policy types, see Managed Policies and Inline Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html)
// in the IAM User Guide.
- EntityType *string `type:"string" enum:"policyOwnerEntityType"`
+ EntityType *string `type:"string" enum:"PolicyOwnerEntityType"`
// The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
//
@@ -27309,7 +27457,7 @@ type PolicyGrantingServiceAccess struct {
// in the IAM User Guide.
//
// PolicyType is a required field
- PolicyType *string `type:"string" required:"true" enum:"policyType"`
+ PolicyType *string `type:"string" required:"true" enum:"PolicyType"`
}
// String returns the string representation
@@ -27359,7 +27507,7 @@ func (s *PolicyGrantingServiceAccess) SetPolicyType(v string) *PolicyGrantingSer
//
// For more information about managed policies, refer to Managed Policies and
// Inline Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
-// in the Using IAM guide.
+// in the IAM User Guide.
type PolicyGroup struct {
_ struct{} `type:"structure"`
@@ -27401,7 +27549,7 @@ func (s *PolicyGroup) SetGroupName(v string) *PolicyGroup {
//
// For more information about managed policies, refer to Managed Policies and
// Inline Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
-// in the Using IAM guide.
+// in the IAM User Guide.
type PolicyRole struct {
_ struct{} `type:"structure"`
@@ -27443,7 +27591,7 @@ func (s *PolicyRole) SetRoleName(v string) *PolicyRole {
//
// For more information about managed policies, refer to Managed Policies and
// Inline Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
-// in the Using IAM guide.
+// in the IAM User Guide.
type PolicyUser struct {
_ struct{} `type:"structure"`
@@ -27486,7 +27634,7 @@ func (s *PolicyUser) SetUserName(v string) *PolicyUser {
//
// For more information about managed policies, refer to Managed Policies and
// Inline Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
-// in the Using IAM guide.
+// in the IAM User Guide.
type PolicyVersion struct {
_ struct{} `type:"structure"`
@@ -28413,11 +28561,10 @@ func (s *ResetServiceSpecificCredentialOutput) SetServiceSpecificCredential(v *S
type ResourceSpecificResult struct {
_ struct{} `type:"structure"`
- // Additional details about the results of the evaluation decision. When there
- // are both IAM policies and resource policies, this parameter explains how
- // each set of policies contributes to the final evaluation decision. When simulating
- // cross-account access to a resource, both the resource-based policy and the
- // caller's IAM policy must grant access.
+ // Additional details about the results of the evaluation decision on a single
+ // resource. This parameter is returned only for cross-account simulations.
+ // This parameter explains how each policy type contributes to the resource-specific
+ // evaluation decision.
EvalDecisionDetails map[string]*string `type:"map"`
// The result of the simulation of the simulated API operation on the resource
@@ -28447,6 +28594,10 @@ type ResourceSpecificResult struct {
// the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy
// or GetContextKeysForPrincipalPolicy.
MissingContextValues []*string `type:"list"`
+
+ // Contains information about the effect that a permissions boundary has on
+ // a policy simulation when that boundary is applied to an IAM entity.
+ PermissionsBoundaryDecisionDetail *PermissionsBoundaryDecisionDetail `type:"structure"`
}
// String returns the string representation
@@ -28489,6 +28640,12 @@ func (s *ResourceSpecificResult) SetMissingContextValues(v []*string) *ResourceS
return s
}
+// SetPermissionsBoundaryDecisionDetail sets the PermissionsBoundaryDecisionDetail field's value.
+func (s *ResourceSpecificResult) SetPermissionsBoundaryDecisionDetail(v *PermissionsBoundaryDecisionDetail) *ResourceSpecificResult {
+ s.PermissionsBoundaryDecisionDetail = v
+ return s
+}
+
type ResyncMFADeviceInput struct {
_ struct{} `type:"structure"`
@@ -28639,7 +28796,7 @@ type Role struct {
// The path to the role. For more information about paths, see IAM Identifiers
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// Path is a required field
Path *string `min:"1" type:"string" required:"true"`
@@ -28653,11 +28810,20 @@ type Role struct {
// The stable and unique string identifying the role. For more information about
// IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// RoleId is a required field
RoleId *string `min:"16" type:"string" required:"true"`
+ // Contains information about the last time that an IAM role was used. This
+ // includes the date and time and the Region in which the role was last used.
+ // Activity is only reported for the trailing 400 days. This period can be shorter
+ // if your Region began supporting these features within the last year. The
+ // role might have been used more than 400 days ago. For more information, see
+ // Regions Where Data Is Tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period)
+ // in the IAM User Guide.
+ RoleLastUsed *RoleLastUsed `type:"structure"`
+
// The friendly name that identifies the role.
//
// RoleName is a required field
@@ -28727,6 +28893,12 @@ func (s *Role) SetRoleId(v string) *Role {
return s
}
+// SetRoleLastUsed sets the RoleLastUsed field's value.
+func (s *Role) SetRoleLastUsed(v *RoleLastUsed) *Role {
+ s.RoleLastUsed = v
+ return s
+}
+
// SetRoleName sets the RoleName field's value.
func (s *Role) SetRoleName(v string) *Role {
s.RoleName = &v
@@ -28769,7 +28941,7 @@ type RoleDetail struct {
// The path to the role. For more information about paths, see IAM Identifiers
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
Path *string `min:"1" type:"string"`
// The ARN of the policy used to set the permissions boundary for the role.
@@ -28781,9 +28953,18 @@ type RoleDetail struct {
// The stable and unique string identifying the role. For more information about
// IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
RoleId *string `min:"16" type:"string"`
+ // Contains information about the last time that an IAM role was used. This
+ // includes the date and time and the Region in which the role was last used.
+ // Activity is only reported for the trailing 400 days. This period can be shorter
+ // if your Region began supporting these features within the last year. The
+ // role might have been used more than 400 days ago. For more information, see
+ // Regions Where Data Is Tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period)
+ // in the IAM User Guide.
+ RoleLastUsed *RoleLastUsed `type:"structure"`
+
// The friendly name that identifies the role.
RoleName *string `min:"1" type:"string"`
@@ -28855,6 +29036,12 @@ func (s *RoleDetail) SetRoleId(v string) *RoleDetail {
return s
}
+// SetRoleLastUsed sets the RoleLastUsed field's value.
+func (s *RoleDetail) SetRoleLastUsed(v *RoleLastUsed) *RoleDetail {
+ s.RoleLastUsed = v
+ return s
+}
+
// SetRoleName sets the RoleName field's value.
func (s *RoleDetail) SetRoleName(v string) *RoleDetail {
s.RoleName = &v
@@ -28873,6 +29060,54 @@ func (s *RoleDetail) SetTags(v []*Tag) *RoleDetail {
return s
}
+// Contains information about the last time that an IAM role was used. This
+// includes the date and time and the Region in which the role was last used.
+// Activity is only reported for the trailing 400 days. This period can be shorter
+// if your Region began supporting these features within the last year. The
+// role might have been used more than 400 days ago. For more information, see
+// Regions Where Data Is Tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period)
+// in the IAM User Guide.
+//
+// This data type is returned as a response element in the GetRole and GetAccountAuthorizationDetails
+// operations.
+type RoleLastUsed struct {
+ _ struct{} `type:"structure"`
+
+ // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601)
+ // that the role was last used.
+ //
+ // This field is null if the role has not been used within the IAM tracking
+ // period. For more information about the tracking period, see Regions Where
+ // Data Is Tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period)
+ // in the IAM User Guide.
+ LastUsedDate *time.Time `type:"timestamp"`
+
+ // The name of the AWS Region in which the role was last used.
+ Region *string `type:"string"`
+}
+
+// String returns the string representation
+func (s RoleLastUsed) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RoleLastUsed) GoString() string {
+ return s.String()
+}
+
+// SetLastUsedDate sets the LastUsedDate field's value.
+func (s *RoleLastUsed) SetLastUsedDate(v time.Time) *RoleLastUsed {
+ s.LastUsedDate = &v
+ return s
+}
+
+// SetRegion sets the Region field's value.
+func (s *RoleLastUsed) SetRegion(v string) *RoleLastUsed {
+ s.Region = &v
+ return s
+}
+
// An object that contains details about how a service-linked role is used,
// if that information is returned by the service.
//
@@ -28979,7 +29214,7 @@ type SSHPublicKey struct {
// key cannot be used.
//
// Status is a required field
- Status *string `type:"string" required:"true" enum:"statusType"`
+ Status *string `type:"string" required:"true" enum:"StatusType"`
// The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601),
// when the SSH public key was uploaded.
@@ -29053,7 +29288,7 @@ type SSHPublicKeyMetadata struct {
// key cannot be used.
//
// Status is a required field
- Status *string `type:"string" required:"true" enum:"statusType"`
+ Status *string `type:"string" required:"true" enum:"StatusType"`
// The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601),
// when the SSH public key was uploaded.
@@ -29162,7 +29397,7 @@ type ServerCertificateMetadata struct {
// The Amazon Resource Name (ARN) specifying the server certificate. For more
// information about ARNs and how to use them in policies, see IAM Identifiers
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// Arn is a required field
Arn *string `min:"20" type:"string" required:"true"`
@@ -29172,14 +29407,14 @@ type ServerCertificateMetadata struct {
// The path to the server certificate. For more information about paths, see
// IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// Path is a required field
Path *string `min:"1" type:"string" required:"true"`
// The stable and unique string identifying the server certificate. For more
// information about IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// ServerCertificateId is a required field
ServerCertificateId *string `min:"16" type:"string" required:"true"`
@@ -29261,6 +29496,13 @@ type ServiceLastAccessed struct {
// the reporting period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period).
LastAuthenticatedEntity *string `min:"20" type:"string"`
+ // The Region from which the authenticated entity (user or role) last attempted
+ // to access the service. AWS does not report unauthenticated requests.
+ //
+ // This field is null if no IAM entities attempted to access the service within
+ // the reporting period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period).
+ LastAuthenticatedRegion *string `type:"string"`
+
// The name of the service in which access was attempted.
//
// ServiceName is a required field
@@ -29285,6 +29527,16 @@ type ServiceLastAccessed struct {
// This field is null if no principals attempted to access the service within
// the reporting period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period).
TotalAuthenticatedEntities *int64 `type:"integer"`
+
+ // An object that contains details about the most recent attempt to access a
+ // tracked action within the service.
+ //
+ // This field is null if there no tracked actions or if the principal did not
+ // use the tracked actions within the reporting period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period).
+ // This field is also null if the report was generated at the service level
+ // and not the action level. For more information, see the Granularity field
+ // in GenerateServiceLastAccessedDetails.
+ TrackedActionsLastAccessed []*TrackedActionLastAccessed `type:"list"`
}
// String returns the string representation
@@ -29309,6 +29561,12 @@ func (s *ServiceLastAccessed) SetLastAuthenticatedEntity(v string) *ServiceLastA
return s
}
+// SetLastAuthenticatedRegion sets the LastAuthenticatedRegion field's value.
+func (s *ServiceLastAccessed) SetLastAuthenticatedRegion(v string) *ServiceLastAccessed {
+ s.LastAuthenticatedRegion = &v
+ return s
+}
+
// SetServiceName sets the ServiceName field's value.
func (s *ServiceLastAccessed) SetServiceName(v string) *ServiceLastAccessed {
s.ServiceName = &v
@@ -29327,6 +29585,12 @@ func (s *ServiceLastAccessed) SetTotalAuthenticatedEntities(v int64) *ServiceLas
return s
}
+// SetTrackedActionsLastAccessed sets the TrackedActionsLastAccessed field's value.
+func (s *ServiceLastAccessed) SetTrackedActionsLastAccessed(v []*TrackedActionLastAccessed) *ServiceLastAccessed {
+ s.TrackedActionsLastAccessed = v
+ return s
+}
+
// Contains the details of a service-specific credential.
type ServiceSpecificCredential struct {
_ struct{} `type:"structure"`
@@ -29364,7 +29628,7 @@ type ServiceSpecificCredential struct {
// is valid for API calls, while Inactive means it is not.
//
// Status is a required field
- Status *string `type:"string" required:"true" enum:"statusType"`
+ Status *string `type:"string" required:"true" enum:"StatusType"`
// The name of the IAM user associated with the service-specific credential.
//
@@ -29453,7 +29717,7 @@ type ServiceSpecificCredentialMetadata struct {
// is valid for API calls, while Inactive means it is not.
//
// Status is a required field
- Status *string `type:"string" required:"true" enum:"statusType"`
+ Status *string `type:"string" required:"true" enum:"StatusType"`
// The name of the IAM user associated with the service-specific credential.
//
@@ -29598,7 +29862,7 @@ type SetSecurityTokenServicePreferencesInput struct {
// in the IAM User Guide.
//
// GlobalEndpointTokenVersion is a required field
- GlobalEndpointTokenVersion *string `type:"string" required:"true" enum:"globalEndpointTokenVersion"`
+ GlobalEndpointTokenVersion *string `type:"string" required:"true" enum:"GlobalEndpointTokenVersion"`
}
// String returns the string representation
@@ -29665,7 +29929,7 @@ type SigningCertificate struct {
// for API calls, while Inactive means it is not.
//
// Status is a required field
- Status *string `type:"string" required:"true" enum:"statusType"`
+ Status *string `type:"string" required:"true" enum:"StatusType"`
// The date when the signing certificate was uploaded.
UploadDate *time.Time `type:"timestamp"`
@@ -29758,6 +30022,27 @@ type SimulateCustomPolicyInput struct {
// service where to continue from.
MaxItems *int64 `min:"1" type:"integer"`
+ // The IAM permissions boundary policy to simulate. The permissions boundary
+ // sets the maximum permissions that an IAM entity can have. You can input only
+ // one permissions boundary when you pass a policy to this operation. For more
+ // information about permissions boundaries, see Permissions Boundaries for
+ // IAM Entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html)
+ // in the IAM User Guide. The policy input is specified as a string that contains
+ // the complete, valid JSON text of a permissions boundary policy.
+ //
+ // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this
+ // parameter is a string of characters consisting of the following:
+ //
+ // * Any printable ASCII character ranging from the space character (\u0020)
+ // through the end of the ASCII character range
+ //
+ // * The printable characters in the Basic Latin and Latin-1 Supplement character
+ // set (through \u00FF)
+ //
+ // * The special characters tab (\u0009), line feed (\u000A), and carriage
+ // return (\u000D)
+ PermissionsBoundaryPolicyInputList []*string `type:"list"`
+
// A list of policy documents to include in the simulation. Each document is
// specified as a string containing the complete, valid JSON text of an IAM
// policy. Do not include any resource-based policies in this parameter. Any
@@ -29949,6 +30234,12 @@ func (s *SimulateCustomPolicyInput) SetMaxItems(v int64) *SimulateCustomPolicyIn
return s
}
+// SetPermissionsBoundaryPolicyInputList sets the PermissionsBoundaryPolicyInputList field's value.
+func (s *SimulateCustomPolicyInput) SetPermissionsBoundaryPolicyInputList(v []*string) *SimulateCustomPolicyInput {
+ s.PermissionsBoundaryPolicyInputList = v
+ return s
+}
+
// SetPolicyInputList sets the PolicyInputList field's value.
func (s *SimulateCustomPolicyInput) SetPolicyInputList(v []*string) *SimulateCustomPolicyInput {
s.PolicyInputList = v
@@ -30080,6 +30371,30 @@ type SimulatePrincipalPolicyInput struct {
// service where to continue from.
MaxItems *int64 `min:"1" type:"integer"`
+ // The IAM permissions boundary policy to simulate. The permissions boundary
+ // sets the maximum permissions that the entity can have. You can input only
+ // one permissions boundary when you pass a policy to this operation. An IAM
+ // entity can only have one permissions boundary in effect at a time. For example,
+ // if a permissions boundary is attached to an entity and you pass in a different
+ // permissions boundary policy using this parameter, then the new permissions
+ // boundary policy is used for the simulation. For more information about permissions
+ // boundaries, see Permissions Boundaries for IAM Entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html)
+ // in the IAM User Guide. The policy input is specified as a string containing
+ // the complete, valid JSON text of a permissions boundary policy.
+ //
+ // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this
+ // parameter is a string of characters consisting of the following:
+ //
+ // * Any printable ASCII character ranging from the space character (\u0020)
+ // through the end of the ASCII character range
+ //
+ // * The printable characters in the Basic Latin and Latin-1 Supplement character
+ // set (through \u00FF)
+ //
+ // * The special characters tab (\u0009), line feed (\u000A), and carriage
+ // return (\u000D)
+ PermissionsBoundaryPolicyInputList []*string `type:"list"`
+
// An optional list of additional policy documents to include in the simulation.
// Each document is specified as a string containing the complete, valid JSON
// text of an IAM policy.
@@ -30272,6 +30587,12 @@ func (s *SimulatePrincipalPolicyInput) SetMaxItems(v int64) *SimulatePrincipalPo
return s
}
+// SetPermissionsBoundaryPolicyInputList sets the PermissionsBoundaryPolicyInputList field's value.
+func (s *SimulatePrincipalPolicyInput) SetPermissionsBoundaryPolicyInputList(v []*string) *SimulatePrincipalPolicyInput {
+ s.PermissionsBoundaryPolicyInputList = v
+ return s
+}
+
// SetPolicyInputList sets the PolicyInputList field's value.
func (s *SimulatePrincipalPolicyInput) SetPolicyInputList(v []*string) *SimulatePrincipalPolicyInput {
s.PolicyInputList = v
@@ -30599,6 +30920,75 @@ func (s TagUserOutput) GoString() string {
return s.String()
}
+// Contains details about the most recent attempt to access an action within
+// the service.
+//
+// This data type is used as a response element in the GetServiceLastAccessedDetails
+// operation.
+type TrackedActionLastAccessed struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the tracked action to which access was attempted. Tracked actions
+ // are actions that report activity to IAM.
+ ActionName *string `type:"string"`
+
+ // The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
+ //
+ // For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS
+ // Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
+ // in the AWS General Reference.
+ LastAccessedEntity *string `min:"20" type:"string"`
+
+ // The Region from which the authenticated entity (user or role) last attempted
+ // to access the tracked action. AWS does not report unauthenticated requests.
+ //
+ // This field is null if no IAM entities attempted to access the service within
+ // the reporting period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period).
+ LastAccessedRegion *string `type:"string"`
+
+ // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601),
+ // when an authenticated entity most recently attempted to access the tracked
+ // service. AWS does not report unauthenticated requests.
+ //
+ // This field is null if no IAM entities attempted to access the service within
+ // the reporting period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period).
+ LastAccessedTime *time.Time `type:"timestamp"`
+}
+
+// String returns the string representation
+func (s TrackedActionLastAccessed) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TrackedActionLastAccessed) GoString() string {
+ return s.String()
+}
+
+// SetActionName sets the ActionName field's value.
+func (s *TrackedActionLastAccessed) SetActionName(v string) *TrackedActionLastAccessed {
+ s.ActionName = &v
+ return s
+}
+
+// SetLastAccessedEntity sets the LastAccessedEntity field's value.
+func (s *TrackedActionLastAccessed) SetLastAccessedEntity(v string) *TrackedActionLastAccessed {
+ s.LastAccessedEntity = &v
+ return s
+}
+
+// SetLastAccessedRegion sets the LastAccessedRegion field's value.
+func (s *TrackedActionLastAccessed) SetLastAccessedRegion(v string) *TrackedActionLastAccessed {
+ s.LastAccessedRegion = &v
+ return s
+}
+
+// SetLastAccessedTime sets the LastAccessedTime field's value.
+func (s *TrackedActionLastAccessed) SetLastAccessedTime(v time.Time) *TrackedActionLastAccessed {
+ s.LastAccessedTime = &v
+ return s
+}
+
type UntagRoleInput struct {
_ struct{} `type:"structure"`
@@ -30764,7 +31154,7 @@ type UpdateAccessKeyInput struct {
// cannot be used.
//
// Status is a required field
- Status *string `type:"string" required:"true" enum:"statusType"`
+ Status *string `type:"string" required:"true" enum:"StatusType"`
// The name of the user whose key you want to update.
//
@@ -31646,7 +32036,7 @@ type UpdateSSHPublicKeyInput struct {
// that the key cannot be used.
//
// Status is a required field
- Status *string `type:"string" required:"true" enum:"statusType"`
+ Status *string `type:"string" required:"true" enum:"StatusType"`
// The name of the IAM user associated with the SSH public key.
//
@@ -31837,7 +32227,7 @@ type UpdateServiceSpecificCredentialInput struct {
// The status to be assigned to the service-specific credential.
//
// Status is a required field
- Status *string `type:"string" required:"true" enum:"statusType"`
+ Status *string `type:"string" required:"true" enum:"StatusType"`
// The name of the IAM user associated with the service-specific credential.
// If you do not specify this value, then the operation assumes the user whose
@@ -31930,7 +32320,7 @@ type UpdateSigningCertificateInput struct {
// be used.
//
// Status is a required field
- Status *string `type:"string" required:"true" enum:"statusType"`
+ Status *string `type:"string" required:"true" enum:"StatusType"`
// The name of the IAM user the signing certificate belongs to.
//
@@ -32492,7 +32882,7 @@ type User struct {
// The Amazon Resource Name (ARN) that identifies the user. For more information
// about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// Arn is a required field
Arn *string `min:"20" type:"string" required:"true"`
@@ -32507,7 +32897,7 @@ type User struct {
// when the user's password was last used to sign in to an AWS website. For
// a list of AWS websites that capture a user's last sign-in time, see the Credential
// Reports (https://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
+ // topic in the IAM User Guide. If a password is used more than once in a five-minute
// 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:
@@ -32518,7 +32908,7 @@ type User struct {
// information on October 20, 2014.
//
// A null value 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
+ // 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 operations.
@@ -32526,7 +32916,7 @@ type User struct {
// The path to the user. For more information about paths, see IAM Identifiers
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// Path is a required field
Path *string `min:"1" type:"string" required:"true"`
@@ -32545,7 +32935,7 @@ type User struct {
// The stable and unique string identifying the user. For more information about
// IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
//
// UserId is a required field
UserId *string `min:"16" type:"string" required:"true"`
@@ -32641,7 +33031,7 @@ type UserDetail struct {
// The path to the user. For more information about paths, see IAM Identifiers
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
Path *string `min:"1" type:"string"`
// The ARN of the policy used to set the permissions boundary for the user.
@@ -32658,7 +33048,7 @@ type UserDetail struct {
// The stable and unique string identifying the user. For more information about
// IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html)
- // in the Using IAM guide.
+ // in the IAM User Guide.
UserId *string `min:"16" type:"string"`
// The friendly name identifying the user.
@@ -32808,6 +33198,25 @@ func (s *VirtualMFADevice) SetUser(v *User) *VirtualMFADevice {
return s
}
+const (
+ // AccessAdvisorUsageGranularityTypeServiceLevel is a AccessAdvisorUsageGranularityType enum value
+ AccessAdvisorUsageGranularityTypeServiceLevel = "SERVICE_LEVEL"
+
+ // AccessAdvisorUsageGranularityTypeActionLevel is a AccessAdvisorUsageGranularityType enum value
+ AccessAdvisorUsageGranularityTypeActionLevel = "ACTION_LEVEL"
+)
+
+const (
+ // AssignmentStatusTypeAssigned is a AssignmentStatusType enum value
+ AssignmentStatusTypeAssigned = "Assigned"
+
+ // AssignmentStatusTypeUnassigned is a AssignmentStatusType enum value
+ AssignmentStatusTypeUnassigned = "Unassigned"
+
+ // AssignmentStatusTypeAny is a AssignmentStatusType enum value
+ AssignmentStatusTypeAny = "Any"
+)
+
const (
// ContextKeyTypeEnumString is a ContextKeyTypeEnum enum value
ContextKeyTypeEnumString = "string"
@@ -32860,6 +33269,14 @@ const (
DeletionTaskStatusTypeNotStarted = "NOT_STARTED"
)
+const (
+ // EncodingTypeSsh is a EncodingType enum value
+ EncodingTypeSsh = "SSH"
+
+ // EncodingTypePem is a EncodingType enum value
+ EncodingTypePem = "PEM"
+)
+
const (
// EntityTypeUser is a EntityType enum value
EntityTypeUser = "User"
@@ -32877,6 +33294,25 @@ const (
EntityTypeAwsmanagedPolicy = "AWSManagedPolicy"
)
+const (
+ // GlobalEndpointTokenVersionV1token is a GlobalEndpointTokenVersion enum value
+ GlobalEndpointTokenVersionV1token = "v1Token"
+
+ // GlobalEndpointTokenVersionV2token is a GlobalEndpointTokenVersion enum value
+ GlobalEndpointTokenVersionV2token = "v2Token"
+)
+
+const (
+ // JobStatusTypeInProgress is a JobStatusType enum value
+ JobStatusTypeInProgress = "IN_PROGRESS"
+
+ // JobStatusTypeCompleted is a JobStatusType enum value
+ JobStatusTypeCompleted = "COMPLETED"
+
+ // JobStatusTypeFailed is a JobStatusType enum value
+ JobStatusTypeFailed = "FAILED"
+)
+
const (
// PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy is a PermissionsBoundaryAttachmentType enum value
PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy = "PermissionsBoundaryPolicy"
@@ -32893,6 +33329,28 @@ const (
PolicyEvaluationDecisionTypeImplicitDeny = "implicitDeny"
)
+const (
+ // PolicyOwnerEntityTypeUser is a PolicyOwnerEntityType enum value
+ PolicyOwnerEntityTypeUser = "USER"
+
+ // PolicyOwnerEntityTypeRole is a PolicyOwnerEntityType enum value
+ PolicyOwnerEntityTypeRole = "ROLE"
+
+ // PolicyOwnerEntityTypeGroup is a PolicyOwnerEntityType enum value
+ PolicyOwnerEntityTypeGroup = "GROUP"
+)
+
+const (
+ // PolicyScopeTypeAll is a PolicyScopeType enum value
+ PolicyScopeTypeAll = "All"
+
+ // PolicyScopeTypeAws is a PolicyScopeType enum value
+ PolicyScopeTypeAws = "AWS"
+
+ // PolicyScopeTypeLocal is a PolicyScopeType enum value
+ PolicyScopeTypeLocal = "Local"
+)
+
const (
// PolicySourceTypeUser is a PolicySourceType enum value
PolicySourceTypeUser = "user"
@@ -32916,6 +33374,14 @@ const (
PolicySourceTypeNone = "none"
)
+const (
+ // PolicyTypeInline is a PolicyType enum value
+ PolicyTypeInline = "INLINE"
+
+ // PolicyTypeManaged is a PolicyType enum value
+ PolicyTypeManaged = "MANAGED"
+)
+
// The policy usage type that indicates whether the policy is used as a permissions
// policy or as the permissions boundary for an entity.
//
@@ -32947,171 +33413,103 @@ const (
)
const (
- // AssignmentStatusTypeAssigned is a assignmentStatusType enum value
- AssignmentStatusTypeAssigned = "Assigned"
-
- // AssignmentStatusTypeUnassigned is a assignmentStatusType enum value
- AssignmentStatusTypeUnassigned = "Unassigned"
-
- // AssignmentStatusTypeAny is a assignmentStatusType enum value
- AssignmentStatusTypeAny = "Any"
-)
-
-const (
- // EncodingTypeSsh is a encodingType enum value
- EncodingTypeSsh = "SSH"
-
- // EncodingTypePem is a encodingType enum value
- EncodingTypePem = "PEM"
-)
-
-const (
- // GlobalEndpointTokenVersionV1token is a globalEndpointTokenVersion enum value
- GlobalEndpointTokenVersionV1token = "v1Token"
-
- // GlobalEndpointTokenVersionV2token is a globalEndpointTokenVersion enum value
- GlobalEndpointTokenVersionV2token = "v2Token"
-)
-
-const (
- // JobStatusTypeInProgress is a jobStatusType enum value
- JobStatusTypeInProgress = "IN_PROGRESS"
-
- // JobStatusTypeCompleted is a jobStatusType enum value
- JobStatusTypeCompleted = "COMPLETED"
-
- // JobStatusTypeFailed is a jobStatusType enum value
- JobStatusTypeFailed = "FAILED"
-)
-
-const (
- // PolicyOwnerEntityTypeUser is a policyOwnerEntityType enum value
- PolicyOwnerEntityTypeUser = "USER"
-
- // PolicyOwnerEntityTypeRole is a policyOwnerEntityType enum value
- PolicyOwnerEntityTypeRole = "ROLE"
-
- // PolicyOwnerEntityTypeGroup is a policyOwnerEntityType enum value
- PolicyOwnerEntityTypeGroup = "GROUP"
-)
-
-const (
- // PolicyScopeTypeAll is a policyScopeType enum value
- PolicyScopeTypeAll = "All"
-
- // PolicyScopeTypeAws is a policyScopeType enum value
- PolicyScopeTypeAws = "AWS"
-
- // PolicyScopeTypeLocal is a policyScopeType enum value
- PolicyScopeTypeLocal = "Local"
-)
-
-const (
- // PolicyTypeInline is a policyType enum value
- PolicyTypeInline = "INLINE"
-
- // PolicyTypeManaged is a policyType enum value
- PolicyTypeManaged = "MANAGED"
-)
-
-const (
- // SortKeyTypeServiceNamespaceAscending is a sortKeyType enum value
+ // SortKeyTypeServiceNamespaceAscending is a SortKeyType enum value
SortKeyTypeServiceNamespaceAscending = "SERVICE_NAMESPACE_ASCENDING"
- // SortKeyTypeServiceNamespaceDescending is a sortKeyType enum value
+ // SortKeyTypeServiceNamespaceDescending is a SortKeyType enum value
SortKeyTypeServiceNamespaceDescending = "SERVICE_NAMESPACE_DESCENDING"
- // SortKeyTypeLastAuthenticatedTimeAscending is a sortKeyType enum value
+ // SortKeyTypeLastAuthenticatedTimeAscending is a SortKeyType enum value
SortKeyTypeLastAuthenticatedTimeAscending = "LAST_AUTHENTICATED_TIME_ASCENDING"
- // SortKeyTypeLastAuthenticatedTimeDescending is a sortKeyType enum value
+ // SortKeyTypeLastAuthenticatedTimeDescending is a SortKeyType enum value
SortKeyTypeLastAuthenticatedTimeDescending = "LAST_AUTHENTICATED_TIME_DESCENDING"
)
const (
- // StatusTypeActive is a statusType enum value
+ // StatusTypeActive is a StatusType enum value
StatusTypeActive = "Active"
- // StatusTypeInactive is a statusType enum value
+ // StatusTypeInactive is a StatusType enum value
StatusTypeInactive = "Inactive"
)
const (
- // SummaryKeyTypeUsers is a summaryKeyType enum value
+ // SummaryKeyTypeUsers is a SummaryKeyType enum value
SummaryKeyTypeUsers = "Users"
- // SummaryKeyTypeUsersQuota is a summaryKeyType enum value
+ // SummaryKeyTypeUsersQuota is a SummaryKeyType enum value
SummaryKeyTypeUsersQuota = "UsersQuota"
- // SummaryKeyTypeGroups is a summaryKeyType enum value
+ // SummaryKeyTypeGroups is a SummaryKeyType enum value
SummaryKeyTypeGroups = "Groups"
- // SummaryKeyTypeGroupsQuota is a summaryKeyType enum value
+ // SummaryKeyTypeGroupsQuota is a SummaryKeyType enum value
SummaryKeyTypeGroupsQuota = "GroupsQuota"
- // SummaryKeyTypeServerCertificates is a summaryKeyType enum value
+ // SummaryKeyTypeServerCertificates is a SummaryKeyType enum value
SummaryKeyTypeServerCertificates = "ServerCertificates"
- // SummaryKeyTypeServerCertificatesQuota is a summaryKeyType enum value
+ // SummaryKeyTypeServerCertificatesQuota is a SummaryKeyType enum value
SummaryKeyTypeServerCertificatesQuota = "ServerCertificatesQuota"
- // SummaryKeyTypeUserPolicySizeQuota is a summaryKeyType enum value
+ // SummaryKeyTypeUserPolicySizeQuota is a SummaryKeyType enum value
SummaryKeyTypeUserPolicySizeQuota = "UserPolicySizeQuota"
- // SummaryKeyTypeGroupPolicySizeQuota is a summaryKeyType enum value
+ // SummaryKeyTypeGroupPolicySizeQuota is a SummaryKeyType enum value
SummaryKeyTypeGroupPolicySizeQuota = "GroupPolicySizeQuota"
- // SummaryKeyTypeGroupsPerUserQuota is a summaryKeyType enum value
+ // SummaryKeyTypeGroupsPerUserQuota is a SummaryKeyType enum value
SummaryKeyTypeGroupsPerUserQuota = "GroupsPerUserQuota"
- // SummaryKeyTypeSigningCertificatesPerUserQuota is a summaryKeyType enum value
+ // SummaryKeyTypeSigningCertificatesPerUserQuota is a SummaryKeyType enum value
SummaryKeyTypeSigningCertificatesPerUserQuota = "SigningCertificatesPerUserQuota"
- // SummaryKeyTypeAccessKeysPerUserQuota is a summaryKeyType enum value
+ // SummaryKeyTypeAccessKeysPerUserQuota is a SummaryKeyType enum value
SummaryKeyTypeAccessKeysPerUserQuota = "AccessKeysPerUserQuota"
- // SummaryKeyTypeMfadevices is a summaryKeyType enum value
+ // SummaryKeyTypeMfadevices is a SummaryKeyType enum value
SummaryKeyTypeMfadevices = "MFADevices"
- // SummaryKeyTypeMfadevicesInUse is a summaryKeyType enum value
+ // SummaryKeyTypeMfadevicesInUse is a SummaryKeyType enum value
SummaryKeyTypeMfadevicesInUse = "MFADevicesInUse"
- // SummaryKeyTypeAccountMfaenabled is a summaryKeyType enum value
+ // SummaryKeyTypeAccountMfaenabled is a SummaryKeyType enum value
SummaryKeyTypeAccountMfaenabled = "AccountMFAEnabled"
- // SummaryKeyTypeAccountAccessKeysPresent is a summaryKeyType enum value
+ // SummaryKeyTypeAccountAccessKeysPresent is a SummaryKeyType enum value
SummaryKeyTypeAccountAccessKeysPresent = "AccountAccessKeysPresent"
- // SummaryKeyTypeAccountSigningCertificatesPresent is a summaryKeyType enum value
+ // SummaryKeyTypeAccountSigningCertificatesPresent is a SummaryKeyType enum value
SummaryKeyTypeAccountSigningCertificatesPresent = "AccountSigningCertificatesPresent"
- // SummaryKeyTypeAttachedPoliciesPerGroupQuota is a summaryKeyType enum value
+ // SummaryKeyTypeAttachedPoliciesPerGroupQuota is a SummaryKeyType enum value
SummaryKeyTypeAttachedPoliciesPerGroupQuota = "AttachedPoliciesPerGroupQuota"
- // SummaryKeyTypeAttachedPoliciesPerRoleQuota is a summaryKeyType enum value
+ // SummaryKeyTypeAttachedPoliciesPerRoleQuota is a SummaryKeyType enum value
SummaryKeyTypeAttachedPoliciesPerRoleQuota = "AttachedPoliciesPerRoleQuota"
- // SummaryKeyTypeAttachedPoliciesPerUserQuota is a summaryKeyType enum value
+ // SummaryKeyTypeAttachedPoliciesPerUserQuota is a SummaryKeyType enum value
SummaryKeyTypeAttachedPoliciesPerUserQuota = "AttachedPoliciesPerUserQuota"
- // SummaryKeyTypePolicies is a summaryKeyType enum value
+ // SummaryKeyTypePolicies is a SummaryKeyType enum value
SummaryKeyTypePolicies = "Policies"
- // SummaryKeyTypePoliciesQuota is a summaryKeyType enum value
+ // SummaryKeyTypePoliciesQuota is a SummaryKeyType enum value
SummaryKeyTypePoliciesQuota = "PoliciesQuota"
- // SummaryKeyTypePolicySizeQuota is a summaryKeyType enum value
+ // SummaryKeyTypePolicySizeQuota is a SummaryKeyType enum value
SummaryKeyTypePolicySizeQuota = "PolicySizeQuota"
- // SummaryKeyTypePolicyVersionsInUse is a summaryKeyType enum value
+ // SummaryKeyTypePolicyVersionsInUse is a SummaryKeyType enum value
SummaryKeyTypePolicyVersionsInUse = "PolicyVersionsInUse"
- // SummaryKeyTypePolicyVersionsInUseQuota is a summaryKeyType enum value
+ // SummaryKeyTypePolicyVersionsInUseQuota is a SummaryKeyType enum value
SummaryKeyTypePolicyVersionsInUseQuota = "PolicyVersionsInUseQuota"
- // SummaryKeyTypeVersionsPerPolicyQuota is a summaryKeyType enum value
+ // SummaryKeyTypeVersionsPerPolicyQuota is a SummaryKeyType enum value
SummaryKeyTypeVersionsPerPolicyQuota = "VersionsPerPolicyQuota"
- // SummaryKeyTypeGlobalEndpointTokenVersion is a summaryKeyType enum value
+ // SummaryKeyTypeGlobalEndpointTokenVersion is a SummaryKeyType enum value
SummaryKeyTypeGlobalEndpointTokenVersion = "GlobalEndpointTokenVersion"
)
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 0d709cd2..13f89fa1 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
@@ -3,59 +3,12 @@
// Package iam provides the client and types for making API
// requests to AWS Identity and Access Management.
//
-// AWS Identity and Access Management (IAM) is a web service that you can use
-// to manage users and user permissions under your AWS account. This guide provides
-// descriptions of IAM actions that you can call programmatically. For general
-// information about IAM, see AWS Identity and Access Management (IAM) (http://aws.amazon.com/iam/).
-// For the user guide for IAM, see Using IAM (https://docs.aws.amazon.com/IAM/latest/UserGuide/).
-//
-// AWS provides SDKs that consist of libraries and sample code for various programming
-// languages and platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs
-// provide a convenient way to create programmatic access to IAM and AWS. For
-// example, the SDKs take care of tasks such as cryptographically signing requests
-// (see below), managing errors, and retrying requests automatically. For information
-// about the AWS SDKs, including how to download and install them, see the Tools
-// for Amazon Web Services (http://aws.amazon.com/tools/) page.
-//
-// We recommend that you use the AWS SDKs to make programmatic API calls to
-// IAM. However, you can also use the IAM Query API to make direct calls to
-// the IAM web service. To learn more about the IAM Query API, see Making Query
-// Requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html)
-// in the Using IAM guide. IAM supports GET and POST requests for all actions.
-// That is, the API does not require you to use GET for some actions and POST
-// for others. However, GET requests are subject to the limitation size of a
-// URL. Therefore, for operations that require larger sizes, use a POST request.
-//
-// Signing Requests
-//
-// Requests must be signed using an access key ID and a secret access key. We
-// strongly recommend that you do not use your AWS account access key ID and
-// secret access key for everyday work with IAM. You can use the access key
-// ID and secret access key for an IAM user or you can use the AWS Security
-// Token Service to generate temporary security credentials and use those to
-// sign requests.
-//
-// To sign requests, we recommend that you use Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
-// If you have an existing application that uses Signature Version 2, you do
-// not have to update it to use Signature Version 4. However, some operations
-// now require Signature Version 4. The documentation for operations that require
-// version 4 indicate this requirement.
-//
-// Additional Resources
-//
-// For more information, see the following:
-//
-// * AWS Security Credentials (https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html).
-// This topic provides general information about the types of credentials
-// used for accessing AWS.
-//
-// * IAM Best Practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAMBestPractices.html).
-// This topic presents a list of suggestions for using the IAM service to
-// help secure your AWS resources.
-//
-// * Signing AWS API Requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html).
-// This set of topics walk you through the process of signing a request using
-// an access key ID and secret access key.
+// AWS Identity and Access Management (IAM) is a web service for securely controlling
+// access to AWS services. With IAM, you can centrally manage users, security
+// credentials such as access keys, and permissions that control which AWS resources
+// users and applications can access. For more information about IAM, see AWS
+// Identity and Access Management (IAM) (http://aws.amazon.com/iam/) and the
+// AWS Identity and Access Management User Guide (https://docs.aws.amazon.com/IAM/latest/UserGuide/).
//
// See https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08 for more information on this service.
//
diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/service.go b/vendor/github.com/aws/aws-sdk-go/service/iam/service.go
index 940b4ce3..6e5d3713 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/iam/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/iam/service.go
@@ -31,7 +31,7 @@ var initRequest func(*request.Request)
const (
ServiceName = "iam" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "IAM" // ServiceID is a unique identifer of a specific service.
+ ServiceID = "IAM" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the IAM client with a session.
@@ -39,6 +39,8 @@ const (
// aws.Config parameter to add your extra config.
//
// Example:
+// mySession := session.Must(session.NewSession())
+//
// // Create a IAM client from just a session.
// svc := iam.New(mySession)
//
@@ -46,11 +48,11 @@ const (
// svc := iam.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *IAM {
c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
+ return newClient(*c.Config, c.Handlers, c.PartitionID, 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) *IAM {
+func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *IAM {
svc := &IAM{
Client: client.New(
cfg,
@@ -59,6 +61,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
+ PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2010-05-08",
},
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 b4a4e8c4..228cd3cf 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
@@ -7,7 +7,6 @@ import (
"fmt"
"io"
"sync"
- "sync/atomic"
"time"
"github.com/aws/aws-sdk-go/aws"
@@ -15,11 +14,13 @@ import (
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/private/checksum"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/eventstream"
"github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi"
"github.com/aws/aws-sdk-go/private/protocol/rest"
"github.com/aws/aws-sdk-go/private/protocol/restxml"
+ "github.com/aws/aws-sdk-go/service/s3/internal/arn"
)
const opAbortMultipartUpload = "AbortMultipartUpload"
@@ -66,11 +67,31 @@ func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req
// AbortMultipartUpload API operation for Amazon Simple Storage Service.
//
-// Aborts a multipart upload.
+// This operation aborts a multipart upload. After a multipart upload is aborted,
+// no additional parts can be uploaded using that upload ID. The storage consumed
+// by any previously uploaded parts will be freed. However, if any part uploads
+// are currently in progress, those part uploads might or might not succeed.
+// As a result, it might be necessary to abort a given multipart upload multiple
+// times in order to completely free all storage consumed by all parts.
//
// To verify that all parts have been removed, so you don't get charged for
-// the part storage, you should call the List Parts operation and ensure the
-// parts list is empty.
+// the part storage, you should call the ListParts operation and ensure that
+// the parts list is empty.
+//
+// For information about permissions required to use the multipart upload API,
+// see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
+//
+// The following operations are related to AbortMultipartUpload:
+//
+// * CreateMultipartUpload
+//
+// * UploadPart
+//
+// * CompleteMultipartUpload
+//
+// * ListParts
+//
+// * ListMultipartUploads
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -151,6 +172,64 @@ func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput)
//
// Completes a multipart upload by assembling previously uploaded parts.
//
+// You first initiate the multipart upload and then upload all parts using the
+// UploadPart operation. After successfully uploading all relevant parts of
+// an upload, you call this operation to complete the upload. Upon receiving
+// this request, Amazon S3 concatenates all the parts in ascending order by
+// part number to create a new object. In the Complete Multipart Upload request,
+// you must provide the parts list. You must ensure that the parts list is complete.
+// This operation concatenates the parts that you provide in the list. For each
+// part in the list, you must provide the part number and the ETag value, returned
+// after that part was uploaded.
+//
+// Processing of a Complete Multipart Upload request could take several minutes
+// to complete. After Amazon S3 begins processing the request, it sends an HTTP
+// response header that specifies a 200 OK response. While processing is in
+// progress, Amazon S3 periodically sends white space characters to keep the
+// connection from timing out. Because a request could fail after the initial
+// 200 OK response has been sent, it is important that you check the response
+// body to determine whether the request succeeded.
+//
+// Note that if CompleteMultipartUpload fails, applications should be prepared
+// to retry the failed requests. For more information, see Amazon S3 Error Best
+// Practices (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html).
+//
+// For more information about multipart uploads, see Uploading Objects Using
+// Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
+//
+// For information about permissions required to use the multipart upload API,
+// see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
+//
+// GetBucketLifecycle has the following special errors:
+//
+// * Error code: EntityTooSmall Description: Your proposed upload is smaller
+// than the minimum allowed object size. Each part must be at least 5 MB
+// in size, except the last part. 400 Bad Request
+//
+// * Error code: InvalidPart Description: One or more of the specified parts
+// could not be found. The part might not have been uploaded, or the specified
+// entity tag might not have matched the part's entity tag. 400 Bad Request
+//
+// * Error code: InvalidPartOrder Description: The list of parts was not
+// in ascending order. The parts list must be specified in order by part
+// number. 400 Bad Request
+//
+// * Error code: NoSuchUpload Description: The specified multipart upload
+// does not exist. The upload ID might be invalid, or the multipart upload
+// might have been aborted or completed. 404 Not Found
+//
+// The following operations are related to CompleteMultipartUpload:
+//
+// * CreateMultipartUpload
+//
+// * UploadPart
+//
+// * AbortMultipartUpload
+//
+// * ListParts
+//
+// * ListMultipartUploads
+//
// Returns awserr.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.
@@ -225,6 +304,153 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou
//
// Creates a copy of an object that is already stored in Amazon S3.
//
+// You can store individual objects of up to 5 TB in Amazon S3. You create a
+// copy of your object up to 5 GB in size in a single atomic operation using
+// this API. However, to copy an object greater than 5 GB, you must use the
+// multipart upload Upload Part - Copy API. For more information, see Copy Object
+// Using the REST Multipart Upload API (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html).
+//
+// All copy requests must be authenticated. Additionally, you must have read
+// access to the source object and write access to the destination bucket. For
+// more information, see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).
+// Both the Region that you want to copy the object from and the Region that
+// you want to copy the object to must be enabled for your account.
+//
+// A copy request might return an error when Amazon S3 receives the copy request
+// or while Amazon S3 is copying the files. If the error occurs before the copy
+// operation starts, you receive a standard Amazon S3 error. If the error occurs
+// during the copy operation, the error response is embedded in the 200 OK response.
+// This means that a 200 OK response can contain either a success or an error.
+// Design your application to parse the contents of the response and handle
+// it appropriately.
+//
+// If the copy is successful, you receive a response with information about
+// the copied object.
+//
+// If the request is an HTTP 1.1 request, the response is chunk encoded. If
+// it were not, it would not contain the content-length, and you would need
+// to read the entire body.
+//
+// The copy request charge is based on the storage class and Region that you
+// specify for the destination object. For pricing information, see Amazon S3
+// pricing (https://aws.amazon.com/s3/pricing/).
+//
+// Amazon S3 transfer acceleration does not support cross-Region copies. If
+// you request a cross-Region copy using a transfer acceleration endpoint, you
+// get a 400 Bad Request error. For more information, see Transfer Acceleration
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
+//
+// Metadata
+//
+// When copying an object, you can preserve all metadata (default) or specify
+// new metadata. However, the ACL is not preserved and is set to private for
+// the user making the request. To override the default ACL setting, specify
+// a new ACL when generating a copy request. For more information, see Using
+// ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html).
+//
+// To specify whether you want the object metadata copied from the source object
+// or replaced with metadata provided in the request, you can optionally add
+// the x-amz-metadata-directive header. When you grant permissions, you can
+// use the s3:x-amz-metadata-directive condition key to enforce certain metadata
+// behavior when objects are uploaded. For more information, see Specifying
+// Conditions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html)
+// in the Amazon S3 Developer Guide. For a complete list of Amazon S3-specific
+// condition keys, see Actions, Resources, and Condition Keys for Amazon S3
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html).
+//
+// x-amz-copy-source-if Headers
+//
+// To only copy an object under certain conditions, such as whether the Etag
+// matches or whether the object was modified before or after a specified date,
+// use the following request parameters:
+//
+// * x-amz-copy-source-if-match
+//
+// * x-amz-copy-source-if-none-match
+//
+// * x-amz-copy-source-if-unmodified-since
+//
+// * x-amz-copy-source-if-modified-since
+//
+// If both the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
+// headers are present in the request and evaluate as follows, Amazon S3 returns
+// 200 OK and copies the data:
+//
+// * x-amz-copy-source-if-match condition evaluates to true
+//
+// * x-amz-copy-source-if-unmodified-since condition evaluates to false
+//
+// If both the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since
+// headers are present in the request and evaluate as follows, Amazon S3 returns
+// the 412 Precondition Failed response code:
+//
+// * x-amz-copy-source-if-none-match condition evaluates to false
+//
+// * x-amz-copy-source-if-modified-since condition evaluates to true
+//
+// All headers with the x-amz- prefix, including x-amz-copy-source, must be
+// signed.
+//
+// Encryption
+//
+// The source object that you are copying can be encrypted or unencrypted. The
+// source object can be encrypted with server-side encryption using AWS managed
+// encryption keys (SSE-S3 or SSE-KMS) or by using a customer-provided encryption
+// key. With server-side encryption, Amazon S3 encrypts your data as it writes
+// it to disks in its data centers and decrypts the data when you access it.
+//
+// You can optionally use the appropriate encryption-related headers to request
+// server-side encryption for the target object. You have the option to provide
+// your own encryption key or use SSE-S3 or SSE-KMS, regardless of the form
+// of server-side encryption that was used to encrypt the source object. You
+// can even request encryption if the source object was not encrypted. For more
+// information about server-side encryption, see Using Server-Side Encryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
+//
+// Access Control List (ACL)-Specific Request Headers
+//
+// When copying an object, you can optionally use headers to grant ACL-based
+// permissions. By default, all objects are private. Only the owner has full
+// access control. When adding a new object, you can grant permissions to individual
+// AWS accounts or to predefined groups defined by Amazon S3. These permissions
+// are then added to the ACL on the object. For more information, see Access
+// Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+// and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html).
+//
+// Storage Class Options
+//
+// You can use the CopyObject operation to change the storage class of an object
+// that is already stored in Amazon S3 using the StorageClass parameter. For
+// more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
+// in the Amazon S3 Service Developer Guide.
+//
+// Versioning
+//
+// By default, x-amz-copy-source identifies the current version of an object
+// to copy. If the current version is a delete marker, Amazon S3 behaves as
+// if the object was deleted. To copy a different version, use the versionId
+// subresource.
+//
+// If you enable versioning on the target bucket, Amazon S3 generates a unique
+// version ID for the object being copied. This version ID is different from
+// the version ID of the source object. Amazon S3 returns the version ID of
+// the copied object in the x-amz-version-id response header in the response.
+//
+// If you do not enable versioning or suspend it on the target bucket, the version
+// ID that Amazon S3 generates is always null.
+//
+// If the source object's storage class is GLACIER, you must restore a copy
+// of this object before you can use it as a source object for the copy operation.
+// For more information, see .
+//
+// The following operations are related to CopyObject:
+//
+// * PutObject
+//
+// * GetObject
+//
+// For more information, see Copying Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.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.
@@ -235,7 +461,7 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou
// Returned Error Codes:
// * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
// The source object of the COPY operation is not in the active tier and is
-// only stored in Amazon Glacier.
+// only stored in Amazon S3 Glacier.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
@@ -303,7 +529,67 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request
// CreateBucket API operation for Amazon Simple Storage Service.
//
-// Creates a new bucket.
+// Creates a new bucket. To create a bucket, you must register with Amazon S3
+// and have a valid AWS Access Key ID to authenticate requests. Anonymous requests
+// are never allowed to create buckets. By creating the bucket, you become the
+// bucket owner.
+//
+// Not every string is an acceptable bucket name. For information on bucket
+// naming restrictions, see Working with Amazon S3 Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html).
+//
+// By default, the bucket is created in the US East (N. Virginia) Region. You
+// can optionally specify a Region in the request body. You might choose a Region
+// to optimize latency, minimize costs, or address regulatory requirements.
+// For example, if you reside in Europe, you will probably find it advantageous
+// to create buckets in the Europe (Ireland) Region. For more information, see
+// How to Select a Region for Your Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
+//
+// If you send your create bucket request to the s3.amazonaws.com endpoint,
+// the request goes to the us-east-1 Region. Accordingly, the signature calculations
+// in Signature Version 4 must use us-east-1 as the Region, even if the location
+// constraint in the request specifies another Region where the bucket is to
+// be created. If you create a bucket in a Region other than US East (N. Virginia),
+// your application must be able to handle 307 redirect. For more information,
+// see Virtual Hosting of Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html).
+//
+// When creating a bucket using this operation, you can optionally specify the
+// accounts or groups that should be granted specific permissions on the bucket.
+// There are two ways to grant the appropriate permissions using the request
+// headers.
+//
+// * Specify a canned ACL using the x-amz-acl request header. Amazon S3 supports
+// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a
+// predefined set of grantees and permissions. For more information, see
+// Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
+//
+// * Specify access permissions explicitly using the x-amz-grant-read, x-amz-grant-write,
+// x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control
+// headers. These headers map to the set of permissions Amazon S3 supports
+// in an ACL. For more information, see Access Control List (ACL) Overview
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). You
+// specify each grantee as a type=value pair, where the type is one of the
+// following: id – if the value specified is the canonical user ID of an
+// AWS account uri – if you are granting permissions to a predefined group
+// emailAddress – if the value specified is the email address of an AWS
+// account Using email addresses to specify a grantee is only supported in
+// the following AWS Regions: US East (N. Virginia) US West (N. California)
+// US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific
+// (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all
+// the Amazon S3 supported Regions and endpoints, see Regions and Endpoints
+// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in
+// the AWS General Reference. For example, the following x-amz-grant-read
+// header grants the AWS accounts identified by account IDs permissions to
+// read object data and its metadata: x-amz-grant-read: id="11112222333",
+// id="444455556666"
+//
+// You can use either a canned ACL or specify access permissions explicitly.
+// You cannot do both.
+//
+// The following operations are related to CreateBucket:
+//
+// * PutObject
+//
+// * DeleteBucket
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -318,6 +604,11 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request
// by all users of the system. Please select a different name and try again.
//
// * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
+// The bucket you tried to create already exists, and you own it. Amazon S3
+// returns this error in all AWS Regions except in the North Virginia Region.
+// For legacy compatibility, if you re-create an existing bucket that you already
+// own in the North Virginia Region, Amazon S3 returns 200 OK and resets the
+// bucket access control lists (ACLs).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
@@ -385,13 +676,154 @@ func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (re
// CreateMultipartUpload API operation for Amazon Simple Storage Service.
//
-// Initiates a multipart upload and returns an upload ID.
+// This operation initiates a multipart upload and returns an upload ID. This
+// upload ID is used to associate all of the parts in the specific multipart
+// upload. You specify this upload ID in each of your subsequent upload part
+// requests (see UploadPart). You also include this upload ID in the final request
+// to either complete or abort the multipart upload request.
//
-// Note: After you initiate multipart upload and upload one or more parts, you
-// must either complete or abort multipart upload in order to stop getting charged
-// for storage of the uploaded parts. Only after you either complete or abort
-// multipart upload, Amazon S3 frees up the parts storage and stops charging
-// you for the parts storage.
+// For more information about multipart uploads, see Multipart Upload Overview
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html).
+//
+// If you have configured a lifecycle rule to abort incomplete multipart uploads,
+// the upload must complete within the number of days specified in the bucket
+// lifecycle configuration. Otherwise, the incomplete multipart upload becomes
+// eligible for an abort operation and Amazon S3 aborts the multipart upload.
+// For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
+// Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
+//
+// For information about the permissions required to use the multipart upload
+// API, see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
+//
+// For request signing, multipart upload is just a series of regular requests.
+// You initiate a multipart upload, send one or more requests to upload parts,
+// and then complete the multipart upload process. You sign each request individually.
+// There is nothing special about signing multipart upload requests. For more
+// information about signing, see Authenticating Requests (AWS Signature Version
+// 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html).
+//
+// After you initiate a multipart upload and upload one or more parts, to stop
+// being charged for storing the uploaded parts, you must either complete or
+// abort the multipart upload. Amazon S3 frees up the space used to store the
+// parts and stop charging you for storing them only after you either complete
+// or abort a multipart upload.
+//
+// You can optionally request server-side encryption. For server-side encryption,
+// Amazon S3 encrypts your data as it writes it to disks in its data centers
+// and decrypts it when you access it. You can provide your own encryption key,
+// or use AWS Key Management Service (AWS KMS) customer master keys (CMKs) or
+// Amazon S3-managed encryption keys. If you choose to provide your own encryption
+// key, the request headers you provide in UploadPart) and UploadPartCopy) requests
+// must match the headers you used in the request to initiate the upload by
+// using CreateMultipartUpload.
+//
+// To perform a multipart upload with encryption using an AWS KMS CMK, the requester
+// must have permission to the kms:Encrypt, kms:Decrypt, kms:ReEncrypt*, kms:GenerateDataKey*,
+// and kms:DescribeKey actions on the key. These permissions are required because
+// Amazon S3 must decrypt and read data from the encrypted file parts before
+// it completes the multipart upload.
+//
+// If your AWS Identity and Access Management (IAM) user or role is in the same
+// AWS account as the AWS KMS CMK, then you must have these permissions on the
+// key policy. If your IAM user or role belongs to a different account than
+// the key, then you must have the permissions on both the key policy and your
+// IAM user or role.
+//
+// For more information, see Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
+//
+// Access Permissions
+//
+// When copying an object, you can optionally specify the accounts or groups
+// that should be granted specific permissions on the new object. There are
+// two ways to grant the permissions using the request headers:
+//
+// * Specify a canned ACL with the x-amz-acl request header. For more information,
+// see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
+//
+// * Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp,
+// x-amz-grant-write-acp, and x-amz-grant-full-control headers. These parameters
+// map to the set of permissions that Amazon S3 supports in an ACL. For more
+// information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
+//
+// You can use either a canned ACL or specify access permissions explicitly.
+// You cannot do both.
+//
+// Server-Side- Encryption-Specific Request Headers
+//
+// You can optionally tell Amazon S3 to encrypt data at rest using server-side
+// encryption. Server-side encryption is for data encryption at rest. Amazon
+// S3 encrypts your data as it writes it to disks in its data centers and decrypts
+// it when you access it. The option you use depends on whether you want to
+// use AWS managed encryption keys or provide your own encryption key.
+//
+// * Use encryption keys managed by Amazon S3 or customer master keys (CMKs)
+// stored in AWS Key Management Service (AWS KMS) – If you want AWS to
+// manage the keys used to encrypt data, specify the following headers in
+// the request. x-amz-server-side-encryption x-amz-server-side-encryption-aws-kms-key-id
+// x-amz-server-side-encryption-context If you specify x-amz-server-side-encryption:aws:kms,
+// but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon
+// S3 uses the AWS managed CMK in AWS KMS to protect the data. All GET and
+// PUT requests for an object protected by AWS KMS fail if you don't make
+// them with SSL or by using SigV4. For more information about server-side
+// encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data
+// Using Server-Side Encryption with CMKs stored in AWS KMS (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
+//
+// * Use customer-provided encryption keys – If you want to manage your
+// own encryption keys, provide all the following headers in the request.
+// x-amz-server-side-encryption-customer-algorithm x-amz-server-side-encryption-customer-key
+// x-amz-server-side-encryption-customer-key-MD5 For more information
+// about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see
+// Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
+//
+// Access-Control-List (ACL)-Specific Request Headers
+//
+// You also can use the following access control–related headers with this
+// operation. By default, all objects are private. Only the owner has full access
+// control. When adding a new object, you can grant permissions to individual
+// AWS accounts or to predefined groups defined by Amazon S3. These permissions
+// are then added to the access control list (ACL) on the object. For more information,
+// see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html).
+// With this operation, you can grant access permissions using one of the following
+// two methods:
+//
+// * Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of predefined
+// ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees
+// and permissions. For more information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
+//
+// * Specify access permissions explicitly — To explicitly grant access
+// permissions to specific AWS accounts or groups, use the following headers.
+// Each header maps to specific permissions that Amazon S3 supports in an
+// ACL. For more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
+// In the header, you specify a list of grantees who get the specific permission.
+// To grant permissions explicitly, use: x-amz-grant-read x-amz-grant-write
+// x-amz-grant-read-acp x-amz-grant-write-acp x-amz-grant-full-control You
+// specify each grantee as a type=value pair, where the type is one of the
+// following: id – if the value specified is the canonical user ID of an
+// AWS account uri – if you are granting permissions to a predefined group
+// emailAddress – if the value specified is the email address of an AWS
+// account Using email addresses to specify a grantee is only supported in
+// the following AWS Regions: US East (N. Virginia) US West (N. California)
+// US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific
+// (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all
+// the Amazon S3 supported Regions and endpoints, see Regions and Endpoints
+// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in
+// the AWS General Reference. For example, the following x-amz-grant-read
+// header grants the AWS accounts identified by account IDs permissions to
+// read object data and its metadata: x-amz-grant-read: id="11112222333",
+// id="444455556666"
+//
+// The following operations are related to CreateMultipartUpload:
+//
+// * UploadPart
+//
+// * CompleteMultipartUpload
+//
+// * AbortMultipartUpload
+//
+// * ListParts
+//
+// * ListMultipartUploads
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -466,8 +898,14 @@ func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request
// DeleteBucket API operation for Amazon Simple Storage Service.
//
-// Deletes the bucket. All objects (including all object versions and Delete
-// Markers) in the bucket must be deleted before the bucket itself can be deleted.
+// Deletes the bucket. All objects (including all object versions and delete
+// markers) in the bucket must be deleted before the bucket itself can be deleted.
+//
+// Related 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
@@ -547,7 +985,20 @@ func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyt
//
// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration
// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others.
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// For information about the Amazon S3 analytics feature, see Amazon S3 Analytics
+// – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
+//
+// The following operations are related to DeleteBucketAnalyticsConfiguration:
+//
+// *
+//
+// *
+//
+// *
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -622,7 +1073,20 @@ func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request
// DeleteBucketCors API operation for Amazon Simple Storage Service.
//
-// Deletes the CORS configuration information set for the bucket.
+// Deletes the cors configuration information set for the bucket.
+//
+// To use this operation, you must have permission to perform the s3:PutBucketCORS
+// action. The bucket owner has this permission by default and can grant this
+// permission to others.
+//
+// For information about cors, see Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Related Resources:
+//
+// *
+//
+// * RESTOPTIONSobject
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -697,7 +1161,23 @@ func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (
// DeleteBucketEncryption API operation for Amazon Simple Storage Service.
//
-// Deletes the server-side encryption configuration from the bucket.
+// This implementation of the DELETE operation removes default encryption from
+// the bucket. For information about the Amazon S3 default encryption feature,
+// see Amazon S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Related Resources
+//
+// * PutBucketEncryption
+//
+// * GetBucketEncryption
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -775,6 +1255,23 @@ func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInvent
// Deletes an inventory configuration (identified by the inventory ID) from
// the bucket.
//
+// To use this operation, you must have permissions to perform the s3:PutInventoryConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html).
+//
+// Operations related to DeleteBucketInventoryConfiguration include:
+//
+// * GetBucketInventoryConfiguration
+//
+// * PutBucketInventoryConfiguration
+//
+// * ListBucketInventoryConfigurations
+//
// Returns awserr.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.
@@ -848,7 +1345,27 @@ func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (re
// DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
//
-// Deletes the lifecycle configuration from the bucket.
+// Deletes the lifecycle configuration from the specified bucket. Amazon S3
+// removes all the lifecycle configuration rules in the lifecycle subresource
+// associated with the bucket. Your objects never expire, and Amazon S3 no longer
+// automatically deletes any objects on the basis of rules contained in the
+// deleted lifecycle configuration.
+//
+// To use this operation, you must have permission to perform the s3:PutLifecycleConfiguration
+// action. By default, the bucket owner has this permission and the bucket owner
+// can grant this permission to others.
+//
+// There is usually some time lag before lifecycle configuration deletion is
+// fully propagated to all the Amazon S3 systems.
+//
+// For more information about the object expiration, see Elements to Describe
+// Lifecycle Actions (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions).
+//
+// Related actions include:
+//
+// * PutBucketLifecycleConfiguration
+//
+// * GetBucketLifecycleConfiguration
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -923,8 +1440,28 @@ func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsC
// DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
//
-// Deletes a metrics configuration (specified by the metrics configuration ID)
-// from the bucket.
+// Deletes a metrics configuration for the Amazon CloudWatch request metrics
+// (specified by the metrics configuration ID) from the bucket. Note that this
+// doesn't include the daily storage metrics.
+//
+// To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// For information about CloudWatch request metrics for Amazon S3, see Monitoring
+// Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
+//
+// The following operations are related to DeleteBucketMetricsConfiguration:
+//
+// * GetBucketMetricsConfiguration
+//
+// * PutBucketMetricsConfiguration
+//
+// * ListBucketMetricsConfigurations
+//
+// * Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.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
@@ -999,7 +1536,29 @@ func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *req
// DeleteBucketPolicy API operation for Amazon Simple Storage Service.
//
-// Deletes the policy from the bucket.
+// This implementation of the DELETE operation uses the policy subresource to
+// delete the policy of a specified bucket. If you are using an identity other
+// than the root user of the AWS account that owns the bucket, the calling identity
+// must have the DeleteBucketPolicy permissions on the specified bucket and
+// belong to the bucket owner's account to use this operation.
+//
+// If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a 403
+// Access Denied error. If you have the correct permissions, but you're not
+// using an identity that belongs to the bucket owner's account, Amazon S3 returns
+// a 405 Method Not Allowed error.
+//
+// As a security precaution, the root user of the AWS account that owns a bucket
+// can always use this operation, even if the policy explicitly denies the root
+// user the ability to perform this action.
+//
+// For more information about bucket policies, see Using Bucket Policies and
+// UserPolicies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
+//
+// The following operations are related to DeleteBucketPolicy
+//
+// * CreateBucket
+//
+// * DeleteObject
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -1074,10 +1633,26 @@ func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput)
// DeleteBucketReplication API operation for Amazon Simple Storage Service.
//
-// Deletes the replication configuration from the bucket. For information about
-// replication configuration, see Cross-Region Replication (CRR) (https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
+// Deletes the replication configuration from the bucket.
+//
+// To use this operation, you must have permissions to perform the s3:PutReplicationConfiguration
+// action. The bucket owner has these permissions by default and can grant it
+// to others. For more information about permissions, see Permissions Related
+// to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// It can take a while for the deletion of a replication configuration to fully
+// propagate.
+//
+// For information about replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
// in the Amazon S3 Developer Guide.
//
+// The following operations are related to DeleteBucketReplication:
+//
+// * PutBucketReplication
+//
+// * GetBucketReplication
+//
// Returns awserr.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.
@@ -1153,6 +1728,16 @@ func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *r
//
// Deletes the tags from the bucket.
//
+// To use this operation, you must have permission to perform the s3:PutBucketTagging
+// action. By default, the bucket owner has this permission and can grant this
+// permission to others.
+//
+// The following operations are related to DeleteBucketTagging:
+//
+// * GetBucketTagging
+//
+// * PutBucketTagging
+//
// Returns awserr.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.
@@ -1226,7 +1811,26 @@ func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *r
// DeleteBucketWebsite API operation for Amazon Simple Storage Service.
//
-// This operation removes the website configuration from the bucket.
+// This operation removes the website configuration for a bucket. Amazon S3
+// returns a 200 OK response upon successfully deleting a website configuration
+// on the specified bucket. You will get a 200 OK response if the website configuration
+// you are trying to delete does not exist on the bucket. Amazon S3 returns
+// a 404 response if the bucket specified in the request does not exist.
+//
+// This DELETE operation requires the S3:DeleteBucketWebsite permission. By
+// default, only the bucket owner can delete the website configuration attached
+// to a bucket. However, bucket owners can grant other users permission to delete
+// the website configuration by writing a bucket policy granting them the S3:DeleteBucketWebsite
+// permission.
+//
+// For more information about hosting websites, see Hosting Websites on Amazon
+// S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
+//
+// The following operations are related to DeleteBucketWebsite:
+//
+// * GetBucketWebsite
+//
+// * PutBucketWebsite
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -1304,6 +1908,29 @@ func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request
// marker, which becomes the latest version of the object. If there isn't a
// null version, Amazon S3 does not remove any objects.
//
+// To remove a specific version, you must be the bucket owner and you must use
+// the version Id subresource. Using this subresource permanently deletes the
+// version. If the object deleted is a delete marker, Amazon S3 sets the response
+// header, x-amz-delete-marker, to true.
+//
+// If the object you want to delete is in a bucket where the bucket versioning
+// configuration is MFA Delete enabled, you must include the x-amz-mfa request
+// header in the DELETE versionId request. Requests that include x-amz-mfa must
+// use HTTPS.
+//
+// For more information about MFA Delete, see Using MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html).
+// To see sample requests that use versioning, see Sample Request (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete).
+//
+// You can delete objects by explicitly calling the DELETE Object API or configure
+// its lifecycle (PutBucketLifecycle) to enable Amazon S3 to remove them for
+// you. If you want to block users or accounts from removing or deleting objects
+// from your bucket, you must deny them the s3:DeleteObject, s3:DeleteObjectVersion,
+// and s3:PutLifeCycleConfiguration actions.
+//
+// The following operation is related to DeleteObject:
+//
+// * PutObject
+//
// Returns awserr.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.
@@ -1376,7 +2003,21 @@ func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *r
// DeleteObjectTagging API operation for Amazon Simple Storage Service.
//
-// Removes the tag-set from an existing object.
+// Removes the entire tag set from the specified object. For more information
+// about managing object tags, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
+//
+// To use this operation, you must have permission to perform the s3:DeleteObjectTagging
+// action.
+//
+// To delete tags of a specific object version, add the versionId query parameter
+// in the request. You will need permission for the s3:DeleteObjectVersionTagging
+// action.
+//
+// The following operations are related to DeleteBucketMetricsConfiguration:
+//
+// * PutObjectTagging
+//
+// * GetObjectTagging
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -1445,13 +2086,57 @@ func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Reque
output = &DeleteObjectsOutput{}
req = c.newRequest(op, input, output)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// DeleteObjects API operation for Amazon Simple Storage Service.
//
// This operation enables you to delete multiple objects from a bucket using
-// a single HTTP request. You may specify up to 1000 keys.
+// a single HTTP request. If you know the object keys that you want to delete,
+// then this operation provides a suitable alternative to sending individual
+// delete requests, reducing per-request overhead.
+//
+// The request contains a list of up to 1000 keys that you want to delete. In
+// the XML, you provide the object key names, and optionally, version IDs if
+// you want to delete a specific version of the object from a versioning-enabled
+// bucket. For each key, Amazon S3 performs a delete operation and returns the
+// result of that delete, success, or failure, in the response. Note that if
+// the object specified in the request is not found, Amazon S3 returns the result
+// as deleted.
+//
+// The operation supports two modes for the response: verbose and quiet. By
+// default, the operation uses verbose mode in which the response includes the
+// result of deletion of each key in your request. In quiet mode the response
+// includes only keys where the delete operation encountered an error. For a
+// successful deletion, the operation does not return any information about
+// the delete in the response body.
+//
+// When performing this operation on an MFA Delete enabled bucket, that attempts
+// to delete any versioned objects, you must include an MFA token. If you do
+// not provide one, the entire request will fail, even if there are non-versioned
+// objects you are trying to delete. If you provide an invalid token, whether
+// there are versioned keys in the request or not, the entire Multi-Object Delete
+// request will fail. For information about MFA Delete, see MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete).
+//
+// Finally, the Content-MD5 header is required for all Multi-Object Delete requests.
+// Amazon S3 uses the header value to ensure that your request body has not
+// been altered in transit.
+//
+// The following operations are related to DeleteObjects:
+//
+// * CreateMultipartUpload
+//
+// * UploadPart
+//
+// * CompleteMultipartUpload
+//
+// * ListParts
+//
+// * AbortMultipartUpload
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -1526,7 +2211,21 @@ func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput)
// DeletePublicAccessBlock API operation for Amazon Simple Storage Service.
//
-// Removes the PublicAccessBlock configuration from an Amazon S3 bucket.
+// Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use
+// this operation, you must have the s3:PutBucketPublicAccessBlock permission.
+// For more information about permissions, see Permissions Related to Bucket
+// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// The following operations are related to DeletePublicAccessBlock:
+//
+// * Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
+//
+// * GetPublicAccessBlock
+//
+// * PutPublicAccessBlock
+//
+// * GetBucketPolicyStatus
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -1600,7 +2299,32 @@ func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateC
// GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
//
-// Returns the accelerate configuration of a bucket.
+// This implementation of the GET operation uses the accelerate subresource
+// to return the Transfer Acceleration state of a bucket, which is either Enabled
+// or Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that
+// enables you to perform faster data transfers to and from Amazon S3.
+//
+// To use this operation, you must have permission to perform the s3:GetAccelerateConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// You set the Transfer Acceleration state of an existing bucket to Enabled
+// or Suspended by using the PutBucketAccelerateConfiguration operation.
+//
+// A GET accelerate request does not return a state value for a bucket that
+// has no transfer acceleration state. A bucket has no Transfer Acceleration
+// state if a state has never been set on the bucket.
+//
+// For more information about transfer acceleration, see Transfer Acceleration
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Related Resources
+//
+// * PutBucketAccelerateConfiguration
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -1674,7 +2398,15 @@ func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request
// GetBucketAcl API operation for Amazon Simple Storage Service.
//
-// Gets the access control policy for the bucket.
+// This implementation of the GET operation uses the acl subresource to return
+// the access control list (ACL) of a bucket. To use GET to return the ACL of
+// the bucket, you must have READ_ACP access to the bucket. If READ_ACP permission
+// is granted to the anonymous user, you can return the ACL of the bucket without
+// using an authorization header.
+//
+// Related 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
@@ -1748,8 +2480,27 @@ func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsCon
// GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
//
-// Gets an analytics configuration for the bucket (specified by the analytics
-// configuration ID).
+// This implementation of the GET operation returns an analytics configuration
+// (identified by the analytics configuration ID) from the bucket.
+//
+// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// For information about Amazon S3 analytics feature, see Amazon S3 Analytics
+// – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Related 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
@@ -1823,7 +2574,20 @@ func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Reque
// GetBucketCors API operation for Amazon Simple Storage Service.
//
-// Returns the CORS configuration for the bucket.
+// Returns the cors configuration information set for the bucket.
+//
+// To use this operation, you must have permission to perform the s3:GetBucketCORS
+// action. By default, the bucket owner has this permission and can grant it
+// to others.
+//
+// For more information about cors, see Enabling Cross-Origin Resource Sharing
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html).
+//
+// The following operations are related to GetBucketCors:
+//
+// * PutBucketCors
+//
+// * DeleteBucketCors
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -1897,7 +2661,21 @@ func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *r
// GetBucketEncryption API operation for Amazon Simple Storage Service.
//
-// Returns the server-side encryption configuration of a bucket.
+// Returns the default encryption configuration for an Amazon S3 bucket. For
+// information about the Amazon S3 default encryption feature, see Amazon S3
+// Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html).
+//
+// To use this operation, you must have permission to perform the s3:GetEncryptionConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// The following operations are related to GetBucketEncryption:
+//
+// * PutBucketEncryption
+//
+// * DeleteBucketEncryption
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -1971,8 +2749,25 @@ func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryCon
// GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
//
-// Returns an inventory configuration (identified by the inventory ID) from
-// the bucket.
+// Returns an inventory configuration (identified by the inventory configuration
+// ID) from the bucket.
+//
+// To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration
+// action. The bucket owner has this permission by default and can grant this
+// permission to others. For more information about permissions, see Permissions
+// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html).
+//
+// The following operations are related to GetBucketInventoryConfiguration:
+//
+// * DeleteBucketInventoryConfiguration
+//
+// * ListBucketInventoryConfigurations
+//
+// * PutBucketInventoryConfiguration
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -2051,7 +2846,34 @@ func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *req
// GetBucketLifecycle API operation for Amazon Simple Storage Service.
//
-// No longer used, see the GetBucketLifecycleConfiguration operation.
+//
+// For an updated version of this API, see GetBucketLifecycleConfiguration.
+// If you configured a bucket lifecycle using the filter element, you should
+// see the updated version of this topic. This topic is provided for backward
+// compatibility.
+//
+// Returns the lifecycle configuration information set on the bucket. For information
+// about lifecycle configuration, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html).
+//
+// To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// GetBucketLifecycle has the following special error:
+//
+// * Error code: NoSuchLifecycleConfiguration Description: The lifecycle
+// configuration does not exist. HTTP Status Code: 404 Not Found SOAP Fault
+// Code Prefix: Client
+//
+// The following operations are related to GetBucketLifecycle:
+//
+// * GetBucketLifecycleConfiguration
+//
+// * PutBucketLifecycle
+//
+// * DeleteBucketLifecycle
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -2129,7 +2951,37 @@ func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleCon
// GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
//
-// Returns the lifecycle configuration information set on the bucket.
+//
+// Bucket lifecycle configuration now supports specifying a lifecycle rule using
+// an object key name prefix, one or more object tags, or a combination of both.
+// Accordingly, this section describes the latest API. The response describes
+// the new filter element that you can use to specify a filter to select a subset
+// of objects to which the rule applies. If you are still using previous version
+// of the lifecycle configuration, it works. For the earlier API description,
+// see GetBucketLifecycle.
+//
+// Returns the lifecycle configuration information set on the bucket. For information
+// about lifecycle configuration, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html).
+//
+// To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration
+// action. The bucket owner has this permission, by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// GetBucketLifecycleConfiguration has the following special error:
+//
+// * Error code: NoSuchLifecycleConfiguration Description: The lifecycle
+// configuration does not exist. HTTP Status Code: 404 Not Found SOAP Fault
+// Code Prefix: Client
+//
+// The following operations are related to GetBucketLifecycleConfiguration:
+//
+// * GetBucketLifecycle
+//
+// * PutBucketLifecycle
+//
+// * DeleteBucketLifecycle
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -2203,7 +3055,17 @@ func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *reque
// GetBucketLocation API operation for Amazon Simple Storage Service.
//
-// Returns the region the bucket resides in.
+// Returns the Region the bucket resides in. You set the bucket's Region using
+// the LocationConstraint request parameter in a CreateBucket request. For more
+// information, see CreateBucket.
+//
+// To use this implementation of the operation, you must be the bucket owner.
+//
+// The following operations are related to GetBucketLocation:
+//
+// * GetObject
+//
+// * CreateBucket
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -2280,6 +3142,12 @@ func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request
// Returns the logging status of a bucket and the permissions users have to
// view and modify that status. To use GET, you must be the bucket owner.
//
+// The following operations are related to GetBucketLogging:
+//
+// * CreateBucket
+//
+// * PutBucketLogging
+//
// Returns awserr.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.
@@ -2353,7 +3221,26 @@ func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigu
// GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
//
// Gets a metrics configuration (specified by the metrics configuration ID)
-// from the bucket.
+// from the bucket. Note that this doesn't include the daily storage metrics.
+//
+// To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// For information about CloudWatch request metrics for Amazon S3, see Monitoring
+// Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
+//
+// The following operations are related to GetBucketMetricsConfiguration:
+//
+// * PutBucketMetricsConfiguration
+//
+// * DeleteBucketMetricsConfiguration
+//
+// * ListBucketMetricsConfigurations
+//
+// * Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.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
@@ -2432,7 +3319,7 @@ func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurat
// GetBucketNotification API operation for Amazon Simple Storage Service.
//
-// No longer used, see the GetBucketNotificationConfiguration operation.
+// No longer used, see GetBucketNotificationConfiguration.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -2512,6 +3399,22 @@ func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificat
//
// Returns the notification configuration of a bucket.
//
+// If notifications are not enabled on the bucket, the operation returns an
+// empty NotificationConfiguration element.
+//
+// By default, you must be the bucket owner to read the notification configuration
+// of a bucket. However, the bucket owner can use a bucket policy to grant permission
+// to other users to read this configuration with the s3:GetBucketNotification
+// permission.
+//
+// For more information about setting and reading the notification configuration
+// on a bucket, see Setting Up Notification of Bucket Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
+// For more information about bucket policies, see Using Bucket Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
+//
+// The following operation is related to GetBucketNotification:
+//
+// * PutBucketNotification
+//
// Returns awserr.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.
@@ -2584,7 +3487,26 @@ func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.R
// GetBucketPolicy API operation for Amazon Simple Storage Service.
//
-// Returns the policy of a specified bucket.
+// Returns the policy of a specified bucket. If you are using an identity other
+// than the root user of the AWS account that owns the bucket, the calling identity
+// must have the GetBucketPolicy permissions on the specified bucket and belong
+// to the bucket owner's account in order to use this operation.
+//
+// If you don't have GetBucketPolicy permissions, Amazon S3 returns a 403 Access
+// Denied error. If you have the correct permissions, but you're not using an
+// identity that belongs to the bucket owner's account, Amazon S3 returns a
+// 405 Method Not Allowed error.
+//
+// As a security precaution, the root user of the AWS account that owns a bucket
+// can always use this operation, even if the policy explicitly denies the root
+// user the ability to perform this action.
+//
+// For more information about bucket policies, see Using Bucket Policies and
+// User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
+//
+// The following operation is related to GetBucketPolicy:
+//
+// * GetObject
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -2659,7 +3581,22 @@ func (c *S3) GetBucketPolicyStatusRequest(input *GetBucketPolicyStatusInput) (re
// GetBucketPolicyStatus API operation for Amazon Simple Storage Service.
//
// Retrieves the policy status for an Amazon S3 bucket, indicating whether the
-// bucket is public.
+// bucket is public. In order to use this operation, you must have the s3:GetBucketPolicyStatus
+// permission. For more information about Amazon S3 permissions, see Specifying
+// Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
+//
+// For more information about when Amazon S3 considers a bucket public, see
+// The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
+//
+// The following operations are related to GetBucketPolicyStatus:
+//
+// * Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
+//
+// * GetPublicAccessBlock
+//
+// * PutPublicAccessBlock
+//
+// * DeletePublicAccessBlock
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -2739,6 +3676,25 @@ func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req
// to all Amazon S3 systems. Therefore, a get request soon after put or delete
// can return a wrong result.
//
+// For information about replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// This operation requires permissions for the s3:GetReplicationConfiguration
+// action. For more information about permissions, see Using Bucket Policies
+// and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
+//
+// If you include the Filter element in a replication configuration, you must
+// also include the DeleteMarkerReplication and Priority elements. The response
+// also returns those elements.
+//
+// For information about GetBucketReplication errors, see ReplicationErrorCodeList
+//
+// The following operations are related to GetBucketReplication:
+//
+// * PutBucketReplication
+//
+// * DeleteBucketReplication
+//
// Returns awserr.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.
@@ -2811,7 +3767,13 @@ func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput)
// GetBucketRequestPayment API operation for Amazon Simple Storage Service.
//
-// Returns the request payment configuration of a bucket.
+// Returns the request payment configuration of a bucket. To use this version
+// of the operation, you must be the bucket owner. For more information, see
+// Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html).
+//
+// The following operations are related to GetBucketRequestPayment:
+//
+// * ListObjects
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -2887,6 +3849,21 @@ func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request
//
// Returns the tag set associated with the bucket.
//
+// To use this operation, you must have permission to perform the s3:GetBucketTagging
+// action. By default, the bucket owner has this permission and can grant this
+// permission to others.
+//
+// GetBucketTagging has the following special error:
+//
+// * Error code: NoSuchTagSetError Description: There is no tag set associated
+// with the bucket.
+//
+// The following operations are related to GetBucketTagging:
+//
+// * PutBucketTagging
+//
+// * DeleteBucketTagging
+//
// Returns awserr.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.
@@ -2961,6 +3938,20 @@ func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *r
//
// Returns the versioning state of a bucket.
//
+// To retrieve the versioning state of a bucket, you must be the bucket owner.
+//
+// This implementation also returns the MFA Delete status of the versioning
+// state. If the MFA Delete status is enabled, the bucket owner must use an
+// authentication device to change the versioning state of the bucket.
+//
+// The following operations are related to GetBucketVersioning:
+//
+// * GetObject
+//
+// * PutObject
+//
+// * DeleteObject
+//
// Returns awserr.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.
@@ -3033,7 +4024,21 @@ func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request
// GetBucketWebsite API operation for Amazon Simple Storage Service.
//
-// Returns the website configuration for a bucket.
+// Returns the website configuration for a bucket. To host website on Amazon
+// S3, you can configure a bucket as website by adding a website configuration.
+// For more information about hosting websites, see Hosting Websites on Amazon
+// S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
+//
+// This GET operation requires the S3:GetBucketWebsite permission. By default,
+// only the bucket owner can read the bucket website configuration. However,
+// bucket owners can allow other users to read the website configuration by
+// writing a bucket policy granting them the S3:GetBucketWebsite permission.
+//
+// The following operations are related to DeleteBucketWebsite:
+//
+// * DeleteBucketWebsite
+//
+// * PutBucketWebsite
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -3107,7 +4112,130 @@ func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, outp
// GetObject API operation for Amazon Simple Storage Service.
//
-// Retrieves objects from Amazon S3.
+// Retrieves objects from Amazon S3. To use GET, you must have READ access to
+// the object. If you grant READ access to the anonymous user, you can return
+// the object without using an authorization header.
+//
+// An Amazon S3 bucket has no directory hierarchy such as you would find in
+// a typical computer file system. You can, however, create a logical hierarchy
+// by using object key names that imply a folder structure. For example, instead
+// of naming an object sample.jpg, you can name it photos/2006/February/sample.jpg.
+//
+// To get an object from such a logical hierarchy, specify the full key name
+// for the object in the GET operation. For a virtual hosted-style request example,
+// if you have the object photos/2006/February/sample.jpg, specify the resource
+// as /photos/2006/February/sample.jpg. For a path-style request example, if
+// you have the object photos/2006/February/sample.jpg in the bucket named examplebucket,
+// specify the resource as /examplebucket/photos/2006/February/sample.jpg. For
+// more information about request types, see HTTP Host Header Bucket Specification
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket).
+//
+// To distribute large files to many people, you can save bandwidth costs by
+// using BitTorrent. For more information, see Amazon S3 Torrent (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html).
+// For more information about returning the ACL of an object, see GetObjectAcl.
+//
+// If the object you are retrieving is stored in the GLACIER or DEEP_ARCHIVE
+// storage classes, before you can retrieve the object you must first restore
+// a copy using . Otherwise, this operation returns an InvalidObjectStateError
+// error. For information about restoring archived objects, see Restoring Archived
+// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html).
+//
+// Encryption request headers, like x-amz-server-side-encryption, should not
+// be sent for GET requests if your object uses server-side encryption with
+// CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon S3–managed
+// encryption keys (SSE-S3). If your object does use these types of keys, you’ll
+// get an HTTP 400 BadRequest error.
+//
+// If you encrypt an object by using server-side encryption with customer-provided
+// encryption keys (SSE-C) when you store the object in Amazon S3, then when
+// you GET the object, you must use the following headers:
+//
+// * x-amz-server-side-encryption-customer-algorithm
+//
+// * x-amz-server-side-encryption-customer-key
+//
+// * x-amz-server-side-encryption-customer-key-MD5
+//
+// For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided
+// Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
+//
+// Assuming you have permission to read object tags (permission for the s3:GetObjectVersionTagging
+// action), the response also returns the x-amz-tagging-count header that provides
+// the count of number of tags associated with the object. You can use GetObjectTagging
+// to retrieve the tag set associated with an object.
+//
+// Permissions
+//
+// You need the s3:GetObject permission for this operation. For more information,
+// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
+// If the object you request does not exist, the error Amazon S3 returns depends
+// on whether you also have the s3:ListBucket permission.
+//
+// * If you have the s3:ListBucket permission on the bucket, Amazon S3 will
+// return an HTTP status code 404 ("no such key") error.
+//
+// * If you don’t have the s3:ListBucket permission, Amazon S3 will return
+// an HTTP status code 403 ("access denied") error.
+//
+// Versioning
+//
+// By default, the GET operation returns the current version of an object. To
+// return a different version, use the versionId subresource.
+//
+// If the current version of the object is a delete marker, Amazon S3 behaves
+// as if the object was deleted and includes x-amz-delete-marker: true in the
+// response.
+//
+// For more information about versioning, see PutBucketVersioning.
+//
+// Overriding Response Header Values
+//
+// There are times when you want to override certain response header values
+// in a GET response. For example, you might override the Content-Disposition
+// response header value in your GET request.
+//
+// You can override values for a set of response headers using the following
+// query parameters. These response header values are sent only on a successful
+// request, that is, when status code 200 OK is returned. The set of headers
+// you can override using these parameters is a subset of the headers that Amazon
+// S3 accepts when you create an object. The response headers that you can override
+// for the GET response are Content-Type, Content-Language, Expires, Cache-Control,
+// Content-Disposition, and Content-Encoding. To override these header values
+// in the GET response, you use the following request parameters.
+//
+// You must sign the request, either using an Authorization header or a presigned
+// URL, when using these parameters. They cannot be used with an unsigned (anonymous)
+// request.
+//
+// * response-content-type
+//
+// * response-content-language
+//
+// * response-expires
+//
+// * response-cache-control
+//
+// * response-content-disposition
+//
+// * response-content-encoding
+//
+// Additional Considerations about Request Headers
+//
+// If both of the If-Match and If-Unmodified-Since headers are present in the
+// request as follows: If-Match condition evaluates to true, and; If-Unmodified-Since
+// condition evaluates to false; then, S3 returns 200 OK and the data requested.
+//
+// If both of the If-None-Match and If-Modified-Since headers are present in
+// the request as follows:If-None-Match condition evaluates to false, and; If-Modified-Since
+// condition evaluates to true; then, S3 returns 304 Not Modified response code.
+//
+// For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232).
+//
+// The following operations are related to GetObject:
+//
+// * ListBuckets
+//
+// * GetObjectAcl
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -3186,7 +4314,21 @@ func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request
// GetObjectAcl API operation for Amazon Simple Storage Service.
//
-// Returns the access control list (ACL) of an object.
+// Returns the access control list (ACL) of an object. To use this operation,
+// you must have READ_ACP access to the object.
+//
+// Versioning
+//
+// By default, GET returns ACL information about the current version of an object.
+// To return ACL information about a different version, use the versionId subresource.
+//
+// The following operations are related to GetObjectAcl:
+//
+// * GetObject
+//
+// * DeleteObject
+//
+// * PutObject
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -3265,7 +4407,8 @@ func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *req
// GetObjectLegalHold API operation for Amazon Simple Storage Service.
//
-// Gets an object's current Legal Hold status.
+// Gets an object's current Legal Hold status. For more information, see Locking
+// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.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
@@ -3339,9 +4482,10 @@ func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfiguration
// GetObjectLockConfiguration API operation for Amazon Simple Storage Service.
//
-// Gets the object lock configuration for a bucket. The rule specified in the
-// object lock configuration will be applied by default to every new object
-// placed in the specified bucket.
+// Gets the Object Lock configuration for a bucket. The rule specified in the
+// Object Lock configuration will be applied by default to every new object
+// placed in the specified bucket. For more information, see Locking Objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.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
@@ -3415,7 +4559,8 @@ func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *req
// GetObjectRetention API operation for Amazon Simple Storage Service.
//
-// Retrieves an object's retention settings.
+// Retrieves an object's retention settings. For more information, see Locking
+// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.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
@@ -3489,7 +4634,25 @@ func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request
// GetObjectTagging API operation for Amazon Simple Storage Service.
//
-// Returns the tag-set of an object.
+// Returns the tag-set of an object. You send the GET request against the tagging
+// subresource associated with the object.
+//
+// To use this operation, you must have permission to perform the s3:GetObjectTagging
+// action. By default, the GET operation returns information about current version
+// of an object. For a versioned bucket, you can have multiple versions of an
+// object in your bucket. To retrieve tags of any other version, use the versionId
+// query parameter. You also need permission for the s3:GetObjectVersionTagging
+// action.
+//
+// By default, the bucket owner has this permission and can grant this permission
+// to others.
+//
+// For information about the Amazon S3 object tagging feature, see Object Tagging
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
+//
+// The following operation is related to GetObjectTagging:
+//
+// * PutObjectTagging
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -3563,7 +4726,19 @@ func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request
// GetObjectTorrent API operation for Amazon Simple Storage Service.
//
-// Return torrent files from a bucket.
+// Return torrent files from a bucket. BitTorrent can save you bandwidth when
+// you're distributing large files. For more information about BitTorrent, see
+// Amazon S3 Torrent (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html).
+//
+// You can get torrent only for objects that are less than 5 GB in size and
+// that are not encrypted using server-side encryption with customer-provided
+// encryption key.
+//
+// To use GET, you must have READ access to the object.
+//
+// The following operation is related to GetObjectTorrent:
+//
+// * GetObject
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -3637,7 +4812,30 @@ func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req
// GetPublicAccessBlock API operation for Amazon Simple Storage Service.
//
-// Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket.
+// Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To
+// use this operation, you must have the s3:GetBucketPublicAccessBlock permission.
+// For more information about Amazon S3 permissions, see Specifying Permissions
+// in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
+//
+// When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket
+// or an object, it checks the PublicAccessBlock configuration for both the
+// bucket (or the bucket that contains the object) and the bucket owner's account.
+// If the PublicAccessBlock settings are different between the bucket and the
+// account, Amazon S3 uses the most restrictive combination of the bucket-level
+// and account-level settings.
+//
+// For more information about when Amazon S3 considers a bucket or an object
+// public, see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
+//
+// The following operations are related to GetPublicAccessBlock:
+//
+// * Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
+//
+// * PutPublicAccessBlock
+//
+// * GetPublicAccessBlock
+//
+// * DeletePublicAccessBlock
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -3713,7 +4911,15 @@ func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, ou
// HeadBucket API operation for Amazon Simple Storage Service.
//
// This operation is useful to determine if a bucket exists and you have permission
-// to access it.
+// to access it. The operation returns a 200 OK if the bucket exists and you
+// have permission to access it. Otherwise, the operation might return responses
+// such as 404 Not Found and 403 Forbidden.
+//
+// To use this operation, you must have permissions to perform the s3:ListBucket
+// action. The bucket owner has this permission by default and can grant this
+// permission to others. For more information about permissions, see Permissions
+// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.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
@@ -3796,6 +5002,63 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou
// object itself. This operation is useful if you're only interested in an object's
// metadata. To use HEAD, you must have READ access to the object.
//
+// A HEAD request has the same options as a GET operation on an object. The
+// response is identical to the GET response except that there is no response
+// body.
+//
+// If you encrypt an object by using server-side encryption with customer-provided
+// encryption keys (SSE-C) when you store the object in Amazon S3, then when
+// you retrieve the metadata from the object, you must use the following headers:
+//
+// * x-amz-server-side-encryption-customer-algorithm
+//
+// * x-amz-server-side-encryption-customer-key
+//
+// * x-amz-server-side-encryption-customer-key-MD5
+//
+// For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided
+// Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
+//
+// Encryption request headers, like x-amz-server-side-encryption, should not
+// be sent for GET requests if your object uses server-side encryption with
+// CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon S3–managed
+// encryption keys (SSE-S3). If your object does use these types of keys, you’ll
+// get an HTTP 400 BadRequest error.
+//
+// Request headers are limited to 8 KB in size. For more information, see Common
+// Request Headers (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html).
+//
+// Consider the following when using request headers:
+//
+// * Consideration 1 – If both of the If-Match and If-Unmodified-Since
+// headers are present in the request as follows: If-Match condition evaluates
+// to true, and; If-Unmodified-Since condition evaluates to false; Then Amazon
+// S3 returns 200 OK and the data requested.
+//
+// * Consideration 2 – If both of the If-None-Match and If-Modified-Since
+// headers are present in the request as follows: If-None-Match condition
+// evaluates to false, and; If-Modified-Since condition evaluates to true;
+// Then Amazon S3 returns the 304 Not Modified response code.
+//
+// For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232).
+//
+// Permissions
+//
+// You need the s3:GetObject permission for this operation. For more information,
+// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
+// If the object you request does not exist, the error Amazon S3 returns depends
+// on whether you also have the s3:ListBucket permission.
+//
+// * If you have the s3:ListBucket permission on the bucket, Amazon S3 returns
+// an HTTP status code 404 ("no such key") error.
+//
+// * If you don’t have the s3:ListBucket permission, Amazon S3 returns
+// an HTTP status code 403 ("access denied") error.
+//
+// The following operation is related to HeadObject:
+//
+// * GetObject
+//
// See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
// for more information on returned errors.
//
@@ -3871,7 +5134,33 @@ func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalytics
// ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
//
-// Lists the analytics configurations for the bucket.
+// Lists the analytics configurations for the bucket. You can have up to 1,000
+// analytics configurations per bucket.
+//
+// This operation supports list pagination and does not return more than 100
+// configurations at a time. You should always check the IsTruncated element
+// in the response. If there are no more configurations to list, IsTruncated
+// is set to false. If there are more configurations to list, IsTruncated is
+// set to true, and there will be a value in NextContinuationToken. You use
+// the NextContinuationToken value to continue the pagination of the list by
+// passing the value in continuation-token in the request to GET the next page.
+//
+// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// For information about Amazon S3 analytics feature, see Amazon S3 Analytics
+// – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
+//
+// The following operations are related to ListBucketAnalyticsConfigurations:
+//
+// * GetBucketAnalyticsConfiguration
+//
+// * DeleteBucketAnalyticsConfiguration
+//
+// * PutBucketAnalyticsConfiguration
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -3945,7 +5234,33 @@ func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventory
// ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
//
-// Returns a list of inventory configurations for the bucket.
+// Returns a list of inventory configurations for the bucket. You can have up
+// to 1,000 analytics configurations per bucket.
+//
+// This operation supports list pagination and does not return more than 100
+// configurations at a time. Always check the IsTruncated element in the response.
+// If there are no more configurations to list, IsTruncated is set to false.
+// If there are more configurations to list, IsTruncated is set to true, and
+// there is a value in NextContinuationToken. You use the NextContinuationToken
+// value to continue the pagination of the list by passing the value in continuation-token
+// in the request to GET the next page.
+//
+// To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html)
+//
+// The following operations are related to ListBucketInventoryConfigurations:
+//
+// * GetBucketInventoryConfiguration
+//
+// * DeleteBucketInventoryConfiguration
+//
+// * PutBucketInventoryConfiguration
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4019,7 +5334,34 @@ func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConf
// ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
//
-// Lists the metrics configurations for the bucket.
+// Lists the metrics configurations for the bucket. The metrics configurations
+// are only for the request metrics of the bucket and do not provide information
+// on daily storage metrics. You can have up to 1,000 configurations per bucket.
+//
+// This operation supports list pagination and does not return more than 100
+// configurations at a time. Always check the IsTruncated element in the response.
+// If there are no more configurations to list, IsTruncated is set to false.
+// If there are more configurations to list, IsTruncated is set to true, and
+// there is a value in NextContinuationToken. You use the NextContinuationToken
+// value to continue the pagination of the list by passing the value in continuation-token
+// in the request to GET the next page.
+//
+// To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// For more information about metrics configurations and CloudWatch request
+// metrics, see Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
+//
+// The following operations are related to ListBucketMetricsConfigurations:
+//
+// * PutBucketMetricsConfiguration
+//
+// * GetBucketMetricsConfiguration
+//
+// * DeleteBucketMetricsConfiguration
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4173,7 +5515,40 @@ func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req
// ListMultipartUploads API operation for Amazon Simple Storage Service.
//
-// This operation lists in-progress multipart uploads.
+// This operation lists in-progress multipart uploads. An in-progress multipart
+// upload is a multipart upload that has been initiated using the Initiate Multipart
+// Upload request, but has not yet been completed or aborted.
+//
+// This operation returns at most 1,000 multipart uploads in the response. 1,000
+// multipart uploads is the maximum number of uploads a response can include,
+// which is also the default value. You can further limit the number of uploads
+// in a response by specifying the max-uploads parameter in the response. If
+// additional multipart uploads satisfy the list criteria, the response will
+// contain an IsTruncated element with the value true. To list the additional
+// multipart uploads, use the key-marker and upload-id-marker request parameters.
+//
+// In the response, the uploads are sorted by key. If your application has initiated
+// more than one multipart upload using the same object key, then uploads in
+// the response are first sorted by key. Additionally, uploads are sorted in
+// ascending order within each key by the upload initiation time.
+//
+// For more information on multipart uploads, see Uploading Objects Using Multipart
+// Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
+//
+// For information on permissions required to use the multipart upload API,
+// see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
+//
+// The following operations are related to ListMultipartUploads:
+//
+// * CreateMultipartUpload
+//
+// * UploadPart
+//
+// * CompleteMultipartUpload
+//
+// * ListParts
+//
+// * AbortMultipartUpload
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4246,10 +5621,12 @@ func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMu
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -4303,7 +5680,24 @@ func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *req
// ListObjectVersions API operation for Amazon Simple Storage Service.
//
-// Returns metadata about all of the versions of objects in a bucket.
+// Returns metadata about all of the versions of objects in a bucket. You can
+// also use request parameters as selection criteria to return metadata about
+// a subset of all the object versions.
+//
+// A 200 OK response can contain valid or invalid XML. Make sure to design your
+// application to parse the contents of the response and handle it appropriately.
+//
+// To use this operation, you must have READ access to the bucket.
+//
+// The following operations are related to ListObjectVersions:
+//
+// * ListObjectsV2
+//
+// * GetObject
+//
+// * PutObject
+//
+// * DeleteObject
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4376,10 +5770,12 @@ func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObje
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -4433,9 +5829,27 @@ func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request,
// ListObjects API operation for Amazon Simple Storage Service.
//
-// Returns some or all (up to 1000) of the objects in a bucket. You can use
+// Returns some or all (up to 1,000) of the objects in a bucket. You can use
// the request parameters as selection criteria to return a subset of the objects
-// in a bucket.
+// in a bucket. A 200 OK response can contain valid or invalid XML. Be sure
+// to design your application to parse the contents of the response and handle
+// it appropriately.
+//
+// This API has been revised. We recommend that you use the newer version, ListObjectsV2,
+// when developing applications. For backward compatibility, Amazon S3 continues
+// to support ListObjects.
+//
+// The following operations are related to ListObjects:
+//
+// * ListObjectsV2
+//
+// * GetObject
+//
+// * PutObject
+//
+// * CreateBucket
+//
+// * ListBuckets
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4513,10 +5927,12 @@ func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInpu
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListObjectsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -4570,10 +5986,34 @@ func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Reque
// ListObjectsV2 API operation for Amazon Simple Storage Service.
//
-// Returns some or all (up to 1000) of the objects in a bucket. You can use
+// Returns some or all (up to 1,000) of the objects in a bucket. You can use
// the request parameters as selection criteria to return a subset of the objects
-// in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
-// you use this revised API for new application development.
+// in a bucket. A 200 OK response can contain valid or invalid XML. Make sure
+// to design your application to parse the contents of the response and handle
+// it appropriately.
+//
+// To use this operation, you must have READ access to the bucket.
+//
+// To use this operation in an AWS Identity and Access Management (IAM) policy,
+// you must have permissions to perform the s3:ListBucket action. The bucket
+// owner has this permission by default and can grant this permission to others.
+// For more information about permissions, see Permissions Related to Bucket
+// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// This section describes the latest revision of the API. We recommend that
+// you use this revised API for application development. For backward compatibility,
+// Amazon S3 continues to support the prior version of this API, ListObjects.
+//
+// To get a list of your buckets, see ListBuckets.
+//
+// The following operations are related to ListObjectsV2:
+//
+// * GetObject
+//
+// * PutObject
+//
+// * CreateBucket
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4651,10 +6091,12 @@ func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -4709,6 +6151,33 @@ func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, outp
// ListParts API operation for Amazon Simple Storage Service.
//
// Lists the parts that have been uploaded for a specific multipart upload.
+// This operation must include the upload ID, which you obtain by sending the
+// initiate multipart upload request (see CreateMultipartUpload). This request
+// returns a maximum of 1,000 uploaded parts. The default number of parts returned
+// is 1,000 parts. You can restrict the number of parts returned by specifying
+// the max-parts request parameter. If your multipart upload consists of more
+// than 1,000 parts, the response returns an IsTruncated field with the value
+// of true, and a NextPartNumberMarker element. In subsequent ListParts requests
+// you can include the part-number-marker query string parameter and set its
+// value to the NextPartNumberMarker field value from the previous response.
+//
+// For more information on multipart uploads, see Uploading Objects Using Multipart
+// Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
+//
+// For information on permissions required to use the multipart upload API,
+// see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
+//
+// The following operations are related to ListParts:
+//
+// * CreateMultipartUpload
+//
+// * UploadPart
+//
+// * CompleteMultipartUpload
+//
+// * AbortMultipartUpload
+//
+// * ListMultipartUploads
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4781,10 +6250,12 @@ func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, f
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -4833,7 +6304,41 @@ func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateC
// PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
//
-// Sets the accelerate configuration of an existing bucket.
+// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer
+// Acceleration is a bucket-level feature that enables you to perform faster
+// data transfers to Amazon S3.
+//
+// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// The Transfer Acceleration state of a bucket can be set to one of the following
+// two values:
+//
+// * Enabled – Enables accelerated data transfers to the bucket.
+//
+// * Suspended – Disables accelerated data transfers to the bucket.
+//
+// The GetBucketAccelerateConfiguration operation returns the transfer acceleration
+// state of a bucket.
+//
+// After setting the Transfer Acceleration state of a bucket to Enabled, it
+// might take up to thirty minutes before the data transfer rates to the bucket
+// increase.
+//
+// The name of the bucket used for Transfer Acceleration must be DNS-compliant
+// and must not contain periods (".").
+//
+// For more information about transfer acceleration, see Transfer Acceleration
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
+//
+// The following operations are related to PutBucketAccelerateConfiguration:
+//
+// * GetBucketAccelerateConfiguration
+//
+// * CreateBucket
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4903,12 +6408,101 @@ func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request
output = &PutBucketAclOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutBucketAcl API operation for Amazon Simple Storage Service.
//
-// Sets the permissions on a bucket using access control lists (ACL).
+// Sets the permissions on an existing bucket using access control lists (ACL).
+// For more information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html).
+// To set the ACL of a bucket, you must have WRITE_ACP permission.
+//
+// You can use one of the following two ways to set a bucket's permissions:
+//
+// * Specify the ACL in the request body
+//
+// * Specify permissions using request headers
+//
+// You cannot specify access permission using both the body and the request
+// headers.
+//
+// Depending on your application needs, you may choose to set the ACL on a bucket
+// using either the request body or the headers. For example, if you have an
+// existing application that updates a bucket ACL using the request body, then
+// you can continue to use that approach.
+//
+// Access Permissions
+//
+// You can set access permissions using one of the following methods:
+//
+// * Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports
+// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a
+// predefined set of grantees and permissions. Specify the canned ACL name
+// as the value of x-amz-acl. If you use this header, you cannot use other
+// access control-specific headers in your request. For more information,
+// see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
+//
+// * Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp,
+// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using
+// these headers, you specify explicit access permissions and grantees (AWS
+// accounts or Amazon S3 groups) who will receive the permission. If you
+// use these ACL-specific headers, you cannot use the x-amz-acl header to
+// set a canned ACL. These parameters map to the set of permissions that
+// Amazon S3 supports in an ACL. For more information, see Access Control
+// List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
+// You specify each grantee as a type=value pair, where the type is one of
+// the following: id – if the value specified is the canonical user ID
+// of an AWS account uri – if you are granting permissions to a predefined
+// group emailAddress – if the value specified is the email address of
+// an AWS account Using email addresses to specify a grantee is only supported
+// in the following AWS Regions: US East (N. Virginia) US West (N. California)
+// US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific
+// (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all
+// the Amazon S3 supported Regions and endpoints, see Regions and Endpoints
+// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in
+// the AWS General Reference. For example, the following x-amz-grant-write
+// header grants create, overwrite, and delete objects permission to LogDelivery
+// group predefined by Amazon S3 and two AWS accounts identified by their
+// email addresses. x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery",
+// id="111122223333", id="555566667777"
+//
+// You can use either a canned ACL or specify access permissions explicitly.
+// You cannot do both.
+//
+// Grantee Values
+//
+// You can specify the person (grantee) to whom you're assigning access rights
+// (using request elements) in the following ways:
+//
+// * By the person's ID: <>ID<><>GranteesEmail<>
+// DisplayName is optional and ignored in the request
+//
+// * By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
+//
+// * By Email address: <>Grantees@email.com<>lt;/Grantee>
+// The grantee is resolved to the CanonicalUser and, in a response to a GET
+// Object acl request, appears as the CanonicalUser. Using email addresses
+// to specify a grantee is only supported in the following AWS Regions: US
+// East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific
+// (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland)
+// South America (São Paulo) For a list of all the Amazon S3 supported Regions
+// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+// in the AWS General Reference.
+//
+// Related Resources
+//
+// * CreateBucket
+//
+// * DeleteBucket
+//
+// * GetObjectAcl
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4984,7 +6578,50 @@ func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsCon
// PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
//
// Sets an analytics configuration for the bucket (specified by the analytics
-// configuration ID).
+// configuration ID). You can have up to 1,000 analytics configurations per
+// bucket.
+//
+// You can choose to have storage class analysis export analysis reports sent
+// to a comma-separated values (CSV) flat file. See the DataExport request element.
+// Reports are updated daily and are based on the object filters that you configure.
+// When selecting data export, you specify a destination bucket and an optional
+// destination prefix where the file is written. You can export the data to
+// a destination bucket in a different account. However, the destination bucket
+// must be in the same Region as the bucket that you are making the PUT analytics
+// configuration to. For more information, see Amazon S3 Analytics – Storage
+// Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
+//
+// You must create a bucket policy on the destination bucket where the exported
+// file is written to grant permissions to Amazon S3 to write objects to the
+// bucket. For an example policy, see Granting Permissions for Amazon S3 Inventory
+// and Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9).
+//
+// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// Special Errors
+//
+// * HTTP Error: HTTP 400 Bad Request Code: InvalidArgument Cause: Invalid
+// argument.
+//
+// * HTTP Error: HTTP 400 Bad Request Code: TooManyConfigurations Cause:
+// You are attempting to create a new configuration but have already reached
+// the 1,000-configuration limit.
+//
+// * HTTP Error: HTTP 403 Forbidden Code: AccessDenied Cause: You are not
+// the owner of the specified bucket, or you do not have the s3:PutAnalyticsConfiguration
+// bucket permission to set the configuration on the bucket.
+//
+// Related 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
@@ -5054,12 +6691,58 @@ func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Reque
output = &PutBucketCorsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutBucketCors API operation for Amazon Simple Storage Service.
//
-// Sets the CORS configuration for a bucket.
+// Sets the cors configuration for your bucket. If the configuration exists,
+// Amazon S3 replaces it.
+//
+// To use this operation, you must be allowed to perform the s3:PutBucketCORS
+// action. By default, the bucket owner has this permission and can grant it
+// to others.
+//
+// You set this configuration on a bucket so that the bucket can service cross-origin
+// requests. For example, you might want to enable a request whose origin is
+// http://www.example.com to access your Amazon S3 bucket at my.example.bucket.com
+// by using the browser's XMLHttpRequest capability.
+//
+// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors
+// subresource to the bucket. The cors subresource is an XML document in which
+// you configure rules that identify origins and the HTTP methods that can be
+// executed on your bucket. The document is limited to 64 KB in size.
+//
+// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request)
+// against a bucket, it evaluates the cors configuration on the bucket and uses
+// the first CORSRule rule that matches the incoming browser request to enable
+// a cross-origin request. For a rule to match, the following conditions must
+// be met:
+//
+// * The request's Origin header must match AllowedOrigin elements.
+//
+// * The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method
+// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod
+// elements.
+//
+// * Every header specified in the Access-Control-Request-Headers request
+// header of a pre-flight request must match an AllowedHeader element.
+//
+// For more information about CORS, go to Enabling Cross-Origin Resource Sharing
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon
+// Simple Storage Service Developer Guide.
+//
+// Related Resources
+//
+// * GetBucketCors
+//
+// * DeleteBucketCors
+//
+// * RESTOPTIONSobject
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -5129,13 +6812,38 @@ func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *r
output = &PutBucketEncryptionOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutBucketEncryption API operation for Amazon Simple Storage Service.
//
-// Creates a new server-side encryption configuration (or replaces an existing
-// one, if present).
+// This implementation of the PUT operation uses the encryption subresource
+// to set the default encryption state of an existing bucket.
+//
+// This implementation of the PUT operation sets default encryption for a bucket
+// using server-side encryption with Amazon S3-managed keys SSE-S3 or AWS KMS
+// customer master keys (CMKs) (SSE-KMS). For information about the Amazon S3
+// default encryption feature, see Amazon S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html).
+//
+// This operation requires AWS Signature Version 4. For more information, see
+// Authenticating Requests (AWS Signature Version 4) (sig-v4-authenticating-requests.html).
+//
+// To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Related Resources
+//
+// * GetBucketEncryption
+//
+// * DeleteBucketEncryption
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -5210,8 +6918,54 @@ func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryCon
// PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
//
-// Adds an inventory configuration (identified by the inventory ID) from the
-// bucket.
+// This implementation of the PUT operation adds an inventory configuration
+// (identified by the inventory ID) to the bucket. You can have up to 1,000
+// inventory configurations per bucket.
+//
+// Amazon S3 inventory generates inventories of the objects in the bucket on
+// a daily or weekly basis, and the results are published to a flat file. The
+// bucket that is inventoried is called the source bucket, and the bucket where
+// the inventory flat file is stored is called the destination bucket. The destination
+// bucket must be in the same AWS Region as the source bucket.
+//
+// When you configure an inventory for a source bucket, you specify the destination
+// bucket where you want the inventory to be stored, and whether to generate
+// the inventory daily or weekly. You can also configure what object metadata
+// to include and whether to inventory all object versions or only current versions.
+// For more information, see Amazon S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// You must create a bucket policy on the destination bucket to grant permissions
+// to Amazon S3 to write objects to the bucket in the defined location. For
+// an example policy, see Granting Permissions for Amazon S3 Inventory and Storage
+// Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9).
+//
+// To use this operation, you must have permissions to perform the s3:PutInventoryConfiguration
+// action. The bucket owner has this permission by default and can grant this
+// permission to others. For more information about permissions, see Permissions
+// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Special Errors
+//
+// * HTTP 400 Bad Request Error Code: InvalidArgument Cause: Invalid Argument
+//
+// * HTTP 400 Bad Request Error Code: TooManyConfigurations Cause: You are
+// attempting to create a new configuration but have already reached the
+// 1,000-configuration limit.
+//
+// * HTTP 403 Forbidden Error Code: AccessDenied Cause: You are not the owner
+// of the specified bucket, or you do not have the s3:PutInventoryConfiguration
+// bucket permission to set the configuration on the bucket.
+//
+// Related Resources
+//
+// * GetBucketInventoryConfiguration
+//
+// * DeleteBucketInventoryConfiguration
+//
+// * ListBucketInventoryConfigurations
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -5286,12 +7040,64 @@ func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *req
output = &PutBucketLifecycleOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutBucketLifecycle API operation for Amazon Simple Storage Service.
//
-// No longer used, see the PutBucketLifecycleConfiguration operation.
+//
+// For an updated version of this API, see PutBucketLifecycleConfiguration.
+// This version has been deprecated. Existing lifecycle configurations will
+// work. For new lifecycle configurations, use the updated API.
+//
+// Creates a new lifecycle configuration for the bucket or replaces an existing
+// lifecycle configuration. For information about lifecycle configuration, see
+// Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// By default, all Amazon S3 resources, including buckets, objects, and related
+// subresources (for example, lifecycle configuration and website configuration)
+// are private. Only the resource owner, the AWS account that created the resource,
+// can access it. The resource owner can optionally grant access permissions
+// to others by writing an access policy. For this operation, users must get
+// the s3:PutLifecycleConfiguration permission.
+//
+// You can also explicitly deny permissions. Explicit denial also supersedes
+// any other permissions. If you want to prevent users or accounts from removing
+// or deleting objects from your bucket, you must deny them permissions for
+// the following actions:
+//
+// * s3:DeleteObject
+//
+// * s3:DeleteObjectVersion
+//
+// * s3:PutLifecycleConfiguration
+//
+// For more information about permissions, see Managing Access Permissions to
+// your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// For more examples of transitioning objects to storage classes such as STANDARD_IA
+// or ONEZONE_IA, see Examples of Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#lifecycle-configuration-examples).
+//
+// Related Resources
+//
+// * GetBucketLifecycle(Deprecated)
+//
+// * GetBucketLifecycleConfiguration
+//
+// *
+//
+// * By default, a resource owner—in this case, a bucket owner, which is
+// the AWS account that created the bucket—can perform any of the operations.
+// A resource owner can also grant others permission to perform the operation.
+// For more information, see the following topics in the Amazon Simple Storage
+// Service Developer Guide: Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.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
@@ -5365,24 +7171,89 @@ func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleCon
output = &PutBucketLifecycleConfigurationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
//
-// Sets lifecycle configuration for your bucket. If a lifecycle configuration
-// exists, it replaces it.
+// Creates a new lifecycle configuration for the bucket or replaces an existing
+// lifecycle configuration. For information about lifecycle configuration, see
+// Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.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.
+// Bucket lifecycle configuration now supports specifying a lifecycle rule using
+// an object key name prefix, one or more object tags, or a combination of both.
+// Accordingly, this section describes the latest API. The previous version
+// of the API supported filtering based only on an object key name prefix, which
+// is supported for backward compatibility. For the related API description,
+// see PutBucketLifecycle.
//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketLifecycleConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
-func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
- req, out := c.PutBucketLifecycleConfigurationRequest(input)
- return out, req.Send()
+// Rules
+//
+// You specify the lifecycle configuration in your request body. The lifecycle
+// configuration is specified as XML consisting of one or more rules. Each rule
+// consists of the following:
+//
+// * Filter identifying a subset of objects to which the rule applies. The
+// filter can be based on a key name prefix, object tags, or a combination
+// of both.
+//
+// * Status whether the rule is in effect.
+//
+// * One or more lifecycle transition and expiration actions that you want
+// Amazon S3 to perform on the objects identified by the filter. If the state
+// of your bucket is versioning-enabled or versioning-suspended, you can
+// have many versions of the same object (one current version and zero or
+// more noncurrent versions). Amazon S3 provides predefined actions that
+// you can specify for current and noncurrent object versions.
+//
+// For more information, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
+// and Lifecycle Configuration Elements (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html).
+//
+// Permissions
+//
+// By default, all Amazon S3 resources are private, including buckets, objects,
+// and related subresources (for example, lifecycle configuration and website
+// configuration). Only the resource owner (that is, the AWS account that created
+// it) can access the resource. The resource owner can optionally grant access
+// permissions to others by writing an access policy. For this operation, a
+// user must get the s3:PutLifecycleConfiguration permission.
+//
+// You can also explicitly deny permissions. Explicit deny also supersedes any
+// other permissions. If you want to block users or accounts from removing or
+// deleting objects from your bucket, you must deny them permissions for the
+// following actions:
+//
+// * s3:DeleteObject
+//
+// * s3:DeleteObjectVersion
+//
+// * s3:PutLifecycleConfiguration
+//
+// For more information about permissions, see Managing Access Permissions to
+// Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// The following are related to PutBucketLifecycleConfiguration:
+//
+// * Examples of Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html)
+//
+// * GetBucketLifecycleConfiguration
+//
+// * DeleteBucketLifecycle
+//
+// Returns awserr.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 PutBucketLifecycleConfiguration for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
+func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
+ req, out := c.PutBucketLifecycleConfigurationRequest(input)
+ return out, req.Send()
}
// PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
@@ -5441,15 +7312,62 @@ func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request
output = &PutBucketLoggingOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutBucketLogging API operation for Amazon Simple Storage Service.
//
// Set the logging parameters for a bucket and to specify permissions for who
-// can view and modify the logging parameters. To set the logging status of
+// can view and modify the logging parameters. All logs are saved to buckets
+// in the same AWS Region as the source bucket. To set the logging status of
// a bucket, you must be the bucket owner.
//
+// The bucket owner is automatically granted FULL_CONTROL to all logs. You use
+// the Grantee request element to grant access to other people. The Permissions
+// request element specifies the kind of access the grantee has to the logs.
+//
+// Grantee Values
+//
+// You can specify the person (grantee) to whom you're assigning access rights
+// (using request elements) in the following ways:
+//
+// * By the person's ID: <>ID<><>GranteesEmail<>
+// DisplayName is optional and ignored in the request.
+//
+// * By Email address: <>Grantees@email.com<>
+// The grantee is resolved to the CanonicalUser and, in a response to a GET
+// Object acl request, appears as the CanonicalUser.
+//
+// * By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
+//
+// To enable logging, you use LoggingEnabled and its children request elements.
+// To disable logging, you use an empty BucketLoggingStatus request element:
+//
+//
+//
+// For more information about server access logging, see Server Access Logging
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html).
+//
+// For more information about creating a bucket, see CreateBucket. For more
+// information about returning the logging status of a bucket, see GetBucketLogging.
+//
+// The following operations are related to PutBucketLogging:
+//
+// * PutObject
+//
+// * DeleteBucket
+//
+// * CreateBucket
+//
+// * GetBucketLogging
+//
// Returns awserr.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.
@@ -5524,7 +7442,33 @@ func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigu
// PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
//
// Sets a metrics configuration (specified by the metrics configuration ID)
-// for the bucket.
+// for the bucket. You can have up to 1,000 metrics configurations per bucket.
+// If you're updating an existing metrics configuration, note that this is a
+// full replacement of the existing metrics configuration. If you don't include
+// the elements you want to keep, they are erased.
+//
+// To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration
+// action. The bucket owner has this permission by default. The bucket owner
+// can grant this permission to others. For more information about permissions,
+// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// For information about CloudWatch request metrics for Amazon S3, see Monitoring
+// Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
+//
+// The following operations are related to PutBucketMetricsConfiguration:
+//
+// * DeleteBucketMetricsConfiguration
+//
+// * PutBucketMetricsConfiguration
+//
+// * ListBucketMetricsConfigurations
+//
+// GetBucketLifecycle has the following special error:
+//
+// * Error code: TooManyConfigurations Description: You are attempting to
+// create a new configuration but have already reached the 1,000-configuration
+// limit. HTTP Status Code: HTTP 400 Bad 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
@@ -5599,6 +7543,10 @@ func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (re
output = &PutBucketNotificationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
@@ -5683,7 +7631,55 @@ func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificat
// PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
//
-// Enables notifications of specified events for a bucket.
+// Enables notifications of specified events for a bucket. For more information
+// about event notifications, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
+//
+// Using this API, you can replace an existing notification configuration. The
+// configuration is an XML file that defines the event types that you want Amazon
+// S3 to publish and the destination where you want Amazon S3 to publish an
+// event notification when it detects an event of the specified type.
+//
+// By default, your bucket has no event notifications configured. That is, the
+// notification configuration will be an empty NotificationConfiguration.
+//
+//
+//
+//
+//
+// This operation replaces the existing notification configuration with the
+// configuration you include in the request body.
+//
+// After Amazon S3 receives this request, it first verifies that any Amazon
+// Simple Notification Service (Amazon SNS) or Amazon Simple Queue Service (Amazon
+// SQS) destination exists, and that the bucket owner has permission to publish
+// to it by sending a test notification. In the case of AWS Lambda destinations,
+// Amazon S3 verifies that the Lambda function permissions grant Amazon S3 permission
+// to invoke the function from the Amazon S3 bucket. For more information, see
+// Configuring Notifications for Amazon S3 Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
+//
+// You can disable notifications by adding the empty NotificationConfiguration
+// element.
+//
+// By default, only the bucket owner can configure notifications on a bucket.
+// However, bucket owners can use a bucket policy to grant permission to other
+// users to set this configuration with s3:PutBucketNotification permission.
+//
+// The PUT notification is an atomic operation. For example, suppose your notification
+// configuration includes SNS topic, SQS queue, and Lambda function configurations.
+// When you send a PUT request with this configuration, Amazon S3 sends test
+// messages to your SNS topic. If the message fails, the entire PUT operation
+// will fail, and Amazon S3 will not add the configuration to your bucket.
+//
+// Responses
+//
+// If the configuration in the request body includes only one TopicConfiguration
+// specifying only the s3:ReducedRedundancyLostObject event type, the response
+// will also include the x-amz-sns-test-message-id header containing the message
+// ID of the test notification sent to the topic.
+//
+// The following operation is related to PutBucketNotificationConfiguration:
+//
+// * GetBucketNotificationConfiguration
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -5753,12 +7749,37 @@ func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.R
output = &PutBucketPolicyOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutBucketPolicy API operation for Amazon Simple Storage Service.
//
-// Applies an Amazon S3 bucket policy to an Amazon S3 bucket.
+// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using
+// an identity other than the root user of the AWS account that owns the bucket,
+// the calling identity must have the PutBucketPolicy permissions on the specified
+// bucket and belong to the bucket owner's account in order to use this operation.
+//
+// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access
+// Denied error. If you have the correct permissions, but you're not using an
+// identity that belongs to the bucket owner's account, Amazon S3 returns a
+// 405 Method Not Allowed error.
+//
+// As a security precaution, the root user of the AWS account that owns a bucket
+// can always use this operation, even if the policy explicitly denies the root
+// user the ability to perform this action.
+//
+// For more information about bucket policies, see Using Bucket Policies and
+// User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
+//
+// The following operations are related to PutBucketPolicy:
+//
+// * CreateBucket
+//
+// * DeleteBucket
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -5828,15 +7849,66 @@ func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req
output = &PutBucketReplicationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutBucketReplication API operation for Amazon Simple Storage Service.
//
// Creates a replication configuration or replaces an existing one. For more
-// information, see Cross-Region Replication (CRR) (https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
+// information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
// in the Amazon S3 Developer Guide.
//
+// To perform this operation, the user or role performing the operation must
+// have the iam:PassRole (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html)
+// permission.
+//
+// Specify the replication configuration in the request body. In the replication
+// configuration, you provide the name of the destination bucket where you want
+// Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to
+// replicate objects on your behalf, and other relevant information.
+//
+// A replication configuration must include at least one rule, and can contain
+// a maximum of 1,000. Each rule identifies a subset of objects to replicate
+// by filtering the objects in the source bucket. To choose additional subsets
+// of objects to replicate, add a rule for each subset. All rules must specify
+// the same destination bucket.
+//
+// To specify a subset of the objects in the source bucket to apply a replication
+// rule to, add the Filter element as a child of the Rule element. You can filter
+// objects based on an object key prefix, one or more object tags, or both.
+// When you add the Filter element in the configuration, you must also add the
+// following elements: DeleteMarkerReplication, Status, and Priority.
+//
+// For information about enabling versioning on a bucket, see Using Versioning
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html).
+//
+// By default, a resource owner, in this case the AWS account that created the
+// bucket, can perform this operation. The resource owner can also grant others
+// permissions to perform the operation. For more information about permissions,
+// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// Handling Replication of Encrypted Objects
+//
+// By default, Amazon S3 doesn't replicate objects that are stored at rest using
+// server-side encryption with CMKs stored in AWS KMS. To replicate AWS KMS-encrypted
+// objects, add the following: SourceSelectionCriteria, SseKmsEncryptedObjects,
+// Status, EncryptionConfiguration, and ReplicaKmsKeyID. For information about
+// replication configuration, see Replicating Objects Created with SSE Using
+// CMKs stored in AWS KMS (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-config-for-kms-objects.html).
+//
+// For information on PutBucketReplication errors, see ReplicationErrorCodeList
+//
+// The following operations are related to PutBucketReplication:
+//
+// * GetBucketReplication
+//
+// * DeleteBucketReplication
+//
// Returns awserr.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.
@@ -5905,6 +7977,10 @@ func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput)
output = &PutBucketRequestPaymentOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
@@ -5913,8 +7989,14 @@ func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput)
// Sets the request payment configuration for a bucket. By default, the bucket
// owner pays for downloads from the bucket. This configuration parameter enables
// the bucket owner (only) to specify that the person requesting the download
-// will be charged for the download. Documentation on requester pays buckets
-// can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
+// will be charged for the download. For more information, see Requester Pays
+// Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html).
+//
+// The following operations are related to PutBucketRequestPayment:
+//
+// * CreateBucket
+//
+// * GetBucketRequestPayment
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -5984,6 +8066,10 @@ func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request
output = &PutBucketTaggingOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
@@ -5991,6 +8077,47 @@ func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request
//
// Sets the tags for a bucket.
//
+// Use tags to organize your AWS bill to reflect your own cost structure. To
+// do this, sign up to get your AWS account bill with tag key values included.
+// Then, to see the cost of combined resources, organize your billing information
+// according to resources with the same tag key values. For example, you can
+// tag several resources with a specific application name, and then organize
+// your billing information to see the total cost of that application across
+// several services. For more information, see Cost Allocation and Tagging (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html).
+//
+// Within a bucket, if you add a tag that has the same key as an existing tag,
+// the new value overwrites the old value. For more information, see Using Cost
+// Allocation in Amazon S3 Bucket Tags (https://docs.aws.amazon.com/AmazonS3/latest/dev/CostAllocTagging.html).
+//
+// To use this operation, you must have permissions to perform the s3:PutBucketTagging
+// action. The bucket owner has this permission by default and can grant this
+// permission to others. For more information about permissions, see Permissions
+// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
+//
+// PutBucketTagging has the following special errors:
+//
+// * Error code: InvalidTagError Description: The tag provided was not a
+// valid tag. This error can occur if the tag did not pass input validation.
+// For information about tag restrictions, see User-Defined Tag Restrictions
+// (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html)
+// and AWS-Generated Cost Allocation Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/aws-tag-restrictions.html).
+//
+// * Error code: MalformedXMLError Description: The XML provided does not
+// match the schema.
+//
+// * Error code: OperationAbortedError Description: A conflicting conditional
+// operation is currently in progress against this resource. Please try again.
+//
+// * Error code: InternalError Description: The service was unable to apply
+// the provided tag to the bucket.
+//
+// The following operations are related to PutBucketTagging:
+//
+// * GetBucketTagging
+//
+// * DeleteBucketTagging
+//
// Returns awserr.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.
@@ -6059,6 +8186,10 @@ func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *r
output = &PutBucketVersioningOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
@@ -6067,6 +8198,38 @@ func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *r
// Sets the versioning state of an existing bucket. To set the versioning state,
// you must be the bucket owner.
//
+// You can set the versioning state with one of the following values:
+//
+// Enabled—Enables versioning for the objects in the bucket. All objects added
+// to the bucket receive a unique version ID.
+//
+// Suspended—Disables versioning for the objects in the bucket. All objects
+// added to the bucket receive the version ID null.
+//
+// If the versioning state has never been set on a bucket, it has no versioning
+// state; a GetBucketVersioning request does not return a versioning state value.
+//
+// If the bucket owner enables MFA Delete in the bucket versioning configuration,
+// the bucket owner must include the x-amz-mfa request header and the Status
+// and the MfaDelete request elements in a request to set the versioning state
+// of the bucket.
+//
+// If you have an object expiration lifecycle policy in your non-versioned bucket
+// and you want to maintain the same permanent delete behavior when you enable
+// versioning, you must add a noncurrent expiration policy. The noncurrent expiration
+// lifecycle policy will manage the deletes of the noncurrent object versions
+// in the version-enabled bucket. (A version-enabled bucket maintains one current
+// and zero or more noncurrent object versions.) For more information, see Lifecycle
+// and Versioning (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-and-other-bucket-config).
+//
+// Related Resources
+//
+// * CreateBucket
+//
+// * DeleteBucket
+//
+// * GetBucketVersioning
+//
// Returns awserr.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.
@@ -6135,12 +8298,81 @@ func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request
output = &PutBucketWebsiteOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutBucketWebsite API operation for Amazon Simple Storage Service.
//
-// Set the website configuration for a bucket.
+// Sets the configuration of the website that is specified in the website subresource.
+// To configure a bucket as a website, you can add this subresource on the bucket
+// with website configuration information such as the file name of the index
+// document and any redirect rules. For more information, see Hosting Websites
+// on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
+//
+// This PUT operation requires the S3:PutBucketWebsite permission. By default,
+// only the bucket owner can configure the website attached to a bucket; however,
+// bucket owners can allow other users to set the website configuration by writing
+// a bucket policy that grants them the S3:PutBucketWebsite permission.
+//
+// To redirect all website requests sent to the bucket's website endpoint, you
+// add a website configuration with the following elements. Because all requests
+// are sent to another website, you don't need to provide index document name
+// for the bucket.
+//
+// * WebsiteConfiguration
+//
+// * RedirectAllRequestsTo
+//
+// * HostName
+//
+// * Protocol
+//
+// If you want granular control over redirects, you can use the following elements
+// to add routing rules that describe conditions for redirecting requests and
+// information about the redirect destination. In this case, the website configuration
+// must provide an index document for the bucket, because some requests might
+// not be redirected.
+//
+// * WebsiteConfiguration
+//
+// * IndexDocument
+//
+// * Suffix
+//
+// * ErrorDocument
+//
+// * Key
+//
+// * RoutingRules
+//
+// * RoutingRule
+//
+// * Condition
+//
+// * HttpErrorCodeReturnedEquals
+//
+// * KeyPrefixEquals
+//
+// * Redirect
+//
+// * Protocol
+//
+// * HostName
+//
+// * ReplaceKeyPrefixWith
+//
+// * ReplaceKeyWith
+//
+// * HttpRedirectCode
+//
+// Amazon S3 has a limitation of 50 routing rules per website configuration.
+// If you require more than 50 routing rules, you can use object redirect. For
+// more information, see Configuring an Object Redirect (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html)
+// in the Amazon Simple Storage 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
@@ -6214,7 +8446,70 @@ func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, outp
// PutObject API operation for Amazon Simple Storage Service.
//
-// Adds an object to a bucket.
+// Adds an object to a bucket. You must have WRITE permissions on a bucket to
+// add an object to it.
+//
+// Amazon S3 never adds partial objects; if you receive a success response,
+// Amazon S3 added the entire object to the bucket.
+//
+// Amazon S3 is a distributed system. If it receives multiple write requests
+// for the same object simultaneously, it overwrites all but the last object
+// written. Amazon S3 does not provide object locking; if you need this, make
+// sure to build it into your application layer or use versioning instead.
+//
+// To ensure that data is not corrupted traversing the network, use the Content-MD5
+// header. When you use this header, Amazon S3 checks the object against the
+// provided MD5 value and, if they do not match, returns an error. Additionally,
+// you can calculate the MD5 while putting an object to Amazon S3 and compare
+// the returned ETag to the calculated MD5 value.
+//
+// The Content-MD5 header is required for any request to upload an object with
+// a retention period configured using Amazon S3 Object Lock. For more information
+// about Amazon S3 Object Lock, see Amazon S3 Object Lock Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Server-side Encryption
+//
+// You can optionally request server-side encryption. With server-side encryption,
+// Amazon S3 encrypts your data as it writes it to disks in its data centers
+// and decrypts the data when you access it. You have the option to provide
+// your own encryption key or use AWS managed encryption keys. For more information,
+// see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html).
+//
+// Access Control List (ACL)-Specific Request Headers
+//
+// You can use headers to grant ACL- based permissions. By default, all objects
+// are private. Only the owner has full access control. When adding a new object,
+// you can grant permissions to individual AWS accounts or to predefined groups
+// defined by Amazon S3. These permissions are then added to the ACL on the
+// object. For more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+// and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html).
+//
+// Storage Class Options
+//
+// By default, Amazon S3 uses the STANDARD storage class to store newly created
+// objects. The STANDARD storage class provides high durability and high availability.
+// Depending on performance needs, you can specify a different storage class.
+// For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
+// in the Amazon S3 Service Developer Guide.
+//
+// Versioning
+//
+// If you enable versioning for a bucket, Amazon S3 automatically generates
+// a unique version ID for the object being stored. Amazon S3 returns this ID
+// in the response. When you enable versioning for a bucket, if Amazon S3 receives
+// multiple write requests for the same object simultaneously, it stores all
+// of the objects.
+//
+// For more information about versioning, see Adding Objects to Versioning Enabled
+// Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html).
+// For information about returning the versioning state of a bucket, see GetBucketVersioning.
+//
+// Related Resources
+//
+// * CopyObject
+//
+// * DeleteObject
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -6283,13 +8578,97 @@ func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request
output = &PutObjectAclOutput{}
req = c.newRequest(op, input, output)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutObjectAcl API operation for Amazon Simple Storage Service.
//
-// uses the acl subresource to set the access control list (ACL) permissions
-// for an object that already exists in a bucket
+// Uses the acl subresource to set the access control list (ACL) permissions
+// for an object that already exists in a bucket. You must have WRITE_ACP permission
+// to set the ACL of an object.
+//
+// Depending on your application needs, you can choose to set the ACL on an
+// object using either the request body or the headers. For example, if you
+// have an existing application that updates a bucket ACL using the request
+// body, you can continue to use that approach. For more information, see Access
+// Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
+// in the Amazon S3 Developer Guide.
+//
+// Access Permissions
+//
+// You can set access permissions using one of the following methods:
+//
+// * Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports
+// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a
+// predefined set of grantees and permissions. Specify the canned ACL name
+// as the value of x-amz-acl. If you use this header, you cannot use other
+// access control-specific headers in your request. For more information,
+// see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
+//
+// * Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp,
+// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using
+// these headers, you specify explicit access permissions and grantees (AWS
+// accounts or Amazon S3 groups) who will receive the permission. If you
+// use these ACL-specific headers, you cannot use x-amz-acl header to set
+// a canned ACL. These parameters map to the set of permissions that Amazon
+// S3 supports in an ACL. For more information, see Access Control List (ACL)
+// Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
+// You specify each grantee as a type=value pair, where the type is one of
+// the following: id – if the value specified is the canonical user ID
+// of an AWS account uri – if you are granting permissions to a predefined
+// group emailAddress – if the value specified is the email address of
+// an AWS account Using email addresses to specify a grantee is only supported
+// in the following AWS Regions: US East (N. Virginia) US West (N. California)
+// US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific
+// (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all
+// the Amazon S3 supported Regions and endpoints, see Regions and Endpoints
+// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in
+// the AWS General Reference. For example, the following x-amz-grant-read
+// header grants list objects permission to the two AWS accounts identified
+// by their email addresses. x-amz-grant-read: emailAddress="xyz@amazon.com",
+// emailAddress="abc@amazon.com"
+//
+// You can use either a canned ACL or specify access permissions explicitly.
+// You cannot do both.
+//
+// Grantee Values
+//
+// You can specify the person (grantee) to whom you're assigning access rights
+// (using request elements) in the following ways:
+//
+// * By the person's ID: <>ID<><>GranteesEmail<>
+// DisplayName is optional and ignored in the request.
+//
+// * By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
+//
+// * By Email address: <>Grantees@email.com<>lt;/Grantee>
+// The grantee is resolved to the CanonicalUser and, in a response to a GET
+// Object acl request, appears as the CanonicalUser. Using email addresses
+// to specify a grantee is only supported in the following AWS Regions: US
+// East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific
+// (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland)
+// South America (São Paulo) For a list of all the Amazon S3 supported Regions
+// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+// in the AWS General Reference.
+//
+// Versioning
+//
+// The ACL of an object is set at the object version level. By default, PUT
+// sets the ACL of the current version of an object. To set the ACL of a different
+// version, use the versionId subresource.
+//
+// Related Resources
+//
+// * CopyObject
+//
+// * GetObject
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -6363,6 +8742,10 @@ func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *req
output = &PutObjectLegalHoldOutput{}
req = c.newRequest(op, input, output)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
@@ -6370,6 +8753,10 @@ func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *req
//
// Applies a Legal Hold configuration to the specified object.
//
+// Related Resources
+//
+// * Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.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.
@@ -6437,15 +8824,26 @@ func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfiguration
output = &PutObjectLockConfigurationOutput{}
req = c.newRequest(op, input, output)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutObjectLockConfiguration API operation for Amazon Simple Storage Service.
//
-// Places an object lock configuration on the specified bucket. The rule specified
-// in the object lock configuration will be applied by default to every new
+// Places an Object Lock configuration on the specified bucket. The rule specified
+// in the Object Lock configuration will be applied by default to every new
// object placed in the specified bucket.
//
+// DefaultRetention requires either Days or Years. You can't specify both at
+// the same time.
+//
+// Related Resources
+//
+// * Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.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.
@@ -6513,6 +8911,10 @@ func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *req
output = &PutObjectRetentionOutput{}
req = c.newRequest(op, input, output)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
@@ -6520,6 +8922,10 @@ func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *req
//
// Places an Object Retention configuration on an object.
//
+// Related Resources
+//
+// * Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.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.
@@ -6587,12 +8993,53 @@ func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request
output = &PutObjectTaggingOutput{}
req = c.newRequest(op, input, output)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutObjectTagging API operation for Amazon Simple Storage Service.
//
-// Sets the supplied tag-set to an object that already exists in a bucket
+// Sets the supplied tag-set to an object that already exists in a bucket.
+//
+// A tag is a key-value pair. You can associate tags with an object by sending
+// a PUT request against the tagging subresource that is associated with the
+// object. You can retrieve tags by sending a GET request. For more information,
+// see GetObjectTagging.
+//
+// For tagging-related restrictions related to characters and encodings, see
+// Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html).
+// Note that Amazon S3 limits the maximum number of tags to 10 tags per object.
+//
+// To use this operation, you must have permission to perform the s3:PutObjectTagging
+// action. By default, the bucket owner has this permission and can grant this
+// permission to others.
+//
+// To put tags of any other version, use the versionId query parameter. You
+// also need permission for the s3:PutObjectVersionTagging action.
+//
+// For information about the Amazon S3 object tagging feature, see Object Tagging
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
+//
+// Special Errors
+//
+// * Code: InvalidTagError Cause: The tag provided was not a valid tag. This
+// error can occur if the tag did not pass input validation. For more information,
+// see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
+//
+// * Code: MalformedXMLError Cause: The XML provided does not match the schema.
+//
+// * Code: OperationAbortedError Cause: A conflicting conditional operation
+// is currently in progress against this resource. Please try again.
+//
+// * Code: InternalError Cause: The service was unable to apply the provided
+// tag to the object.
+//
+// Related Resources
+//
+// * GetObjectTagging
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -6662,13 +9109,39 @@ func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req
output = &PutPublicAccessBlockOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ req.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "contentMd5Handler",
+ Fn: checksum.AddBodyContentMD5Handler,
+ })
return
}
// PutPublicAccessBlock API operation for Amazon Simple Storage Service.
//
// Creates or modifies the PublicAccessBlock configuration for an Amazon S3
-// bucket.
+// bucket. To use this operation, you must have the s3:PutBucketPublicAccessBlock
+// permission. For more information about Amazon S3 permissions, see Specifying
+// Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
+//
+// When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket
+// or an object, it checks the PublicAccessBlock configuration for both the
+// bucket (or the bucket that contains the object) and the bucket owner's account.
+// If the PublicAccessBlock configurations are different between the bucket
+// and the account, Amazon S3 uses the most restrictive combination of the bucket-level
+// and account-level settings.
+//
+// For more information about when Amazon S3 considers a bucket or an object
+// public, see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
+//
+// Related Resources
+//
+// * GetPublicAccessBlock
+//
+// * DeletePublicAccessBlock
+//
+// * GetBucketPolicyStatus
+//
+// * Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.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
@@ -6744,6 +9217,190 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque
//
// Restores an archived copy of an object back into Amazon S3
//
+// This operation performs the following types of requests:
+//
+// * select - Perform a select query on an archived object
+//
+// * restore an archive - Restore an archived object
+//
+// To use this operation, you must have permissions to perform the s3:RestoreObject
+// action. The bucket owner has this permission by default and can grant this
+// permission to others. For more information about permissions, see Permissions
+// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
+// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Querying Archives with Select Requests
+//
+// You use a select type of request to perform SQL queries on archived objects.
+// The archived objects that are being queried by the select request must be
+// formatted as uncompressed comma-separated values (CSV) files. You can run
+// queries and custom analytics on your archived data without having to restore
+// your data to a hotter Amazon S3 tier. For an overview about select requests,
+// see Querying Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// When making a select request, do the following:
+//
+// * Define an output location for the select query's output. This must be
+// an Amazon S3 bucket in the same AWS Region as the bucket that contains
+// the archive object that is being queried. The AWS account that initiates
+// the job must have permissions to write to the S3 bucket. You can specify
+// the storage class and encryption for the output objects stored in the
+// bucket. For more information about output, see Querying Archived Objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html)
+// in the Amazon Simple Storage Service Developer Guide. For more information
+// about the S3 structure in the request body, see the following: PutObject
+// Managing Access with ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
+// in the Amazon Simple Storage Service Developer Guide Protecting Data Using
+// Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
+// in the Amazon Simple Storage Service Developer Guide
+//
+// * Define the SQL expression for the SELECT type of restoration for your
+// query in the request body's SelectParameters structure. You can use expressions
+// like the following examples. The following expression returns all records
+// from the specified object. SELECT * FROM Object Assuming that you are
+// not using any headers for data stored in the object, you can specify columns
+// with positional headers. SELECT s._1, s._2 FROM Object s WHERE s._3 >
+// 100 If you have headers and you set the fileHeaderInfo in the CSV structure
+// in the request body to USE, you can specify headers in the query. (If
+// you set the fileHeaderInfo field to IGNORE, the first row is skipped for
+// the query.) You cannot mix ordinal positions with header column names.
+// SELECT s.Id, s.FirstName, s.SSN FROM S3Object s
+//
+// For more information about using SQL with S3 Glacier Select restore, see
+// SQL Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// When making a select request, you can also do the following:
+//
+// * To expedite your queries, specify the Expedited tier. For more information
+// about tiers, see "Restoring Archives," later in this topic.
+//
+// * Specify details about the data serialization format of both the input
+// object that is being queried and the serialization of the CSV-encoded
+// query results.
+//
+// The following are additional important facts about the select feature:
+//
+// * The output results are new Amazon S3 objects. Unlike archive retrievals,
+// they are stored until explicitly deleted-manually or through a lifecycle
+// policy.
+//
+// * You can issue more than one select request on the same Amazon S3 object.
+// Amazon S3 doesn't deduplicate requests, so avoid issuing duplicate requests.
+//
+// * Amazon S3 accepts a select request even if the object has already been
+// restored. A select request doesn’t return error response 409.
+//
+// Restoring Archives
+//
+// Objects in the GLACIER and DEEP_ARCHIVE storage classes are archived. To
+// access an archived object, you must first initiate a restore request. This
+// restores a temporary copy of the archived object. In a restore request, you
+// specify the number of days that you want the restored copy to exist. After
+// the specified period, Amazon S3 deletes the temporary copy but the object
+// remains archived in the GLACIER or DEEP_ARCHIVE storage class that object
+// was restored from.
+//
+// To restore a specific object version, you can provide a version ID. If you
+// don't provide a version ID, Amazon S3 restores the current version.
+//
+// The time it takes restore jobs to finish depends on which storage class the
+// object is being restored from and which data access tier you specify.
+//
+// When restoring an archived object (or using a select request), you can specify
+// one of the following data access tier options in the Tier element of the
+// request body:
+//
+// * Expedited - Expedited retrievals allow you to quickly access your data
+// stored in the GLACIER storage class when occasional urgent requests for
+// a subset of archives are required. For all but the largest archived objects
+// (250 MB+), data accessed using Expedited retrievals are typically made
+// available within 1–5 minutes. Provisioned capacity ensures that retrieval
+// capacity for Expedited retrievals is available when you need it. Expedited
+// retrievals and provisioned capacity are not available for the DEEP_ARCHIVE
+// storage class.
+//
+// * Standard - S3 Standard retrievals allow you to access any of your archived
+// objects within several hours. This is the default option for the GLACIER
+// and DEEP_ARCHIVE retrieval requests that do not specify the retrieval
+// option. S3 Standard retrievals typically complete within 3-5 hours from
+// the GLACIER storage class and typically complete within 12 hours from
+// the DEEP_ARCHIVE storage class.
+//
+// * Bulk - Bulk retrievals are Amazon S3 Glacier’s lowest-cost retrieval
+// option, enabling you to retrieve large amounts, even petabytes, of data
+// inexpensively in a day. Bulk retrievals typically complete within 5-12
+// hours from the GLACIER storage class and typically complete within 48
+// hours from the DEEP_ARCHIVE storage class.
+//
+// For more information about archive retrieval options and provisioned capacity
+// for Expedited data access, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// You can use Amazon S3 restore speed upgrade to change the restore speed to
+// a faster speed while it is in progress. You upgrade the speed of an in-progress
+// restoration by issuing another restore request to the same object, setting
+// a new Tier request element. When issuing a request to upgrade the restore
+// tier, you must choose a tier that is faster than the tier that the in-progress
+// restore is using. You must not change any other parameters, such as the Days
+// request element. For more information, see Upgrading the Speed of an In-Progress
+// Restore (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html#restoring-objects-upgrade-tier.title.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// To get the status of object restoration, you can send a HEAD request. Operations
+// return the x-amz-restore header, which provides information about the restoration
+// status, in the response. You can use Amazon S3 event notifications to notify
+// you when a restore is initiated or completed. For more information, see Configuring
+// Amazon S3 Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// After restoring an archived object, you can update the restoration period
+// by reissuing the request with a new period. Amazon S3 updates the restoration
+// period relative to the current time and charges only for the request-there
+// are no data transfer charges. You cannot update the restoration period when
+// Amazon S3 is actively processing your current restore request for the object.
+//
+// If your bucket has a lifecycle configuration with a rule that includes an
+// expiration action, the object expiration overrides the life span that you
+// specify in a restore request. For example, if you restore an object copy
+// for 10 days, but the object is scheduled to expire in 3 days, Amazon S3 deletes
+// the object in 3 days. For more information about lifecycle configuration,
+// see PutBucketLifecycleConfiguration and Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
+// in Amazon Simple Storage Service Developer Guide.
+//
+// Responses
+//
+// A successful operation returns either the 200 OK or 202 Accepted status code.
+//
+// * If the object copy is not previously restored, then Amazon S3 returns
+// 202 Accepted in the response.
+//
+// * If the object copy is previously restored, Amazon S3 returns 200 OK
+// in the response.
+//
+// Special Errors
+//
+// * Code: RestoreAlreadyInProgress Cause: Object restore is already in progress.
+// (This error does not apply to SELECT type requests.) HTTP Status Code:
+// 409 Conflict SOAP Fault Code Prefix: Client
+//
+// * Code: GlacierExpeditedRetrievalNotAvailable Cause: S3 Glacier expedited
+// retrievals are currently not available. Try again later. (Returned if
+// there is insufficient capacity to process the Expedited request. This
+// error applies only to Expedited retrievals and not to S3 Standard or Bulk
+// retrievals.) HTTP Status Code: 503 SOAP Fault Code Prefix: N/A
+//
+// Related Resources
+//
+// * PutBucketLifecycleConfiguration
+//
+// * GetBucketNotificationConfiguration
+//
+// * SQL Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
+// in the Amazon Simple Storage 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.
@@ -6753,7 +9410,7 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque
//
// Returned Error Codes:
// * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
-// This operation is not allowed against this storage tier
+// This operation is not allowed against this storage tier.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
@@ -6816,20 +9473,103 @@ func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *r
output = &SelectObjectContentOutput{}
req = c.newRequest(op, input, output)
+
+ es := newSelectObjectContentEventStream()
+ req.Handlers.Unmarshal.PushBack(es.setStreamCloser)
+ output.EventStream = es
+
req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop)
+ req.Handlers.Unmarshal.PushBack(es.runOutputStream)
+ req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose)
return
}
// SelectObjectContent API operation for Amazon Simple Storage Service.
//
// This operation filters the contents of an Amazon S3 object based on a simple
-// Structured Query Language (SQL) statement. In the request, along with the
-// SQL expression, you must also specify a data serialization format (JSON or
-// CSV) of the object. Amazon S3 uses this to parse object data into records,
-// and returns only records that match the specified SQL expression. You must
-// also specify the data serialization format for the response.
+// structured query language (SQL) statement. In the request, along with the
+// SQL expression, you must also specify a data serialization format (JSON,
+// CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse
+// object data into records, and returns only records that match the specified
+// SQL expression. You must also specify the data serialization format for the
+// response.
+//
+// For more information about Amazon S3 Select, see Selecting Content from Objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// For more information about using SQL with Amazon S3 Select, see SQL Reference
+// for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Permissions
+//
+// You must have s3:GetObject permission for this operation. Amazon S3 Select
+// does not support anonymous access. For more information about permissions,
+// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Object Data Formats
+//
+// You can use Amazon S3 Select to query objects that have the following format
+// properties:
+//
+// * CSV, JSON, and Parquet - Objects must be in CSV, JSON, or Parquet format.
+//
+// * UTF-8 - UTF-8 is the only encoding type Amazon S3 Select supports.
+//
+// * GZIP or BZIP2 - CSV and JSON files can be compressed using GZIP or BZIP2.
+// GZIP and BZIP2 are the only compression formats that Amazon S3 Select
+// supports for CSV and JSON files. Amazon S3 Select supports columnar compression
+// for Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object
+// compression for Parquet objects.
+//
+// * Server-side encryption - Amazon S3 Select supports querying objects
+// that are protected with server-side encryption. For objects that are encrypted
+// with customer-provided encryption keys (SSE-C), you must use HTTPS, and
+// you must use the headers that are documented in the GetObject. For more
+// information about SSE-C, see Server-Side Encryption (Using Customer-Provided
+// Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
+// in the Amazon Simple Storage Service Developer Guide. For objects that
+// are encrypted with Amazon S3 managed encryption keys (SSE-S3) and customer
+// master keys (CMKs) stored in AWS Key Management Service (SSE-KMS), server-side
+// encryption is handled transparently, so you don't need to specify anything.
+// For more information about server-side encryption, including SSE-S3 and
+// SSE-KMS, see Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Working with the Response Body
+//
+// Given the response size is unknown, Amazon S3 Select streams the response
+// as a series of messages and includes a Transfer-Encoding header with chunked
+// as its value in the response. For more information, see RESTSelectObjectAppendix .
+//
+// GetObject Support
+//
+// The SelectObjectContent operation does not support the following GetObject
+// functionality. For more information, see GetObject.
+//
+// * Range: Although you can specify a scan range for an Amazon S3 Select
+// request (see SelectObjectContentRequest$ScanRange in the request parameters),
+// you cannot specify the range of bytes of an object to return.
+//
+// * GLACIER, DEEP_ARCHIVE and REDUCED_REDUNDANCY storage classes: You cannot
+// specify the GLACIER, DEEP_ARCHIVE, or REDUCED_REDUNDANCY storage classes.
+// For more information, about storage classes see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#storage-class-intro)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Special Errors
+//
+// For a list of special errors for this operation, see SelectObjectContentErrorCodeList
+//
+// Related Resources
+//
+// * GetObject
+//
+// * GetBucketLifecycleConfiguration
+//
+// * PutBucketLifecycleConfiguration
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -6859,11 +9599,152 @@ func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObject
return out, req.Send()
}
-const opUploadPart = "UploadPart"
+// SelectObjectContentEventStream provides the event stream handling for the SelectObjectContent.
+type SelectObjectContentEventStream struct {
-// UploadPartRequest generates a "aws/request.Request" representing the
-// client's request for the UploadPart operation. The "output" return
-// value will be populated with the request's response once the request completes
+ // Reader is the EventStream reader for the SelectObjectContentEventStream
+ // events. This value is automatically set by the SDK when the API call is made
+ // Use this member when unit testing your code with the SDK to mock out the
+ // EventStream Reader.
+ //
+ // Must not be nil.
+ Reader SelectObjectContentEventStreamReader
+
+ outputReader io.ReadCloser
+
+ // StreamCloser is the io.Closer for the EventStream connection. For HTTP
+ // EventStream this is the response Body. The stream will be closed when
+ // the Close method of the EventStream is called.
+ StreamCloser io.Closer
+
+ done chan struct{}
+ closeOnce sync.Once
+ err *eventstreamapi.OnceError
+}
+
+func newSelectObjectContentEventStream() *SelectObjectContentEventStream {
+ return &SelectObjectContentEventStream{
+ done: make(chan struct{}),
+ err: eventstreamapi.NewOnceError(),
+ }
+}
+
+func (es *SelectObjectContentEventStream) setStreamCloser(r *request.Request) {
+ es.StreamCloser = r.HTTPResponse.Body
+}
+
+func (es *SelectObjectContentEventStream) runOnStreamPartClose(r *request.Request) {
+ if es.done == nil {
+ return
+ }
+ go es.waitStreamPartClose()
+
+}
+
+func (es *SelectObjectContentEventStream) waitStreamPartClose() {
+ var outputErrCh <-chan struct{}
+ if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok {
+ outputErrCh = v.ErrorSet()
+ }
+ var outputClosedCh <-chan struct{}
+ if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok {
+ outputClosedCh = v.Closed()
+ }
+
+ select {
+ case <-es.done:
+ case <-outputErrCh:
+ es.err.SetError(es.Reader.Err())
+ es.Close()
+ case <-outputClosedCh:
+ if err := es.Reader.Err(); err != nil {
+ es.err.SetError(es.Reader.Err())
+ }
+ es.Close()
+ }
+}
+
+// Events returns a channel to read events from.
+//
+// These events are:
+//
+// * ContinuationEvent
+// * EndEvent
+// * ProgressEvent
+// * RecordsEvent
+// * StatsEvent
+func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
+ return es.Reader.Events()
+}
+
+func (es *SelectObjectContentEventStream) runOutputStream(r *request.Request) {
+ var opts []func(*eventstream.Decoder)
+ if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) {
+ opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger))
+ }
+
+ unmarshalerForEvent := unmarshalerForSelectObjectContentEventStreamEvent{
+ metadata: protocol.ResponseMetadata{
+ StatusCode: r.HTTPResponse.StatusCode,
+ RequestID: r.RequestID,
+ },
+ }.UnmarshalerForEventName
+
+ decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...)
+ eventReader := eventstreamapi.NewEventReader(decoder,
+ protocol.HandlerPayloadUnmarshal{
+ Unmarshalers: r.Handlers.UnmarshalStream,
+ },
+ unmarshalerForEvent,
+ )
+
+ es.outputReader = r.HTTPResponse.Body
+ es.Reader = newReadSelectObjectContentEventStream(eventReader)
+}
+
+// Close closes the stream. This will also cause the stream to be closed.
+// Close must be called when done using the stream API. Not calling Close
+// may result in resource leaks.
+//
+// You can use the closing of the Reader's Events channel to terminate your
+// application's read from the API's stream.
+//
+func (es *SelectObjectContentEventStream) Close() (err error) {
+ es.closeOnce.Do(es.safeClose)
+ return es.Err()
+}
+
+func (es *SelectObjectContentEventStream) safeClose() {
+ if es.done != nil {
+ close(es.done)
+ }
+
+ es.Reader.Close()
+ if es.outputReader != nil {
+ es.outputReader.Close()
+ }
+
+ es.StreamCloser.Close()
+}
+
+// Err returns any error that occurred while reading or writing EventStream
+// Events from the service API's response. Returns nil if there were no errors.
+func (es *SelectObjectContentEventStream) Err() error {
+ if err := es.err.Err(); err != nil {
+ return err
+ }
+ if err := es.Reader.Err(); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+const opUploadPart = "UploadPart"
+
+// UploadPartRequest generates a "aws/request.Request" representing the
+// client's request for the UploadPart operation. The "output" return
+// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -6905,12 +9786,87 @@ func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, ou
//
// Uploads a part in a multipart upload.
//
+// In this operation, you provide part data in your request. However, you have
+// an option to specify your existing Amazon S3 object as a data source for
+// the part you are uploading. To upload a part from an existing object, you
+// use the UploadPartCopy operation.
+//
+// You must initiate a multipart upload (see CreateMultipartUpload) before you
+// can upload any part. In response to your initiate request, Amazon S3 returns
+// an upload ID, a unique identifier, that you must include in your upload part
+// request.
+//
+// Part numbers can be any number from 1 to 10,000, inclusive. A part number
+// uniquely identifies a part and also defines its position within the object
+// being created. If you upload a new part using the same part number that was
+// used with a previous part, the previously uploaded part is overwritten. Each
+// part must be at least 5 MB in size, except the last part. There is no size
+// limit on the last part of your multipart upload.
+//
+// To ensure that data is not corrupted when traversing the network, specify
+// the Content-MD5 header in the upload part request. Amazon S3 checks the part
+// data against the provided MD5 value. If they do not match, Amazon S3 returns
+// an error.
+//
// Note: After you initiate multipart upload and upload one or more parts, you
// must either complete or abort multipart upload in order to stop getting charged
// for storage of the uploaded parts. Only after you either complete or abort
// multipart upload, Amazon S3 frees up the parts storage and stops charging
// you for the parts storage.
//
+// For more information on multipart uploads, go to Multipart Upload Overview
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) in the
+// Amazon Simple Storage Service Developer Guide .
+//
+// For information on the permissions required to use the multipart upload API,
+// go to Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// You can optionally request server-side encryption where Amazon S3 encrypts
+// your data as it writes it to disks in its data centers and decrypts it for
+// you when you access it. You have the option of providing your own encryption
+// key, or you can use the AWS managed encryption keys. If you choose to provide
+// your own encryption key, the request headers you provide in the request must
+// match the headers you used in the request to initiate the upload by using
+// CreateMultipartUpload. For more information, go to Using Server-Side Encryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Server-side encryption is supported by the S3 Multipart Upload actions. Unless
+// you are using a customer-provided encryption key, you don't need to specify
+// the encryption parameters in each UploadPart request. Instead, you only need
+// to specify the server-side encryption parameters in the initial Initiate
+// Multipart request. For more information, see CreateMultipartUpload.
+//
+// If you requested server-side encryption using a customer-provided encryption
+// key in your initiate multipart upload request, you must provide identical
+// encryption information in each part upload using the following headers.
+//
+// * x-amz-server-side-encryption-customer-algorithm
+//
+// * x-amz-server-side-encryption-customer-key
+//
+// * x-amz-server-side-encryption-customer-key-MD5
+//
+// Special Errors
+//
+// * Code: NoSuchUpload Cause: The specified multipart upload does not exist.
+// The upload ID might be invalid, or the multipart upload might have been
+// aborted or completed. HTTP Status Code: 404 Not Found SOAP Fault Code
+// Prefix: Client
+//
+// Related Resources
+//
+// * CreateMultipartUpload
+//
+// * CompleteMultipartUpload
+//
+// * AbortMultipartUpload
+//
+// * ListParts
+//
+// * ListMultipartUploads
+//
// Returns awserr.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.
@@ -6983,7 +9939,94 @@ func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Req
// UploadPartCopy API operation for Amazon Simple Storage Service.
//
-// Uploads a part by copying data from an existing object as data source.
+// Uploads a part by copying data from an existing object as data source. You
+// specify the data source by adding the request header x-amz-copy-source in
+// your request and a byte range by adding the request header x-amz-copy-source-range
+// in your request.
+//
+// The minimum allowable part size for a multipart upload is 5 MB. For more
+// information about multipart upload limits, go to Quick Facts (https://docs.aws.amazon.com/AmazonS3/latest/dev/qfacts.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// Instead of using an existing object as part data, you might use the UploadPart
+// operation and provide data in your request.
+//
+// You must initiate a multipart upload before you can upload any part. In response
+// to your initiate request. Amazon S3 returns a unique identifier, the upload
+// ID, that you must include in your upload part request.
+//
+// For more information about using the UploadPartCopy operation, see the following:
+//
+// * For conceptual information about multipart uploads, see Uploading Objects
+// Using Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// * For information about permissions required to use the multipart upload
+// API, see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// * For information about copying objects using a single atomic operation
+// vs. the multipart upload, see Operations on Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html)
+// in the Amazon Simple Storage Service Developer Guide.
+//
+// * For information about using server-side encryption with customer-provided
+// encryption keys with the UploadPartCopy operation, see CopyObject and
+// UploadPart.
+//
+// Note the following additional considerations about the request headers x-amz-copy-source-if-match,
+// x-amz-copy-source-if-none-match, x-amz-copy-source-if-unmodified-since, and
+// x-amz-copy-source-if-modified-since:
+//
+// * Consideration 1 - If both of the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
+// headers are present in the request as follows: x-amz-copy-source-if-match
+// condition evaluates to true, and; x-amz-copy-source-if-unmodified-since
+// condition evaluates to false; Amazon S3 returns 200 OK and copies the
+// data.
+//
+// * Consideration 2 - If both of the x-amz-copy-source-if-none-match and
+// x-amz-copy-source-if-modified-since headers are present in the request
+// as follows: x-amz-copy-source-if-none-match condition evaluates to false,
+// and; x-amz-copy-source-if-modified-since condition evaluates to true;
+// Amazon S3 returns 412 Precondition Failed response code.
+//
+// Versioning
+//
+// If your bucket has versioning enabled, you could have multiple versions of
+// the same object. By default, x-amz-copy-source identifies the current version
+// of the object to copy. If the current version is a delete marker and you
+// don't specify a versionId in the x-amz-copy-source, Amazon S3 returns a 404
+// error, because the object does not exist. If you specify versionId in the
+// x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns
+// an HTTP 400 error, because you are not allowed to specify a delete marker
+// as a version for the x-amz-copy-source.
+//
+// You can optionally specify a specific version of the source object to copy
+// by adding the versionId subresource as shown in the following example:
+//
+// x-amz-copy-source: /bucket/object?versionId=version id
+//
+// Special Errors
+//
+// * Code: NoSuchUpload Cause: The specified multipart upload does not exist.
+// The upload ID might be invalid, or the multipart upload might have been
+// aborted or completed. HTTP Status Code: 404 Not Found
+//
+// * Code: InvalidRequest Cause: The specified copy source is not supported
+// as a byte-range copy source. HTTP Status Code: 400 Bad Request
+//
+// Related Resources
+//
+// * CreateMultipartUpload
+//
+// * UploadPart
+//
+// * CompleteMultipartUpload
+//
+// * AbortMultipartUpload
+//
+// * ListParts
+//
+// * ListMultipartUploads
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -7045,7 +10088,14 @@ func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortI
type AbortMultipartUploadInput struct {
_ struct{} `locationName:"AbortMultipartUploadRequest" type:"structure"`
- // Name of the bucket to which the multipart upload was initiated.
+ // The bucket name to which the upload was taking place.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
//
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -7055,10 +10105,11 @@ type AbortMultipartUploadInput struct {
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// Upload ID that identifies the multipart upload.
@@ -7133,6 +10184,20 @@ func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadI
return s
}
+func (s *AbortMultipartUploadInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *AbortMultipartUploadInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type AbortMultipartUploadOutput struct {
_ struct{} `type:"structure"`
@@ -7335,9 +10400,6 @@ func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
// Specifies the configuration and any analyses for the analytics filter of
// an Amazon S3 bucket.
-//
-// For more information, see GET Bucket analytics (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETAnalyticsConfig.html)
-// in the Amazon Simple Storage Service API Reference.
type AnalyticsConfiguration struct {
_ struct{} `type:"structure"`
@@ -7456,6 +10518,9 @@ func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3Bucket
return s
}
+// The filter used to describe a set of objects for analyses. A filter must
+// have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
+// If no filter is provided, all objects will be considered in any analysis.
type AnalyticsFilter struct {
_ struct{} `type:"structure"`
@@ -7518,6 +10583,7 @@ func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
return s
}
+// Contains information about where to publish the analytics results.
type AnalyticsS3BucketDestination struct {
_ struct{} `type:"structure"`
@@ -7526,8 +10592,11 @@ type AnalyticsS3BucketDestination struct {
// Bucket is a required field
Bucket *string `type:"string" required:"true"`
- // The account ID that owns the destination bucket. If no account ID is provided,
- // the owner will not be validated prior to exporting data.
+ // The account ID that owns the destination S3 bucket. If no account ID is provided,
+ // the owner is not validated before exporting data.
+ //
+ // Although this value is optional, we strongly recommend that you set it to
+ // help prevent problems if the destination bucket ownership changes.
BucketAccountId *string `type:"string"`
// Specifies the file format used when exporting data to Amazon S3.
@@ -7596,6 +10665,8 @@ func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDes
return s
}
+// In terms of implementation, a Bucket is a resource. An Amazon S3 bucket name
+// is globally unique, and the namespace is shared by all AWS accounts.
type Bucket struct {
_ struct{} `type:"structure"`
@@ -7679,6 +10750,7 @@ func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifec
return s
}
+// Container for logging status information.
type BucketLoggingStatus struct {
_ struct{} `type:"structure"`
@@ -7727,7 +10799,8 @@ func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggin
type CORSConfiguration struct {
_ struct{} `type:"structure"`
- // A set of allowed origins and methods.
+ // A set of origins and methods (cross-origin access that you want to allow).
+ // You can add up to 100 rules to the configuration.
//
// CORSRules is a required field
CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
@@ -7859,7 +10932,8 @@ func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
return s
}
-// Describes how a CSV-formatted input object is formatted.
+// Describes how an uncompressed comma-separated values (CSV)-formatted input
+// object is formatted.
type CSVInput struct {
_ struct{} `type:"structure"`
@@ -7868,24 +10942,45 @@ type CSVInput struct {
// to TRUE may lower performance.
AllowQuotedRecordDelimiter *bool `type:"boolean"`
- // The single character used to indicate a row should be ignored when present
- // at the start of a row.
+ // A single character used to indicate that a row should be ignored when the
+ // character is present at the start of that row. You can specify any character
+ // to indicate a comment line.
Comments *string `type:"string"`
- // The value used to separate individual fields in a record.
+ // A single character used to separate individual fields in a record. You can
+ // specify an arbitrary delimiter.
FieldDelimiter *string `type:"string"`
- // Describes the first line of input. Valid values: None, Ignore, Use.
+ // Describes the first line of input. Valid values are:
+ //
+ // * NONE: First line is not a header.
+ //
+ // * IGNORE: First line is a header, but you can't use the header values
+ // to indicate the column in an expression. You can use column position (such
+ // as _1, _2, …) to indicate the column (SELECT s._1 FROM OBJECT s).
+ //
+ // * Use: First line is a header, and you can use the header value to identify
+ // a column in an expression (SELECT "name" FROM OBJECT).
FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"`
- // Value used for escaping where the field delimiter is part of the value.
+ // A single character used for escaping when the field delimiter is part of
+ // the value. For example, if the value is a, b, Amazon S3 wraps this field
+ // value in quotation marks, as follows: " a , b ".
+ //
+ // Type: String
+ //
+ // Default: "
+ //
+ // Ancestors: CSV
QuoteCharacter *string `type:"string"`
- // The single character used for escaping the quote character inside an already
- // escaped value.
+ // A single character used for escaping the quotation mark character inside
+ // an already escaped value. For example, the value """ a , b """ is parsed
+ // as " a , b ".
QuoteEscapeCharacter *string `type:"string"`
- // The value used to separate individual records.
+ // A single character used to separate individual records in the input. Instead
+ // of the default value, you can specify an arbitrary delimiter.
RecordDelimiter *string `type:"string"`
}
@@ -7941,24 +11036,33 @@ func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
return s
}
-// Describes how CSV-formatted results are formatted.
+// Describes how uncompressed comma-separated values (CSV)-formatted results
+// are formatted.
type CSVOutput struct {
_ struct{} `type:"structure"`
- // The value used to separate individual fields in a record.
+ // The value used to separate individual fields in a record. You can specify
+ // an arbitrary delimiter.
FieldDelimiter *string `type:"string"`
- // The value used for escaping where the field delimiter is part of the value.
+ // A single character used for escaping when the field delimiter is part of
+ // the value. For example, if the value is a, b, Amazon S3 wraps this field
+ // value in quotation marks, as follows: " a , b ".
QuoteCharacter *string `type:"string"`
- // Th single character used for escaping the quote character inside an already
+ // The single character used for escaping the quote character inside an already
// escaped value.
QuoteEscapeCharacter *string `type:"string"`
- // Indicates whether or not all output fields should be quoted.
+ // Indicates whether to use quotation marks around output fields.
+ //
+ // * ALWAYS: Always use quotation marks for output fields.
+ //
+ // * ASNEEDED: Use quotation marks for output fields when needed.
QuoteFields *string `type:"string" enum:"QuoteFields"`
- // The value used to separate individual records.
+ // A single character used to separate individual records in the output. Instead
+ // of the default value, you can specify an arbitrary delimiter.
RecordDelimiter *string `type:"string"`
}
@@ -8002,9 +11106,12 @@ func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
return s
}
+// Container for specifying the AWS Lambda notification configuration.
type CloudFunctionConfiguration struct {
_ struct{} `type:"structure"`
+ // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
+ // of the specified type.
CloudFunction *string `type:"string"`
// The bucket event for which to send notifications.
@@ -8012,12 +11119,14 @@ type CloudFunctionConfiguration struct {
// Deprecated: Event has been deprecated
Event *string `deprecated:"true" type:"string" enum:"Event"`
+ // Bucket events for which to send notifications.
Events []*string `locationName:"Event" type:"list" flattened:"true"`
// An optional unique identifier for configurations in a notification configuration.
// If you don't provide one, Amazon S3 will assign an ID.
Id *string `type:"string"`
+ // The role supporting the invocation of the Lambda function
InvocationRole *string `type:"string"`
}
@@ -8061,9 +11170,15 @@ func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionC
return s
}
+// Container for all (if there are any) keys between Prefix and the next occurrence
+// of the string specified by a delimiter. CommonPrefixes lists keys that act
+// like subdirectories in the directory specified by Prefix. For example, if
+// the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july,
+// the common prefix is notes/summer/.
type CommonPrefix struct {
_ struct{} `type:"structure"`
+ // Container for the specified common prefix.
Prefix *string `type:"string"`
}
@@ -8086,20 +11201,28 @@ func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
type CompleteMultipartUploadInput struct {
_ struct{} `locationName:"CompleteMultipartUploadRequest" type:"structure" payload:"MultipartUpload"`
+ // Name of the bucket to which the multipart upload was initiated.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Object key for which the multipart upload was initiated.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
+ // The container for the multipart upload request information.
MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
+ // ID for the initiated multipart upload.
+ //
// UploadId is a required field
UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
}
@@ -8176,35 +11299,61 @@ func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartU
return s
}
+func (s *CompleteMultipartUploadInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *CompleteMultipartUploadInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type CompleteMultipartUploadOutput struct {
_ struct{} `type:"structure"`
+ // The name of the bucket that contains the newly created object.
Bucket *string `type:"string"`
- // Entity tag of the object.
+ // Entity tag that identifies the newly created object's data. Objects with
+ // different object data will have different entity tags. The entity tag is
+ // an opaque string. The entity tag may or may not be an MD5 digest of the object
+ // data. If the entity tag is not an MD5 digest of the object data, it will
+ // contain one or more nonhexadecimal characters and/or will consist of less
+ // than 32 or more than 32 hexadecimal digits.
ETag *string `type:"string"`
// If the object expiration is configured, this will contain the expiration
// date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
+ // The object key of the newly created object.
Key *string `min:"1" type:"string"`
+ // The URI that identifies the newly created object.
Location *string `type:"string"`
// If present, indicates that the requester was successfully charged for the
// request.
RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
- // If present, specifies the ID of the AWS Key Management Service (KMS) master
- // encryption key that was used for the object.
+ // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
+ // symmetric customer managed customer master key (CMK) that was used for the
+ // object.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // If you specified server-side encryption either with an Amazon S3-managed
+ // encryption key or an AWS KMS customer master key (CMK) in your initiate multipart
+ // upload request, the response includes this header. It confirms the encryption
+ // algorithm that Amazon S3 used to encrypt the object.
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
- // Version of the object.
+ // Version ID of the newly created object, in case the bucket has versioning
+ // turned on.
VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
}
@@ -8279,9 +11428,11 @@ func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipar
return s
}
+// The container for the completed multipart upload details.
type CompletedMultipartUpload struct {
_ struct{} `type:"structure"`
+ // Array of CompletedPart data types.
Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
}
@@ -8301,6 +11452,7 @@ func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultip
return s
}
+// Details of the parts that were uploaded.
type CompletedPart struct {
_ struct{} `type:"structure"`
@@ -8334,7 +11486,10 @@ func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
return s
}
-// Specifies a condition that must be met for a redirect to apply.
+// A container for describing a condition that must be met for the specified
+// redirect to apply. For example, 1. If request is for pages in the /docs folder,
+// redirect to the /documents folder. 2. If request results in HTTP error 4xx,
+// redirect request to another host where you might process the error.
type Condition struct {
_ struct{} `type:"structure"`
@@ -8403,12 +11558,19 @@ func (s *ContinuationEvent) UnmarshalEvent(
return nil
}
+func (s *ContinuationEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
+ msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
+ return msg, err
+}
+
type CopyObjectInput struct {
_ struct{} `locationName:"CopyObjectRequest" type:"structure"`
// The canned ACL to apply to the object.
ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
+ // The name of the destination bucket.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -8448,7 +11610,8 @@ type CopyObjectInput struct {
// Copies the object if it hasn't been modified since the specified time.
CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
- // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
+ // Specifies the algorithm to use when decrypting the source object (for example,
+ // AES256).
CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
@@ -8457,8 +11620,8 @@ type CopyObjectInput struct {
CopySourceSSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure the encryption
- // key was transmitted without error.
+ // Amazon S3 uses this header for a message integrity check to ensure that the
+ // encryption key was transmitted without error.
CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
// The date and time at which the object is no longer cacheable.
@@ -8476,6 +11639,8 @@ type CopyObjectInput struct {
// Allows grantee to write the ACL for the applicable object.
GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
+ // The key of the destination object.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
@@ -8489,31 +11654,33 @@ type CopyObjectInput struct {
// Specifies whether you want to apply a Legal Hold to the copied object.
ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
- // The object lock mode that you want to apply to the copied object.
+ // The Object Lock mode that you want to apply to the copied object.
ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
- // The date and time when you want the copied object's object lock to expire.
+ // The date and time when you want the copied object's Object Lock to expire.
ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
// data. This value is used to store the object and then it is discarded; Amazon
- // does not store the encryption key. The key must be appropriate for use with
- // the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
+ // S3 does not store the encryption key. The key must be appropriate for use
+ // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
// header.
SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure the encryption
- // key was transmitted without error.
+ // Amazon S3 uses this header for a message integrity check to ensure that the
+ // encryption key was transmitted without error.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
// Specifies the AWS KMS Encryption Context to use for object encryption. The
@@ -8523,12 +11690,14 @@ type CopyObjectInput struct {
// Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
// requests for an object protected by AWS KMS will fail if not made via SSL
- // or using SigV4. Documentation on configuring any of the officially supported
- // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
+ // or using SigV4. For information about configuring using any of the officially
+ // supported AWS SDKs and AWS CLI, see Specifying the Signature Version in Request
+ // Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
+ // in the Amazon S3 Developer Guide.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // The server-side encryption algorithm used when storing this object in Amazon
+ // S3 (for example, AES256, aws:kms).
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// The type of storage to use for the object. Defaults to 'STANDARD'.
@@ -8536,7 +11705,7 @@ type CopyObjectInput struct {
// The tag-set for the object destination object this value must be used in
// conjunction with the TaggingDirective. The tag-set must be encoded as URL
- // Query parameters
+ // Query parameters.
Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
// Specifies whether the object tag-set are copied from the source object or
@@ -8827,11 +11996,27 @@ func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput
return s
}
+func (s *CopyObjectInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *CopyObjectInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type CopyObjectOutput struct {
_ struct{} `type:"structure" payload:"CopyObjectResult"`
+ // Container for all response elements.
CopyObjectResult *CopyObjectResult `type:"structure"`
+ // Version of the copied object in the destination bucket.
CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
// If the object expiration is configured, the response includes this header.
@@ -8847,7 +12032,7 @@ type CopyObjectOutput struct {
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round trip message integrity
+ // the response will include this header to provide round-trip message integrity
// verification of the customer-provided encryption key.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
@@ -8856,12 +12041,13 @@ type CopyObjectOutput struct {
// the encryption context key-value pairs.
SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
- // If present, specifies the ID of the AWS Key Management Service (KMS) master
- // encryption key that was used for the object.
+ // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
+ // symmetric customer managed customer master key (CMK) that was used for the
+ // object.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // The server-side encryption algorithm used when storing this object in Amazon
+ // S3 (for example, AES256, aws:kms).
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// Version ID of the newly created copy.
@@ -8938,11 +12124,16 @@ func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
return s
}
+// Container for all response elements.
type CopyObjectResult struct {
_ struct{} `type:"structure"`
+ // Returns the ETag of the new object. The ETag reflects only changes to the
+ // contents of an object, not its metadata. The source and destination ETag
+ // is identical for a successfully copied object.
ETag *string `type:"string"`
+ // Returns the date that the object was last modified.
LastModified *time.Time `type:"timestamp"`
}
@@ -8968,6 +12159,7 @@ func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
return s
}
+// Container for all response elements.
type CopyPartResult struct {
_ struct{} `type:"structure"`
@@ -9000,11 +12192,12 @@ func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
return s
}
+// The configuration information for the bucket.
type CreateBucketConfiguration struct {
_ struct{} `type:"structure"`
- // Specifies the region where the bucket will be created. If you don't specify
- // a region, the bucket is created in US East (N. Virginia) Region (us-east-1).
+ // Specifies the Region where the bucket will be created. If you don't specify
+ // a Region, the bucket is created in the US East (N. Virginia) Region (us-east-1).
LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
}
@@ -9030,9 +12223,12 @@ type CreateBucketInput struct {
// The canned ACL to apply to the bucket.
ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
+ // The name of the bucket to create.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // The configuration information for the bucket.
CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Allows grantee the read, write, read ACP, and write ACP permissions on the
@@ -9051,8 +12247,7 @@ type CreateBucketInput struct {
// Allows grantee to write the ACL for the applicable bucket.
GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
- // Specifies whether you want Amazon S3 object lock to be enabled for the new
- // bucket.
+ // Specifies whether you want S3 Object Lock to be enabled for the new bucket.
ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"`
}
@@ -9146,6 +12341,9 @@ func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketI
type CreateBucketOutput struct {
_ struct{} `type:"structure"`
+ // Specifies the Region where the bucket will be created. If you are creating
+ // a bucket on the US East (N. Virginia) Region (us-east-1), you do not need
+ // to specify the location.
Location *string `location:"header" locationName:"Location" type:"string"`
}
@@ -9171,6 +12369,8 @@ type CreateMultipartUploadInput struct {
// The canned ACL to apply to the object.
ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
+ // The name of the bucket to which to initiate the upload
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -9206,6 +12406,8 @@ type CreateMultipartUploadInput struct {
// Allows grantee to write the ACL for the applicable object.
GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
+ // Object key for which the multipart upload is to be initiated.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
@@ -9215,31 +12417,33 @@ type CreateMultipartUploadInput struct {
// Specifies whether you want to apply a Legal Hold to the uploaded object.
ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
- // Specifies the object lock mode that you want to apply to the uploaded object.
+ // Specifies the Object Lock mode that you want to apply to the uploaded object.
ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
- // Specifies the date and time when you want the object lock to expire.
+ // Specifies the date and time when you want the Object Lock to expire.
ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
// data. This value is used to store the object and then it is discarded; Amazon
- // does not store the encryption key. The key must be appropriate for use with
- // the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
+ // S3 does not store the encryption key. The key must be appropriate for use
+ // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
// header.
SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure the encryption
- // key was transmitted without error.
+ // Amazon S3 uses this header for a message integrity check to ensure that the
+ // encryption key was transmitted without error.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
// Specifies the AWS KMS Encryption Context to use for object encryption. The
@@ -9247,20 +12451,22 @@ type CreateMultipartUploadInput struct {
// encryption context key-value pairs.
SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
- // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
- // requests for an object protected by AWS KMS will fail if not made via SSL
- // or using SigV4. Documentation on configuring any of the officially supported
- // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
+ // Specifies the ID of the symmetric customer managed AWS KMS CMK to use for
+ // object encryption. All GET and PUT requests for an object protected by AWS
+ // KMS will fail if not made via SSL or using SigV4. For information about configuring
+ // using any of the officially supported AWS SDKs and AWS CLI, see Specifying
+ // the Signature Version in Request Authentication (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
+ // in the Amazon S3 Developer Guide.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // The server-side encryption algorithm used when storing this object in Amazon
+ // S3 (for example, AES256, aws:kms).
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// The type of storage to use for the object. Defaults to 'STANDARD'.
StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
- // The tag-set for the object. The tag-set must be encoded as URL Query parameters
+ // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
// If the bucket is configured as a website, redirects requests for this object
@@ -9477,17 +12683,47 @@ func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *Creat
return s
}
+func (s *CreateMultipartUploadInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *CreateMultipartUploadInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type CreateMultipartUploadOutput struct {
_ struct{} `type:"structure"`
- // Date when multipart upload will become eligible for abort operation by lifecycle.
+ // If the bucket has a lifecycle rule configured with an action to abort incomplete
+ // multipart uploads and the prefix in the lifecycle rule matches the object
+ // name in the request, the response includes this header. The header indicates
+ // when the initiated multipart upload becomes eligible for an abort operation.
+ // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
+ // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
+ //
+ // The response also includes the x-amz-abort-rule-id header that provides the
+ // ID of the lifecycle configuration rule that defines this action.
AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
- // Id of the lifecycle rule that makes a multipart upload eligible for abort
- // operation.
+ // This header is returned along with the x-amz-abort-date header. It identifies
+ // the applicable lifecycle configuration rule that defines the action to abort
+ // incomplete multipart uploads.
AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
// Name of the bucket to which the multipart upload was initiated.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
Bucket *string `locationName:"Bucket" type:"string"`
// Object key for which the multipart upload was initiated.
@@ -9503,7 +12739,7 @@ type CreateMultipartUploadOutput struct {
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round trip message integrity
+ // the response will include this header to provide round-trip message integrity
// verification of the customer-provided encryption key.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
@@ -9512,12 +12748,13 @@ type CreateMultipartUploadOutput struct {
// the encryption context key-value pairs.
SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
- // If present, specifies the ID of the AWS Key Management Service (KMS) master
- // encryption key that was used for the object.
+ // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
+ // symmetric customer managed customer master key (CMK) that was used for the
+ // object.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // The server-side encryption algorithm used when storing this object in Amazon
+ // S3 (for example, AES256, aws:kms).
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// ID for the initiated multipart upload.
@@ -9607,7 +12844,7 @@ func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUplo
return s
}
-// The container element for specifying the default object lock retention settings
+// The container element for specifying the default Object Lock retention settings
// for new objects placed in the specified bucket.
type DefaultRetention struct {
_ struct{} `type:"structure"`
@@ -9615,7 +12852,7 @@ type DefaultRetention struct {
// The number of days that you want to specify for the default retention period.
Days *int64 `type:"integer"`
- // The default object lock retention mode you want to apply to new objects placed
+ // The default Object Lock retention mode you want to apply to new objects placed
// in the specified bucket.
Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
@@ -9651,9 +12888,12 @@ func (s *DefaultRetention) SetYears(v int64) *DefaultRetention {
return s
}
+// Container for the objects to delete.
type Delete struct {
_ struct{} `type:"structure"`
+ // The objects to delete.
+ //
// Objects is a required field
Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
@@ -9769,6 +13009,20 @@ func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketA
return s
}
+func (s *DeleteBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteBucketAnalyticsConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteBucketAnalyticsConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -9786,6 +13040,8 @@ func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
type DeleteBucketCorsInput struct {
_ struct{} `locationName:"DeleteBucketCorsRequest" type:"structure"`
+ // Specifies the bucket whose cors configuration is being deleted.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -9829,6 +13085,20 @@ func (s *DeleteBucketCorsInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *DeleteBucketCorsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteBucketCorsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteBucketCorsOutput struct {
_ struct{} `type:"structure"`
}
@@ -9892,6 +13162,20 @@ func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *DeleteBucketEncryptionInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteBucketEncryptionInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteBucketEncryptionOutput struct {
_ struct{} `type:"structure"`
}
@@ -9909,6 +13193,8 @@ func (s DeleteBucketEncryptionOutput) GoString() string {
type DeleteBucketInput struct {
_ struct{} `locationName:"DeleteBucketRequest" type:"structure"`
+ // Specifies the bucket being deleted.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -9952,11 +13238,25 @@ func (s *DeleteBucketInput) getBucket() (v string) {
return *s.Bucket
}
-type DeleteBucketInventoryConfigurationInput struct {
- _ struct{} `locationName:"DeleteBucketInventoryConfigurationRequest" type:"structure"`
+func (s *DeleteBucketInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
- // The name of the bucket containing the inventory configuration to delete.
- //
+func (s *DeleteBucketInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
+type DeleteBucketInventoryConfigurationInput struct {
+ _ struct{} `locationName:"DeleteBucketInventoryConfigurationRequest" type:"structure"`
+
+ // The name of the bucket containing the inventory configuration to delete.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -10014,6 +13314,20 @@ func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketI
return s
}
+func (s *DeleteBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteBucketInventoryConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteBucketInventoryConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -10031,6 +13345,8 @@ func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
type DeleteBucketLifecycleInput struct {
_ struct{} `locationName:"DeleteBucketLifecycleRequest" type:"structure"`
+ // The bucket name of the lifecycle to delete.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -10074,6 +13390,20 @@ func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *DeleteBucketLifecycleInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteBucketLifecycleInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteBucketLifecycleOutput struct {
_ struct{} `type:"structure"`
}
@@ -10150,6 +13480,20 @@ func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMet
return s
}
+func (s *DeleteBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteBucketMetricsConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteBucketMetricsConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -10181,6 +13525,8 @@ func (s DeleteBucketOutput) GoString() string {
type DeleteBucketPolicyInput struct {
_ struct{} `locationName:"DeleteBucketPolicyRequest" type:"structure"`
+ // The bucket name.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -10224,6 +13570,20 @@ func (s *DeleteBucketPolicyInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *DeleteBucketPolicyInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteBucketPolicyInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteBucketPolicyOutput struct {
_ struct{} `type:"structure"`
}
@@ -10243,9 +13603,6 @@ type DeleteBucketReplicationInput struct {
// The bucket name.
//
- // It can take a while to propagate the deletion of a replication configuration
- // to all Amazon S3 systems.
- //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -10289,6 +13646,20 @@ func (s *DeleteBucketReplicationInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *DeleteBucketReplicationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteBucketReplicationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteBucketReplicationOutput struct {
_ struct{} `type:"structure"`
}
@@ -10306,6 +13677,8 @@ func (s DeleteBucketReplicationOutput) GoString() string {
type DeleteBucketTaggingInput struct {
_ struct{} `locationName:"DeleteBucketTaggingRequest" type:"structure"`
+ // The bucket that has the tag set to be removed.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -10349,6 +13722,20 @@ func (s *DeleteBucketTaggingInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *DeleteBucketTaggingInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteBucketTaggingInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteBucketTaggingOutput struct {
_ struct{} `type:"structure"`
}
@@ -10366,6 +13753,8 @@ func (s DeleteBucketTaggingOutput) GoString() string {
type DeleteBucketWebsiteInput struct {
_ struct{} `locationName:"DeleteBucketWebsiteRequest" type:"structure"`
+ // The bucket name for which you want to remove the website configuration.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -10409,6 +13798,20 @@ func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *DeleteBucketWebsiteInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteBucketWebsiteInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteBucketWebsiteOutput struct {
_ struct{} `type:"structure"`
}
@@ -10423,6 +13826,7 @@ func (s DeleteBucketWebsiteOutput) GoString() string {
return s.String()
}
+// Information about the delete marker.
type DeleteMarkerEntry struct {
_ struct{} `type:"structure"`
@@ -10436,6 +13840,7 @@ type DeleteMarkerEntry struct {
// Date and time the object was last modified.
LastModified *time.Time `type:"timestamp"`
+ // The account that created the delete marker.>
Owner *Owner `type:"structure"`
// Version ID of an object.
@@ -10482,11 +13887,21 @@ func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
return s
}
-// Specifies whether Amazon S3 should replicate delete makers.
+// Specifies whether Amazon S3 replicates the delete markers. If you specify
+// a Filter, you must specify this element. However, in the latest version of
+// replication configuration (when Filter is specified), Amazon S3 doesn't replicate
+// delete markers. Therefore, the DeleteMarkerReplication element can contain
+// only Disabled. For an example configuration, see Basic Rule
+// Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
+//
+// If you don't specify the Filter element, Amazon S3 assumes that the replication
+// configuration is the earlier version, V1. In the earlier version, Amazon
+// S3 handled replication of delete markers differently. For more information,
+// see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
type DeleteMarkerReplication struct {
_ struct{} `type:"structure"`
- // The status of the delete marker replication.
+ // Indicates whether to replicate delete markers.
//
// In the current implementation, Amazon S3 doesn't replicate the delete markers.
// The status must be Disabled.
@@ -10512,24 +13927,38 @@ func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication {
type DeleteObjectInput struct {
_ struct{} `locationName:"DeleteObjectRequest" type:"structure"`
+ // The bucket name of the bucket containing the object.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- // Indicates whether Amazon S3 object lock should bypass governance-mode restrictions
+ // Indicates whether S3 Object Lock should bypass Governance-mode restrictions
// to process this operation.
BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
+ // Key name of the object to delete.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
// The concatenation of the authentication device's serial number, a space,
- // and the value that is displayed on your authentication device.
+ // and the value that is displayed on your authentication device. Required to
+ // permanently delete a versioned object if versioning is configured with MFA
+ // delete enabled.
MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// VersionId used to reference a specific version of the object.
@@ -10611,6 +14040,20 @@ func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
return s
}
+func (s *DeleteObjectInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteObjectInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteObjectOutput struct {
_ struct{} `type:"structure"`
@@ -10658,9 +14101,20 @@ func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
type DeleteObjectTaggingInput struct {
_ struct{} `locationName:"DeleteObjectTaggingRequest" type:"structure"`
+ // The bucket name containing the objects from which to remove the tags.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Name of the tag.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
@@ -10725,6 +14179,20 @@ func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingIn
return s
}
+func (s *DeleteObjectTaggingInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteObjectTaggingInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteObjectTaggingOutput struct {
_ struct{} `type:"structure"`
@@ -10751,25 +14219,39 @@ func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingO
type DeleteObjectsInput struct {
_ struct{} `locationName:"DeleteObjectsRequest" type:"structure" payload:"Delete"`
+ // The bucket name containing the objects to delete.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// Specifies whether you want to delete this object even if it has a Governance-type
- // object lock in place. You must have sufficient permissions to perform this
+ // Object Lock in place. You must have sufficient permissions to perform this
// operation.
BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
+ // Container for the request.
+ //
// Delete is a required field
Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// The concatenation of the authentication device's serial number, a space,
- // and the value that is displayed on your authentication device.
+ // and the value that is displayed on your authentication device. Required to
+ // permanently delete a versioned object if versioning is configured with MFA
+ // delete enabled.
MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
}
@@ -10844,11 +14326,29 @@ func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
return s
}
+func (s *DeleteObjectsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeleteObjectsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeleteObjectsOutput struct {
_ struct{} `type:"structure"`
+ // Container element for a successful delete. It identifies the object that
+ // was successfully deleted.
Deleted []*DeletedObject `type:"list" flattened:"true"`
+ // Container for a failed delete operation that describes the object that Amazon
+ // S3 attempted to delete and the error it encountered.
Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
// If present, indicates that the requester was successfully charged for the
@@ -10932,6 +14432,20 @@ func (s *DeletePublicAccessBlockInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *DeletePublicAccessBlockInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *DeletePublicAccessBlockInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type DeletePublicAccessBlockOutput struct {
_ struct{} `type:"structure"`
}
@@ -10946,15 +14460,24 @@ func (s DeletePublicAccessBlockOutput) GoString() string {
return s.String()
}
+// Information about the deleted object.
type DeletedObject struct {
_ struct{} `type:"structure"`
+ // Specifies whether the versioned object that was permanently deleted was (true)
+ // or was not (false) a delete marker. In a simple DELETE, this header indicates
+ // whether (true) or not (false) a delete marker was created.
DeleteMarker *bool `type:"boolean"`
+ // The version ID of the delete marker created as a result of the DELETE operation.
+ // If you delete a specific object version, the value returned by this header
+ // is the version ID of the object version deleted.
DeleteMarkerVersionId *string `type:"string"`
+ // The name of the deleted object.
Key *string `min:"1" type:"string"`
+ // The version ID of the deleted object.
VersionId *string `type:"string"`
}
@@ -10993,7 +14516,7 @@ func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
}
// Specifies information about where to publish analysis or configuration results
-// for an Amazon S3 bucket.
+// for an Amazon S3 bucket and S3 Replication Time Control (S3 RTC).
type Destination struct {
_ struct{} `type:"structure"`
@@ -11008,17 +14531,12 @@ type Destination struct {
// direct Amazon S3 to change replica ownership to the AWS account that owns
// the destination bucket by specifying the AccessControlTranslation property,
// this is the account ID of the destination bucket owner. For more information,
- // see Cross-Region Replication Additional Configuration: Change Replica Owner
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/crr-change-owner.html) in
- // the Amazon Simple Storage Service Developer Guide.
+ // see Replication Additional Configuration: Changing the Replica Owner (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html)
+ // in the Amazon Simple Storage Service Developer Guide.
Account *string `type:"string"`
// The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to
- // store replicas of the object identified by the rule.
- //
- // A replication configuration can replicate objects to only one destination
- // bucket. If there are multiple rules in your replication configuration, all
- // rules must specify the same destination bucket.
+ // store the results.
//
// Bucket is a required field
Bucket *string `type:"string" required:"true"`
@@ -11027,9 +14545,19 @@ type Destination struct {
// is specified, you must specify this element.
EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
- // The storage class to use when replicating objects, such as standard or reduced
- // redundancy. By default, Amazon S3 uses the storage class of the source object
- // to create the object replica.
+ // A container specifying replication metrics-related settings enabling metrics
+ // and Amazon S3 events for S3 Replication Time Control (S3 RTC). Must be specified
+ // together with a ReplicationTime block.
+ Metrics *Metrics `type:"structure"`
+
+ // A container specifying S3 Replication Time Control (S3 RTC), including whether
+ // S3 RTC is enabled and the time when all objects and operations on objects
+ // must be replicated. Must be specified together with a Metrics block.
+ ReplicationTime *ReplicationTime `type:"structure"`
+
+ // The storage class to use when replicating objects, such as S3 Standard or
+ // reduced redundancy. By default, Amazon S3 uses the storage class of the source
+ // object to create the object replica.
//
// For valid values, see the StorageClass element of the PUT Bucket replication
// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
@@ -11058,6 +14586,16 @@ func (s *Destination) Validate() error {
invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
}
}
+ if s.Metrics != nil {
+ if err := s.Metrics.Validate(); err != nil {
+ invalidParams.AddNested("Metrics", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.ReplicationTime != nil {
+ if err := s.ReplicationTime.Validate(); err != nil {
+ invalidParams.AddNested("ReplicationTime", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -11096,19 +14634,30 @@ func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *De
return s
}
+// SetMetrics sets the Metrics field's value.
+func (s *Destination) SetMetrics(v *Metrics) *Destination {
+ s.Metrics = v
+ return s
+}
+
+// SetReplicationTime sets the ReplicationTime field's value.
+func (s *Destination) SetReplicationTime(v *ReplicationTime) *Destination {
+ s.ReplicationTime = v
+ return s
+}
+
// SetStorageClass sets the StorageClass field's value.
func (s *Destination) SetStorageClass(v string) *Destination {
s.StorageClass = &v
return s
}
-// Describes the server-side encryption that will be applied to the restore
-// results.
+// Contains the type of server-side encryption used.
type Encryption struct {
_ struct{} `type:"structure"`
// The server-side encryption algorithm used when storing job results in Amazon
- // S3 (e.g., AES256, aws:kms).
+ // S3 (for example, AES256, aws:kms).
//
// EncryptionType is a required field
EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
@@ -11117,8 +14666,11 @@ type Encryption struct {
// the encryption context for the restore results.
KMSContext *string `type:"string"`
- // If the encryption type is aws:kms, this optional value specifies the AWS
- // KMS key ID to use for encryption of job results.
+ // If the encryption type is aws:kms, this optional value specifies the ID of
+ // the symmetric customer managed AWS KMS CMK to use for encryption of job results.
+ // Amazon S3 only supports symmetric CMKs. For more information, see Using Symmetric
+ // and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
+ // in the AWS Key Management Service Developer Guide.
KMSKeyId *string `type:"string" sensitive:"true"`
}
@@ -11168,8 +14720,12 @@ func (s *Encryption) SetKMSKeyId(v string) *Encryption {
type EncryptionConfiguration struct {
_ struct{} `type:"structure"`
- // Specifies the AWS KMS Key ID (Key ARN or Alias ARN) for the destination bucket.
- // Amazon S3 uses this key to encrypt replica objects.
+ // Specifies the ID (Key ARN or Alias ARN) of the customer managed customer
+ // master key (CMK) stored in AWS Key Management Service (KMS) for the destination
+ // bucket. Amazon S3 uses this key to encrypt replica objects. Amazon S3 only
+ // supports symmetric customer managed CMKs. For more information, see Using
+ // Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
+ // in the AWS Key Management Service Developer Guide.
ReplicaKmsKeyID *string `type:"string"`
}
@@ -11189,6 +14745,9 @@ func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfig
return s
}
+// A message that indicates the request is complete and no more messages will
+// be sent. You should not assume that the request is complete until the client
+// receives an EndEvent.
type EndEvent struct {
_ struct{} `locationName:"EndEvent" type:"structure"`
}
@@ -11215,15 +14774,380 @@ func (s *EndEvent) UnmarshalEvent(
return nil
}
+func (s *EndEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
+ msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
+ return msg, err
+}
+
+// Container for all error elements.
type Error struct {
_ struct{} `type:"structure"`
+ // The error code is a string that uniquely identifies an error condition. It
+ // is meant to be read and understood by programs that detect and handle errors
+ // by type.
+ //
+ // Amazon S3 error codes
+ //
+ // * Code: AccessDenied Description: Access Denied HTTP Status Code: 403
+ // Forbidden SOAP Fault Code Prefix: Client
+ //
+ // * Code: AccountProblem Description: There is a problem with your AWS account
+ // that prevents the operation from completing successfully. Contact AWS
+ // Support for further assistance. HTTP Status Code: 403 Forbidden SOAP Fault
+ // Code Prefix: Client
+ //
+ // * Code: AllAccessDisabled Description: All access to this Amazon S3 resource
+ // has been disabled. Contact AWS Support for further assistance. HTTP Status
+ // Code: 403 Forbidden SOAP Fault Code Prefix: Client
+ //
+ // * Code: AmbiguousGrantByEmailAddress Description: The email address you
+ // provided is associated with more than one account. HTTP Status Code: 400
+ // Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: AuthorizationHeaderMalformed Description: The authorization header
+ // you provided is invalid. HTTP Status Code: 400 Bad Request HTTP Status
+ // Code: N/A
+ //
+ // * Code: BadDigest Description: The Content-MD5 you specified did not match
+ // what we received. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
+ // Client
+ //
+ // * Code: BucketAlreadyExists Description: The requested bucket name is
+ // not available. The bucket namespace is shared by all users of the system.
+ // Please select a different name and try again. HTTP Status Code: 409 Conflict
+ // SOAP Fault Code Prefix: Client
+ //
+ // * Code: BucketAlreadyOwnedByYou Description: The bucket you tried to create
+ // already exists, and you own it. Amazon S3 returns this error in all AWS
+ // Regions except in the North Virginia Region. For legacy compatibility,
+ // if you re-create an existing bucket that you already own in the North
+ // Virginia Region, Amazon S3 returns 200 OK and resets the bucket access
+ // control lists (ACLs). Code: 409 Conflict (in all Regions except the North
+ // Virginia Region) SOAP Fault Code Prefix: Client
+ //
+ // * Code: BucketNotEmpty Description: The bucket you tried to delete is
+ // not empty. HTTP Status Code: 409 Conflict SOAP Fault Code Prefix: Client
+ //
+ // * Code: CredentialsNotSupported Description: This request does not support
+ // credentials. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
+ // Client
+ //
+ // * Code: CrossLocationLoggingProhibited Description: Cross-location logging
+ // not allowed. Buckets in one geographic location cannot log information
+ // to a bucket in another location. HTTP Status Code: 403 Forbidden SOAP
+ // Fault Code Prefix: Client
+ //
+ // * Code: EntityTooSmall Description: Your proposed upload is smaller than
+ // the minimum allowed object size. HTTP Status Code: 400 Bad Request SOAP
+ // Fault Code Prefix: Client
+ //
+ // * Code: EntityTooLarge Description: Your proposed upload exceeds the maximum
+ // allowed object size. HTTP Status Code: 400 Bad Request SOAP Fault Code
+ // Prefix: Client
+ //
+ // * Code: ExpiredToken Description: The provided token has expired. HTTP
+ // Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: IllegalVersioningConfigurationException Description: Indicates
+ // that the versioning configuration specified in the request is invalid.
+ // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: IncompleteBody Description: You did not provide the number of
+ // bytes specified by the Content-Length HTTP header HTTP Status Code: 400
+ // Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: IncorrectNumberOfFilesInPostRequest Description: POST requires
+ // exactly one file upload per request. HTTP Status Code: 400 Bad Request
+ // SOAP Fault Code Prefix: Client
+ //
+ // * Code: InlineDataTooLarge Description: Inline data exceeds the maximum
+ // allowed size. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
+ // Client
+ //
+ // * Code: InternalError Description: We encountered an internal error. Please
+ // try again. HTTP Status Code: 500 Internal Server Error SOAP Fault Code
+ // Prefix: Server
+ //
+ // * Code: InvalidAccessKeyId Description: The AWS access key ID you provided
+ // does not exist in our records. HTTP Status Code: 403 Forbidden SOAP Fault
+ // Code Prefix: Client
+ //
+ // * Code: InvalidAddressingHeader Description: You must specify the Anonymous
+ // role. HTTP Status Code: N/A SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidArgument Description: Invalid Argument HTTP Status Code:
+ // 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidBucketName Description: The specified bucket is not valid.
+ // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidBucketState Description: The request is not valid with
+ // the current state of the bucket. HTTP Status Code: 409 Conflict SOAP Fault
+ // Code Prefix: Client
+ //
+ // * Code: InvalidDigest Description: The Content-MD5 you specified is not
+ // valid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidEncryptionAlgorithmError Description: The encryption request
+ // you specified is not valid. The valid value is AES256. HTTP Status Code:
+ // 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidLocationConstraint Description: The specified location
+ // constraint is not valid. For more information about Regions, see How to
+ // Select a Region for Your Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
+ // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidObjectState Description: The operation is not valid for
+ // the current state of the object. HTTP Status Code: 403 Forbidden SOAP
+ // Fault Code Prefix: Client
+ //
+ // * Code: InvalidPart Description: One or more of the specified parts could
+ // not be found. The part might not have been uploaded, or the specified
+ // entity tag might not have matched the part's entity tag. HTTP Status Code:
+ // 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidPartOrder Description: The list of parts was not in ascending
+ // order. Parts list must be specified in order by part number. HTTP Status
+ // Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidPayer Description: All access to this object has been disabled.
+ // Please contact AWS Support for further assistance. HTTP Status Code: 403
+ // Forbidden SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidPolicyDocument Description: The content of the form does
+ // not meet the conditions specified in the policy document. HTTP Status
+ // Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidRange Description: The requested range cannot be satisfied.
+ // HTTP Status Code: 416 Requested Range Not Satisfiable SOAP Fault Code
+ // Prefix: Client
+ //
+ // * Code: InvalidRequest Description: Please use AWS4-HMAC-SHA256. HTTP
+ // Status Code: 400 Bad Request Code: N/A
+ //
+ // * Code: InvalidRequest Description: SOAP requests must be made over an
+ // HTTPS connection. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
+ // Client
+ //
+ // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is
+ // not supported for buckets with non-DNS compliant names. HTTP Status Code:
+ // 400 Bad Request Code: N/A
+ //
+ // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is
+ // not supported for buckets with periods (.) in their names. HTTP Status
+ // Code: 400 Bad Request Code: N/A
+ //
+ // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate endpoint
+ // only supports virtual style requests. HTTP Status Code: 400 Bad Request
+ // Code: N/A
+ //
+ // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate is not
+ // configured on this bucket. HTTP Status Code: 400 Bad Request Code: N/A
+ //
+ // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate is disabled
+ // on this bucket. HTTP Status Code: 400 Bad Request Code: N/A
+ //
+ // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is
+ // not supported on this bucket. Contact AWS Support for more information.
+ // HTTP Status Code: 400 Bad Request Code: N/A
+ //
+ // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration cannot
+ // be enabled on this bucket. Contact AWS Support for more information. HTTP
+ // Status Code: 400 Bad Request Code: N/A
+ //
+ // * Code: InvalidSecurity Description: The provided security credentials
+ // are not valid. HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix:
+ // Client
+ //
+ // * Code: InvalidSOAPRequest Description: The SOAP request body is invalid.
+ // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidStorageClass Description: The storage class you specified
+ // is not valid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
+ // Client
+ //
+ // * Code: InvalidTargetBucketForLogging Description: The target bucket for
+ // logging does not exist, is not owned by you, or does not have the appropriate
+ // grants for the log-delivery group. HTTP Status Code: 400 Bad Request SOAP
+ // Fault Code Prefix: Client
+ //
+ // * Code: InvalidToken Description: The provided token is malformed or otherwise
+ // invalid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: InvalidURI Description: Couldn't parse the specified URI. HTTP
+ // Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: KeyTooLongError Description: Your key is too long. HTTP Status
+ // Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: MalformedACLError Description: The XML you provided was not well-formed
+ // or did not validate against our published schema. HTTP Status Code: 400
+ // Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: MalformedPOSTRequest Description: The body of your POST request
+ // is not well-formed multipart/form-data. HTTP Status Code: 400 Bad Request
+ // SOAP Fault Code Prefix: Client
+ //
+ // * Code: MalformedXML Description: This happens when the user sends malformed
+ // XML (XML that doesn't conform to the published XSD) for the configuration.
+ // The error message is, "The XML you provided was not well-formed or did
+ // not validate against our published schema." HTTP Status Code: 400 Bad
+ // Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: MaxMessageLengthExceeded Description: Your request was too big.
+ // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: MaxPostPreDataLengthExceededError Description: Your POST request
+ // fields preceding the upload file were too large. HTTP Status Code: 400
+ // Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: MetadataTooLarge Description: Your metadata headers exceed the
+ // maximum allowed metadata size. HTTP Status Code: 400 Bad Request SOAP
+ // Fault Code Prefix: Client
+ //
+ // * Code: MethodNotAllowed Description: The specified method is not allowed
+ // against this resource. HTTP Status Code: 405 Method Not Allowed SOAP Fault
+ // Code Prefix: Client
+ //
+ // * Code: MissingAttachment Description: A SOAP attachment was expected,
+ // but none were found. HTTP Status Code: N/A SOAP Fault Code Prefix: Client
+ //
+ // * Code: MissingContentLength Description: You must provide the Content-Length
+ // HTTP header. HTTP Status Code: 411 Length Required SOAP Fault Code Prefix:
+ // Client
+ //
+ // * Code: MissingRequestBodyError Description: This happens when the user
+ // sends an empty XML document as a request. The error message is, "Request
+ // body is empty." HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
+ // Client
+ //
+ // * Code: MissingSecurityElement Description: The SOAP 1.1 request is missing
+ // a security element. HTTP Status Code: 400 Bad Request SOAP Fault Code
+ // Prefix: Client
+ //
+ // * Code: MissingSecurityHeader Description: Your request is missing a required
+ // header. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: NoLoggingStatusForKey Description: There is no such thing as a
+ // logging status subresource for a key. HTTP Status Code: 400 Bad Request
+ // SOAP Fault Code Prefix: Client
+ //
+ // * Code: NoSuchBucket Description: The specified bucket does not exist.
+ // HTTP Status Code: 404 Not Found SOAP Fault Code Prefix: Client
+ //
+ // * Code: NoSuchBucketPolicy Description: The specified bucket does not
+ // have a bucket policy. HTTP Status Code: 404 Not Found SOAP Fault Code
+ // Prefix: Client
+ //
+ // * Code: NoSuchKey Description: The specified key does not exist. HTTP
+ // Status Code: 404 Not Found SOAP Fault Code Prefix: Client
+ //
+ // * Code: NoSuchLifecycleConfiguration Description: The lifecycle configuration
+ // does not exist. HTTP Status Code: 404 Not Found SOAP Fault Code Prefix:
+ // Client
+ //
+ // * Code: NoSuchUpload Description: The specified multipart upload does
+ // not exist. The upload ID might be invalid, or the multipart upload might
+ // have been aborted or completed. HTTP Status Code: 404 Not Found SOAP Fault
+ // Code Prefix: Client
+ //
+ // * Code: NoSuchVersion Description: Indicates that the version ID specified
+ // in the request does not match an existing version. HTTP Status Code: 404
+ // Not Found SOAP Fault Code Prefix: Client
+ //
+ // * Code: NotImplemented Description: A header you provided implies functionality
+ // that is not implemented. HTTP Status Code: 501 Not Implemented SOAP Fault
+ // Code Prefix: Server
+ //
+ // * Code: NotSignedUp Description: Your account is not signed up for the
+ // Amazon S3 service. You must sign up before you can use Amazon S3. You
+ // can sign up at the following URL: https://aws.amazon.com/s3 HTTP Status
+ // Code: 403 Forbidden SOAP Fault Code Prefix: Client
+ //
+ // * Code: OperationAborted Description: A conflicting conditional operation
+ // is currently in progress against this resource. Try again. HTTP Status
+ // Code: 409 Conflict SOAP Fault Code Prefix: Client
+ //
+ // * Code: PermanentRedirect Description: The bucket you are attempting to
+ // access must be addressed using the specified endpoint. Send all future
+ // requests to this endpoint. HTTP Status Code: 301 Moved Permanently SOAP
+ // Fault Code Prefix: Client
+ //
+ // * Code: PreconditionFailed Description: At least one of the preconditions
+ // you specified did not hold. HTTP Status Code: 412 Precondition Failed
+ // SOAP Fault Code Prefix: Client
+ //
+ // * Code: Redirect Description: Temporary redirect. HTTP Status Code: 307
+ // Moved Temporarily SOAP Fault Code Prefix: Client
+ //
+ // * Code: RestoreAlreadyInProgress Description: Object restore is already
+ // in progress. HTTP Status Code: 409 Conflict SOAP Fault Code Prefix: Client
+ //
+ // * Code: RequestIsNotMultiPartContent Description: Bucket POST must be
+ // of the enclosure-type multipart/form-data. HTTP Status Code: 400 Bad Request
+ // SOAP Fault Code Prefix: Client
+ //
+ // * Code: RequestTimeout Description: Your socket connection to the server
+ // was not read from or written to within the timeout period. HTTP Status
+ // Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: RequestTimeTooSkewed Description: The difference between the request
+ // time and the server's time is too large. HTTP Status Code: 403 Forbidden
+ // SOAP Fault Code Prefix: Client
+ //
+ // * Code: RequestTorrentOfBucketError Description: Requesting the torrent
+ // file of a bucket is not permitted. HTTP Status Code: 400 Bad Request SOAP
+ // Fault Code Prefix: Client
+ //
+ // * Code: SignatureDoesNotMatch Description: The request signature we calculated
+ // does not match the signature you provided. Check your AWS secret access
+ // key and signing method. For more information, see REST Authentication
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
+ // and SOAP Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/SOAPAuthentication.html)
+ // for details. HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix: Client
+ //
+ // * Code: ServiceUnavailable Description: Reduce your request rate. HTTP
+ // Status Code: 503 Service Unavailable SOAP Fault Code Prefix: Server
+ //
+ // * Code: SlowDown Description: Reduce your request rate. HTTP Status Code:
+ // 503 Slow Down SOAP Fault Code Prefix: Server
+ //
+ // * Code: TemporaryRedirect Description: You are being redirected to the
+ // bucket while DNS updates. HTTP Status Code: 307 Moved Temporarily SOAP
+ // Fault Code Prefix: Client
+ //
+ // * Code: TokenRefreshRequired Description: The provided token must be refreshed.
+ // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: TooManyBuckets Description: You have attempted to create more
+ // buckets than allowed. HTTP Status Code: 400 Bad Request SOAP Fault Code
+ // Prefix: Client
+ //
+ // * Code: UnexpectedContent Description: This request does not support content.
+ // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: UnresolvableGrantByEmailAddress Description: The email address
+ // you provided does not match any account on record. HTTP Status Code: 400
+ // Bad Request SOAP Fault Code Prefix: Client
+ //
+ // * Code: UserKeyMustBeSpecified Description: The bucket POST must contain
+ // the specified field name. If it is specified, check the order of the fields.
+ // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
Code *string `type:"string"`
+ // The error key.
Key *string `min:"1" type:"string"`
+ // The error message contains a generic description of the error condition in
+ // English. It is intended for a human audience. Simple programs display the
+ // message directly to the end user if they encounter an error condition they
+ // don't know how or don't care to handle. Sophisticated programs with more
+ // exhaustive error handling and proper internationalization are more likely
+ // to ignore the error message.
Message *string `type:"string"`
+ // The version ID of the error.
VersionId *string `type:"string"`
}
@@ -11261,33 +15185,73 @@ func (s *Error) SetVersionId(v string) *Error {
return s
}
-type ErrorDocument struct {
+// The error information.
+type ErrorDocument struct {
+ _ struct{} `type:"structure"`
+
+ // The object key name to use when a 4XX class error occurs.
+ //
+ // Key is a required field
+ Key *string `min:"1" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ErrorDocument) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ErrorDocument) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ErrorDocument) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
+ 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 *ErrorDocument) SetKey(v string) *ErrorDocument {
+ s.Key = &v
+ return s
+}
+
+// Optional configuration to replicate existing source bucket objects. For more
+// information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication)
+// in the Amazon S3 Developer Guide.
+type ExistingObjectReplication struct {
_ struct{} `type:"structure"`
- // The object key name to use when a 4XX class error occurs.
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
+ // Status is a required field
+ Status *string `type:"string" required:"true" enum:"ExistingObjectReplicationStatus"`
}
// String returns the string representation
-func (s ErrorDocument) String() string {
+func (s ExistingObjectReplication) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s ErrorDocument) GoString() string {
+func (s ExistingObjectReplication) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
-func (s *ErrorDocument) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
+func (s *ExistingObjectReplication) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ExistingObjectReplication"}
+ if s.Status == nil {
+ invalidParams.Add(request.NewErrParamRequired("Status"))
}
if invalidParams.Len() > 0 {
@@ -11296,9 +15260,9 @@ func (s *ErrorDocument) Validate() error {
return nil
}
-// SetKey sets the Key field's value.
-func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
- s.Key = &v
+// SetStatus sets the Status field's value.
+func (s *ExistingObjectReplication) SetStatus(v string) *ExistingObjectReplication {
+ s.Status = &v
return s
}
@@ -11388,6 +15352,20 @@ func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketAccelerateConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketAccelerateConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketAccelerateConfigurationOutput struct {
_ struct{} `type:"structure"`
@@ -11414,6 +15392,8 @@ func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketA
type GetBucketAclInput struct {
_ struct{} `locationName:"GetBucketAclRequest" type:"structure"`
+ // Specifies the S3 bucket whose ACL is being requested.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -11457,12 +15437,27 @@ func (s *GetBucketAclInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketAclInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketAclInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketAclOutput struct {
_ struct{} `type:"structure"`
// A list of grants.
Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
+ // Container for the bucket owner's display name and ID.
Owner *Owner `type:"structure"`
}
@@ -11550,6 +15545,20 @@ func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyti
return s
}
+func (s *GetBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketAnalyticsConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketAnalyticsConfigurationOutput struct {
_ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
@@ -11576,6 +15585,8 @@ func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *Ana
type GetBucketCorsInput struct {
_ struct{} `locationName:"GetBucketCorsRequest" type:"structure"`
+ // The bucket name for which to get the cors configuration.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -11619,9 +15630,25 @@ func (s *GetBucketCorsInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketCorsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketCorsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketCorsOutput struct {
_ struct{} `type:"structure"`
+ // A set of origins and methods (cross-origin access that you want to allow).
+ // You can add up to 100 rules to the configuration.
CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
}
@@ -11690,6 +15717,20 @@ func (s *GetBucketEncryptionInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketEncryptionInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketEncryptionInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketEncryptionOutput struct {
_ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
@@ -11775,6 +15816,20 @@ func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInvento
return s
}
+func (s *GetBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketInventoryConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketInventoryConfigurationOutput struct {
_ struct{} `type:"structure" payload:"InventoryConfiguration"`
@@ -11801,6 +15856,8 @@ func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *Inv
type GetBucketLifecycleConfigurationInput struct {
_ struct{} `locationName:"GetBucketLifecycleConfigurationRequest" type:"structure"`
+ // The name of the bucket for which to get the lifecycle information.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -11844,9 +15901,24 @@ func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketLifecycleConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketLifecycleConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketLifecycleConfigurationOutput struct {
_ struct{} `type:"structure"`
+ // Container for a lifecycle rule.
Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
}
@@ -11869,6 +15941,8 @@ func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *Ge
type GetBucketLifecycleInput struct {
_ struct{} `locationName:"GetBucketLifecycleRequest" type:"structure"`
+ // The name of the bucket for which to get the lifecycle information.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -11912,9 +15986,24 @@ func (s *GetBucketLifecycleInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketLifecycleInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketLifecycleInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketLifecycleOutput struct {
_ struct{} `type:"structure"`
+ // Container for a lifecycle rule.
Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
}
@@ -11937,6 +16026,8 @@ func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput
type GetBucketLocationInput struct {
_ struct{} `locationName:"GetBucketLocationRequest" type:"structure"`
+ // The name of the bucket for which to get the location.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -11980,9 +16071,26 @@ func (s *GetBucketLocationInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketLocationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketLocationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketLocationOutput struct {
_ struct{} `type:"structure"`
+ // Specifies the Region where the bucket resides. For a list of all the Amazon
+ // S3 supported location constraints by Region, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region).
+ // Buckets in Region us-east-1 have a LocationConstraint of null.
LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
}
@@ -12005,6 +16113,8 @@ func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLoca
type GetBucketLoggingInput struct {
_ struct{} `locationName:"GetBucketLoggingRequest" type:"structure"`
+ // The bucket name for which to get the logging information.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -12048,6 +16158,20 @@ func (s *GetBucketLoggingInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketLoggingInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketLoggingInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketLoggingOutput struct {
_ struct{} `type:"structure"`
@@ -12136,6 +16260,20 @@ func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsCo
return s
}
+func (s *GetBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketMetricsConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketMetricsConfigurationOutput struct {
_ struct{} `type:"structure" payload:"MetricsConfiguration"`
@@ -12162,7 +16300,7 @@ func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *Metrics
type GetBucketNotificationConfigurationRequest struct {
_ struct{} `locationName:"GetBucketNotificationConfigurationRequest" type:"structure"`
- // Name of the bucket to get the notification configuration for.
+ // Name of the bucket for which to get the notification configuration.
//
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -12207,9 +16345,25 @@ func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketNotificationConfigurationRequest) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketNotificationConfigurationRequest) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketPolicyInput struct {
_ struct{} `locationName:"GetBucketPolicyRequest" type:"structure"`
+ // The bucket name for which to get the bucket policy.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -12253,6 +16407,20 @@ func (s *GetBucketPolicyInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketPolicyInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketPolicyInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketPolicyOutput struct {
_ struct{} `type:"structure" payload:"Policy"`
@@ -12324,6 +16492,20 @@ func (s *GetBucketPolicyStatusInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketPolicyStatusInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketPolicyStatusInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketPolicyStatusOutput struct {
_ struct{} `type:"structure" payload:"PolicyStatus"`
@@ -12350,6 +16532,8 @@ func (s *GetBucketPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetBucke
type GetBucketReplicationInput struct {
_ struct{} `locationName:"GetBucketReplicationRequest" type:"structure"`
+ // The bucket name for which to get the replication information.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -12393,6 +16577,20 @@ func (s *GetBucketReplicationInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketReplicationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketReplicationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketReplicationOutput struct {
_ struct{} `type:"structure" payload:"ReplicationConfiguration"`
@@ -12420,6 +16618,8 @@ func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationC
type GetBucketRequestPaymentInput struct {
_ struct{} `locationName:"GetBucketRequestPaymentRequest" type:"structure"`
+ // The name of the bucket for which to get the payment request configuration
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -12463,6 +16663,20 @@ func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketRequestPaymentInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketRequestPaymentInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketRequestPaymentOutput struct {
_ struct{} `type:"structure"`
@@ -12489,6 +16703,8 @@ func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaym
type GetBucketTaggingInput struct {
_ struct{} `locationName:"GetBucketTaggingRequest" type:"structure"`
+ // The name of the bucket for which to get the tagging information.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -12532,9 +16748,25 @@ func (s *GetBucketTaggingInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketTaggingInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketTaggingInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketTaggingOutput struct {
_ struct{} `type:"structure"`
+ // Contains the tag set.
+ //
// TagSet is a required field
TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
}
@@ -12558,6 +16790,8 @@ func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
type GetBucketVersioningInput struct {
_ struct{} `locationName:"GetBucketVersioningRequest" type:"structure"`
+ // The name of the bucket for which to get the versioning information.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -12601,6 +16835,20 @@ func (s *GetBucketVersioningInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketVersioningInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketVersioningInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketVersioningOutput struct {
_ struct{} `type:"structure"`
@@ -12638,6 +16886,8 @@ func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutp
type GetBucketWebsiteInput struct {
_ struct{} `locationName:"GetBucketWebsiteRequest" type:"structure"`
+ // The bucket name for which to get the website configuration.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -12681,17 +16931,34 @@ func (s *GetBucketWebsiteInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetBucketWebsiteInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetBucketWebsiteInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetBucketWebsiteOutput struct {
_ struct{} `type:"structure"`
+ // The object key name of the website error document to use for 4XX class errors.
ErrorDocument *ErrorDocument `type:"structure"`
+ // The name of the index document for the website (for example index.html).
IndexDocument *IndexDocument `type:"structure"`
// Specifies the redirect behavior of all requests to a website endpoint of
// an Amazon S3 bucket.
RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
+ // Rules that define when a redirect is applied and the redirect behavior.
RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
}
@@ -12732,16 +16999,28 @@ func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWeb
type GetObjectAclInput struct {
_ struct{} `locationName:"GetObjectAclRequest" type:"structure"`
+ // The bucket name that contains the object for which to get the ACL information.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // The key of the object for which to get the ACL information.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// VersionId used to reference a specific version of the object.
@@ -12811,12 +17090,27 @@ func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
return s
}
+func (s *GetObjectAclInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetObjectAclInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetObjectAclOutput struct {
_ struct{} `type:"structure"`
// A list of grants.
Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
+ // Container for the bucket owner's display name and ID.
Owner *Owner `type:"structure"`
// If present, indicates that the requester was successfully charged for the
@@ -12855,6 +17149,15 @@ func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
type GetObjectInput struct {
_ struct{} `locationName:"GetObjectRequest" type:"structure"`
+ // The bucket name containing the object.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -12874,6 +17177,8 @@ type GetObjectInput struct {
// otherwise return a 412 (precondition failed).
IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
+ // Key of the object to get.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
@@ -12883,13 +17188,17 @@ type GetObjectInput struct {
PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
// Downloads the specified range bytes of an object. For more information about
- // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
+ // the HTTP Range header, see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
+ // (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35).
+ //
+ // Amazon S3 doesn't support retrieving multiple ranges of data per GET request.
Range *string `location:"header" locationName:"Range" type:"string"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// Sets the Cache-Control header of the response.
@@ -12910,19 +17219,20 @@ type GetObjectInput struct {
// Sets the Expires header of the response.
ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
// data. This value is used to store the object and then it is discarded; Amazon
- // does not store the encryption key. The key must be appropriate for use with
- // the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
+ // S3 does not store the encryption key. The key must be appropriate for use
+ // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
// header.
SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure the encryption
- // key was transmitted without error.
+ // Amazon S3 uses this header for a message integrity check to ensure that the
+ // encryption key was transmitted without error.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
// VersionId used to reference a specific version of the object.
@@ -13089,10 +17399,32 @@ func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
return s
}
+func (s *GetObjectInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetObjectInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetObjectLegalHoldInput struct {
_ struct{} `locationName:"GetObjectLegalHoldRequest" type:"structure"`
- // The bucket containing the object whose Legal Hold status you want to retrieve.
+ // The bucket name containing the object whose Legal Hold status you want to
+ // retrieve.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
//
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -13102,10 +17434,11 @@ type GetObjectLegalHoldInput struct {
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// The version ID of the object whose Legal Hold status you want to retrieve.
@@ -13175,6 +17508,20 @@ func (s *GetObjectLegalHoldInput) SetVersionId(v string) *GetObjectLegalHoldInpu
return s
}
+func (s *GetObjectLegalHoldInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetObjectLegalHoldInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetObjectLegalHoldOutput struct {
_ struct{} `type:"structure" payload:"LegalHold"`
@@ -13201,7 +17548,7 @@ func (s *GetObjectLegalHoldOutput) SetLegalHold(v *ObjectLockLegalHold) *GetObje
type GetObjectLockConfigurationInput struct {
_ struct{} `locationName:"GetObjectLockConfigurationRequest" type:"structure"`
- // The bucket whose object lock configuration you want to retrieve.
+ // The bucket whose Object Lock configuration you want to retrieve.
//
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -13246,10 +17593,24 @@ func (s *GetObjectLockConfigurationInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetObjectLockConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetObjectLockConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetObjectLockConfigurationOutput struct {
_ struct{} `type:"structure" payload:"ObjectLockConfiguration"`
- // The specified bucket's object lock configuration.
+ // The specified bucket's Object Lock configuration.
ObjectLockConfiguration *ObjectLockConfiguration `type:"structure"`
}
@@ -13272,6 +17633,7 @@ func (s *GetObjectLockConfigurationOutput) SetObjectLockConfiguration(v *ObjectL
type GetObjectOutput struct {
_ struct{} `type:"structure" payload:"Body"`
+ // Indicates that a range of bytes was specified.
AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
// Object data.
@@ -13305,11 +17667,11 @@ type GetObjectOutput struct {
DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
// An ETag is an opaque identifier assigned by a web server to a specific version
- // of a resource found at a URL
+ // of a resource found at a URL.
ETag *string `location:"header" locationName:"ETag" type:"string"`
// If the object expiration is configured (see PUT Bucket lifecycle), the response
- // includes this header. It includes the expiry-date and rule-id key value pairs
+ // includes this header. It includes the expiry-date and rule-id key-value pairs
// providing object expiration information. The value of the rule-id is URL
// encoded.
Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
@@ -13321,6 +17683,10 @@ type GetObjectOutput struct {
LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
// A map of metadata to store with the object in S3.
+ //
+ // By default unmarshaled keys are written as a map keys in following canonicalized format:
+ // the first letter and any letter following a hyphen will be capitalized, and the rest as lowercase.
+ // Set `aws.Config.LowerCaseHeaderMaps` to `true` to write unmarshaled keys to the map as lowercase.
Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
// This is set to the number of metadata entries not returned in x-amz-meta
@@ -13333,15 +17699,17 @@ type GetObjectOutput struct {
// returned if you have permission to view an object's legal hold status.
ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
- // The object lock mode currently in place for this object.
+ // The Object Lock mode currently in place for this object.
ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
- // The date and time when this object's object lock will expire.
+ // The date and time when this object's Object Lock will expire.
ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
// The count of parts this object has.
PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
+ // Amazon S3 can return this if your request involves a bucket that is either
+ // a source or destination in a replication rule.
ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
// If present, indicates that the requester was successfully charged for the
@@ -13358,18 +17726,21 @@ type GetObjectOutput struct {
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round trip message integrity
+ // the response will include this header to provide round-trip message integrity
// verification of the customer-provided encryption key.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
- // If present, specifies the ID of the AWS Key Management Service (KMS) master
- // encryption key that was used for the object.
+ // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
+ // symmetric customer managed customer master key (CMK) that was used for the
+ // object.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // The server-side encryption algorithm used when storing this object in Amazon
+ // S3 (for example, AES256, aws:kms).
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
+ // Provides storage class information of the object. Amazon S3 returns this
+ // header for all objects except for S3 Standard storage class objects.
StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
// The number of tags, if any, on the object.
@@ -13583,7 +17954,15 @@ func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput
type GetObjectRetentionInput struct {
_ struct{} `locationName:"GetObjectRetentionRequest" type:"structure"`
- // The bucket containing the object whose retention settings you want to retrieve.
+ // The bucket name containing the object whose retention settings you want to
+ // retrieve.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
//
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -13593,10 +17972,11 @@ type GetObjectRetentionInput struct {
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// The version ID for the object whose retention settings you want to retrieve.
@@ -13660,10 +18040,24 @@ func (s *GetObjectRetentionInput) SetRequestPayer(v string) *GetObjectRetentionI
return s
}
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectRetentionInput) SetVersionId(v string) *GetObjectRetentionInput {
- s.VersionId = &v
- return s
+// SetVersionId sets the VersionId field's value.
+func (s *GetObjectRetentionInput) SetVersionId(v string) *GetObjectRetentionInput {
+ s.VersionId = &v
+ return s
+}
+
+func (s *GetObjectRetentionInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetObjectRetentionInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
}
type GetObjectRetentionOutput struct {
@@ -13692,12 +18086,24 @@ func (s *GetObjectRetentionOutput) SetRetention(v *ObjectLockRetention) *GetObje
type GetObjectTaggingInput struct {
_ struct{} `locationName:"GetObjectTaggingRequest" type:"structure"`
+ // The bucket name containing the object for which to get the tagging information.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Object key for which to get the tagging information.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
+ // The versionId of the object for which to get the tagging information.
VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
}
@@ -13758,12 +18164,29 @@ func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
return s
}
+func (s *GetObjectTaggingInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetObjectTaggingInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetObjectTaggingOutput struct {
_ struct{} `type:"structure"`
+ // Contains the tag set.
+ //
// TagSet is a required field
TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
+ // The versionId of the object for which you got the tagging information.
VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
}
@@ -13792,16 +18215,22 @@ func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput
type GetObjectTorrentInput struct {
_ struct{} `locationName:"GetObjectTorrentRequest" type:"structure"`
+ // The name of the bucket containing the object for which to get the torrent
+ // files.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // The object key for which to get the information.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
}
@@ -13862,9 +18291,24 @@ func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput
return s
}
+func (s *GetObjectTorrentInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetObjectTorrentInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetObjectTorrentOutput struct {
_ struct{} `type:"structure" payload:"Body"`
+ // A Bencoded dictionary as defined by the BitTorrent specification
Body io.ReadCloser `type:"blob"`
// If present, indicates that the requester was successfully charged for the
@@ -13943,6 +18387,20 @@ func (s *GetPublicAccessBlockInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *GetPublicAccessBlockInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *GetPublicAccessBlockInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type GetPublicAccessBlockOutput struct {
_ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"`
@@ -13967,10 +18425,11 @@ func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *Public
return s
}
+// Container for S3 Glacier job parameters.
type GlacierJobParameters struct {
_ struct{} `type:"structure"`
- // Glacier retrieval tier at which the restore will be processed.
+ // S3 Glacier retrieval tier at which the restore will be processed.
//
// Tier is a required field
Tier *string `type:"string" required:"true" enum:"Tier"`
@@ -14005,9 +18464,11 @@ func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
return s
}
+// Container for grant information.
type Grant struct {
_ struct{} `type:"structure"`
+ // The person being granted permissions.
Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
// Specifies the permission given to the grantee.
@@ -14051,6 +18512,7 @@ func (s *Grant) SetPermission(v string) *Grant {
return s
}
+// Container for the person being granted permissions.
type Grantee struct {
_ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
@@ -14058,6 +18520,29 @@ type Grantee struct {
DisplayName *string `type:"string"`
// Email address of the grantee.
+ //
+ // Using email addresses to specify a grantee is only supported in the following
+ // AWS Regions:
+ //
+ // * US East (N. Virginia)
+ //
+ // * US West (N. California)
+ //
+ // * US West (Oregon)
+ //
+ // * Asia Pacific (Singapore)
+ //
+ // * Asia Pacific (Sydney)
+ //
+ // * Asia Pacific (Tokyo)
+ //
+ // * Europe (Ireland)
+ //
+ // * South America (São Paulo)
+ //
+ // For a list of all the Amazon S3 supported Regions and endpoints, see Regions
+ // and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
+ // in the AWS General Reference.
EmailAddress *string `type:"string"`
// The canonical user ID of the grantee.
@@ -14128,6 +18613,8 @@ func (s *Grantee) SetURI(v string) *Grantee {
type HeadBucketInput struct {
_ struct{} `locationName:"HeadBucketRequest" type:"structure"`
+ // The bucket name.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
}
@@ -14171,6 +18658,20 @@ func (s *HeadBucketInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *HeadBucketInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *HeadBucketInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type HeadBucketOutput struct {
_ struct{} `type:"structure"`
}
@@ -14188,6 +18689,8 @@ func (s HeadBucketOutput) GoString() string {
type HeadObjectInput struct {
_ struct{} `locationName:"HeadObjectRequest" type:"structure"`
+ // The name of the bucket containing the object.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -14207,6 +18710,8 @@ type HeadObjectInput struct {
// otherwise return a 412 (precondition failed).
IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
+ // The object key.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
@@ -14217,28 +18722,32 @@ type HeadObjectInput struct {
PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
// Downloads the specified range bytes of an object. For more information about
- // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
+ // the HTTP Range header, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
+ //
+ // Amazon S3 doesn't support retrieving multiple ranges of data per GET request.
Range *string `location:"header" locationName:"Range" type:"string"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
// data. This value is used to store the object and then it is discarded; Amazon
- // does not store the encryption key. The key must be appropriate for use with
- // the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
+ // S3 does not store the encryption key. The key must be appropriate for use
+ // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
// header.
SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure the encryption
- // key was transmitted without error.
+ // Amazon S3 uses this header for a message integrity check to ensure that the
+ // encryption key was transmitted without error.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
// VersionId used to reference a specific version of the object.
@@ -14369,9 +18878,24 @@ func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
return s
}
+func (s *HeadObjectInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *HeadObjectInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type HeadObjectOutput struct {
_ struct{} `type:"structure"`
+ // Indicates that a range of bytes was specified.
AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
// Specifies caching behavior along the request/reply chain.
@@ -14399,11 +18923,11 @@ type HeadObjectOutput struct {
DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
// An ETag is an opaque identifier assigned by a web server to a specific version
- // of a resource found at a URL
+ // of a resource found at a URL.
ETag *string `location:"header" locationName:"ETag" type:"string"`
// If the object expiration is configured (see PUT Bucket lifecycle), the response
- // includes this header. It includes the expiry-date and rule-id key value pairs
+ // includes this header. It includes the expiry-date and rule-id key-value pairs
// providing object expiration information. The value of the rule-id is URL
// encoded.
Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
@@ -14415,6 +18939,10 @@ type HeadObjectOutput struct {
LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
// A map of metadata to store with the object in S3.
+ //
+ // By default unmarshaled keys are written as a map keys in following canonicalized format:
+ // the first letter and any letter following a hyphen will be capitalized, and the rest as lowercase.
+ // Set `aws.Config.LowerCaseHeaderMaps` to `true` to write unmarshaled keys to the map as lowercase.
Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
// This is set to the number of metadata entries not returned in x-amz-meta
@@ -14423,26 +18951,69 @@ type HeadObjectOutput struct {
// you can create metadata whose values are not legal HTTP headers.
MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
- // The Legal Hold status for the specified object.
+ // Specifies whether a legal hold is in effect for this object. This header
+ // is only returned if the requester has the s3:GetObjectLegalHold permission.
+ // This header is not returned if the specified version of this object has never
+ // had a legal hold applied. For more information about S3 Object Lock, see
+ // Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
- // The object lock mode currently in place for this object.
+ // The Object Lock mode, if any, that's in effect for this object. This header
+ // is only returned if the requester has the s3:GetObjectRetention permission.
+ // For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
- // The date and time when this object's object lock expires.
+ // The date and time when the Object Lock retention period expires. This header
+ // is only returned if the requester has the s3:GetObjectRetention permission.
ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
// The count of parts this object has.
PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
+ // Amazon S3 can return this header if your request involves a bucket that is
+ // either a source or destination in a replication rule.
+ //
+ // In replication, you have a source bucket on which you configure replication
+ // and destination bucket where Amazon S3 stores object replicas. When you request
+ // an object (GetObject) or object metadata (HeadObject) from these buckets,
+ // Amazon S3 will return the x-amz-replication-status header in the response
+ // as follows:
+ //
+ // * If requesting an object from the source bucket — Amazon S3 will return
+ // the x-amz-replication-status header if the object in your request is eligible
+ // for replication. For example, suppose that in your replication configuration,
+ // you specify object prefix TaxDocs requesting Amazon S3 to replicate objects
+ // with key prefix TaxDocs. Any objects you upload with this key name prefix,
+ // for example TaxDocs/document1.pdf, are eligible for replication. For any
+ // object request with this key name prefix, Amazon S3 will return the x-amz-replication-status
+ // header with value PENDING, COMPLETED or FAILED indicating object replication
+ // status.
+ //
+ // * If requesting an object from the destination bucket — Amazon S3 will
+ // return the x-amz-replication-status header with value REPLICA if the object
+ // in your request is a replica that Amazon S3 created.
+ //
+ // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
// If present, indicates that the requester was successfully charged for the
// request.
RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
- // Provides information about object restoration operation and expiration time
- // of the restored object copy.
+ // If the object is an archived object (an object whose storage class is GLACIER),
+ // the response includes this header if either the archive restoration is in
+ // progress (see RestoreObject or an archive copy is already restored.
+ //
+ // If an archive copy is already restored, the header value indicates when Amazon
+ // S3 is scheduled to delete the object copy. For example:
+ //
+ // x-amz-restore: ongoing-request="false", expiry-date="Fri, 23 Dec 2012 00:00:00
+ // GMT"
+ //
+ // If the object restoration is in progress, the header returns the value ongoing-request="true".
+ //
+ // For more information about archiving objects, see Transitioning Objects:
+ // General Considerations (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations).
Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
// If server-side encryption with a customer-provided encryption key was requested,
@@ -14451,18 +19022,25 @@ type HeadObjectOutput struct {
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round trip message integrity
+ // the response will include this header to provide round-trip message integrity
// verification of the customer-provided encryption key.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
- // If present, specifies the ID of the AWS Key Management Service (KMS) master
- // encryption key that was used for the object.
+ // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
+ // symmetric customer managed customer master key (CMK) that was used for the
+ // object.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // If the object is stored using server-side encryption either with an AWS KMS
+ // customer master key (CMK) or an Amazon S3-managed encryption key, the response
+ // includes this header with the value of the server-side encryption algorithm
+ // used when storing this object in Amazon S3 (for example, AES256, aws:kms).
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
+ // Provides storage class information of the object. Amazon S3 returns this
+ // header for all objects except for S3 Standard storage class objects.
+ //
+ // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html).
StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
// Version of the object.
@@ -14652,13 +19230,15 @@ func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutpu
return s
}
+// Container for the Suffix element.
type IndexDocument struct {
_ struct{} `type:"structure"`
// A suffix that is appended to a request that is for a directory on the website
- // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
- // the data that is returned will be for the object with the key name images/index.html)
- // The suffix must not be empty and must not include a slash character.
+ // endpoint (for example,if the suffix is index.html and you make a request
+ // to samplebucket/images/ the data that is returned will be for the object
+ // with the key name images/index.html) The suffix must not be empty and must
+ // not include a slash character.
//
// Suffix is a required field
Suffix *string `type:"string" required:"true"`
@@ -14693,6 +19273,7 @@ func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
return s
}
+// Container element that identifies who initiated the multipart upload.
type Initiator struct {
_ struct{} `type:"structure"`
@@ -14913,6 +19494,7 @@ func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryCon
return s
}
+// Specifies the inventory configuration for an Amazon S3 bucket.
type InventoryDestination struct {
_ struct{} `type:"structure"`
@@ -14962,10 +19544,10 @@ func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestin
type InventoryEncryption struct {
_ struct{} `type:"structure"`
- // Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
+ // Specifies the use of SSE-KMS to encrypt delivered inventory reports.
SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"`
- // Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
+ // Specifies the use of SSE-S3 to encrypt delivered inventory reports.
SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
}
@@ -15006,6 +19588,8 @@ func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
return s
}
+// Specifies an inventory filter. The inventory only includes objects that meet
+// the filter's criteria.
type InventoryFilter struct {
_ struct{} `type:"structure"`
@@ -15044,13 +19628,19 @@ func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
return s
}
+// Contains the bucket name, file format, bucket owner (optional), and prefix
+// (optional) where inventory results are published.
type InventoryS3BucketDestination struct {
_ struct{} `type:"structure"`
- // The ID of the account that owns the destination bucket.
+ // The account ID that owns the destination S3 bucket. If no account ID is provided,
+ // the owner is not validated before exporting data.
+ //
+ // Although this value is optional, we strongly recommend that you set it to
+ // help prevent problems if the destination bucket ownership changes.
AccountId *string `type:"string"`
- // The Amazon resource name (ARN) of the bucket where inventory results will
+ // The Amazon Resource Name (ARN) of the bucket where inventory results will
// be published.
//
// Bucket is a required field
@@ -15137,6 +19727,7 @@ func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDes
return s
}
+// Specifies the schedule for generating inventory results.
type InventorySchedule struct {
_ struct{} `type:"structure"`
@@ -15175,6 +19766,7 @@ func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
return s
}
+// Specifies JSON as object's input serialization format.
type JSONInput struct {
_ struct{} `type:"structure"`
@@ -15198,10 +19790,12 @@ func (s *JSONInput) SetType(v string) *JSONInput {
return s
}
+// Specifies JSON as request's output serialization format.
type JSONOutput struct {
_ struct{} `type:"structure"`
- // The value used to separate individual records in the output.
+ // The value used to separate individual records in the output. If no value
+ // is specified, Amazon S3 uses a newline character ('\n').
RecordDelimiter *string `type:"string"`
}
@@ -15225,7 +19819,7 @@ func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput {
type KeyFilter struct {
_ struct{} `type:"structure"`
- // A list of containers for the key value pair that defines the criteria for
+ // A list of containers for the key-value pair that defines the criteria for
// the filter rule.
FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
}
@@ -15323,9 +19917,12 @@ func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunc
return s
}
+// Container for lifecycle rules. You can add as many as 1000 rules.
type LifecycleConfiguration struct {
_ struct{} `type:"structure"`
+ // Specifies lifecycle configuration rules for an Amazon S3 bucket.
+ //
// Rules is a required field
Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
}
@@ -15369,6 +19966,7 @@ func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
return s
}
+// Container for the expiration for the lifecycle of the object.
type LifecycleExpiration struct {
_ struct{} `type:"structure"`
@@ -15415,6 +20013,7 @@ func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExp
return s
}
+// A lifecycle rule for individual objects in an Amazon S3 bucket.
type LifecycleRule struct {
_ struct{} `type:"structure"`
@@ -15425,6 +20024,8 @@ type LifecycleRule struct {
// in the Amazon Simple Storage Service Developer Guide.
AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
+ // Specifies the expiration for the lifecycle of the object in the form of date,
+ // days and, whether the object has a delete marker.
Expiration *LifecycleExpiration `type:"structure"`
// The Filter is used to identify objects that a Lifecycle Rule applies to.
@@ -15441,6 +20042,11 @@ type LifecycleRule struct {
// period in the object's lifetime.
NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
+ // Specifies the transition rule for the lifecycle rule that describes when
+ // noncurrent objects transition to a specific storage class. If your bucket
+ // is versioning-enabled (or versioning is suspended), you can set this action
+ // to request that Amazon S3 transition noncurrent object versions to a specific
+ // storage class at a set period in the object's lifetime.
NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
// Prefix identifying one or more objects to which the rule applies. This is
@@ -15455,6 +20061,7 @@ type LifecycleRule struct {
// Status is a required field
Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
+ // Specifies when an Amazon S3 object transitions to a specified storage class.
Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
}
@@ -15546,6 +20153,7 @@ func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
type LifecycleRuleAndOperator struct {
_ struct{} `type:"structure"`
+ // Prefix identifying one or more objects to which the rule applies.
Prefix *string `type:"string"`
// All of these tags must exist in the object's tag set in order for the rule
@@ -15718,13 +20326,28 @@ func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string)
return s
}
+func (s *ListBucketAnalyticsConfigurationsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *ListBucketAnalyticsConfigurationsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type ListBucketAnalyticsConfigurationsOutput struct {
_ struct{} `type:"structure"`
// The list of analytics configurations for a bucket.
AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
- // The ContinuationToken that represents where this request began.
+ // The marker that is used as a starting point for this analytics configuration
+ // list response. This value is present if it was sent in the request.
ContinuationToken *string `type:"string"`
// Indicates whether the returned list of analytics configurations is complete.
@@ -15832,6 +20455,20 @@ func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string)
return s
}
+func (s *ListBucketInventoryConfigurationsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *ListBucketInventoryConfigurationsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type ListBucketInventoryConfigurationsOutput struct {
_ struct{} `type:"structure"`
@@ -15842,8 +20479,9 @@ type ListBucketInventoryConfigurationsOutput struct {
// The list of inventory configurations for a bucket.
InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
- // Indicates whether the returned list of inventory configurations is truncated
- // in this response. A value of true indicates that the list is truncated.
+ // Tells whether the returned list of inventory configurations is complete.
+ // A value of true indicates that the list is not complete and the NextContinuationToken
+ // is provided for a subsequent request.
IsTruncated *bool `type:"boolean"`
// The marker used to continue this inventory configuration listing. Use the
@@ -15946,6 +20584,20 @@ func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *L
return s
}
+func (s *ListBucketMetricsConfigurationsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *ListBucketMetricsConfigurationsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type ListBucketMetricsConfigurationsOutput struct {
_ struct{} `type:"structure"`
@@ -16019,8 +20671,10 @@ func (s ListBucketsInput) GoString() string {
type ListBucketsOutput struct {
_ struct{} `type:"structure"`
+ // The list of buckets owned by the requestor.
Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
+ // The owner of the buckets listed.
Owner *Owner `type:"structure"`
}
@@ -16049,10 +20703,26 @@ func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
type ListMultipartUploadsInput struct {
_ struct{} `locationName:"ListMultipartUploadsRequest" type:"structure"`
+ // Name of the bucket to which the multipart upload was initiated.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// Character you use to group keys.
+ //
+ // All keys that contain the same string between the prefix, if specified, and
+ // the first occurrence of the delimiter after the prefix are grouped under
+ // a single result element, CommonPrefixes. If you don't specify the prefix
+ // parameter, then the substring starts at the beginning of the key. The keys
+ // that are grouped under CommonPrefixes result element are not returned elsewhere
+ // in the response.
Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
// Requests Amazon S3 to encode the object keys in the response and specifies
@@ -16065,6 +20735,13 @@ type ListMultipartUploadsInput struct {
// Together with upload-id-marker, this parameter specifies the multipart upload
// after which listing should begin.
+ //
+ // If upload-id-marker is not specified, only the keys lexicographically greater
+ // than the specified key-marker will be included in the list.
+ //
+ // If upload-id-marker is specified, any multipart uploads for a key equal to
+ // the key-marker might also be included, provided those multipart uploads have
+ // upload IDs lexicographically greater than the specified upload-id-marker.
KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
// Sets the maximum number of multipart uploads, from 1 to 1,000, to return
@@ -16073,12 +20750,16 @@ type ListMultipartUploadsInput struct {
MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
// Lists in-progress uploads only for those keys that begin with the specified
- // prefix.
+ // prefix. You can use prefixes to separate a bucket into different grouping
+ // of keys. (You can think of using prefix to make groups in the same way you'd
+ // use a folder in a file system.)
Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
// Together with key-marker, specifies the multipart upload after which listing
// should begin. If key-marker is not specified, the upload-id-marker parameter
- // is ignored.
+ // is ignored. Otherwise, any multipart uploads for a key equal to the key-marker
+ // might be included in the list only if they have an upload ID lexicographically
+ // greater than the specified upload-id-marker.
UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
}
@@ -16157,17 +20838,42 @@ func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUp
return s
}
+func (s *ListMultipartUploadsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *ListMultipartUploadsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type ListMultipartUploadsOutput struct {
_ struct{} `type:"structure"`
// Name of the bucket to which the multipart upload was initiated.
Bucket *string `type:"string"`
+ // If you specify a delimiter in the request, then the result returns each distinct
+ // key prefix containing the delimiter in a CommonPrefixes element. The distinct
+ // key prefixes are returned in the Prefix child element.
CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
+ // Contains the delimiter you specified in the request. If you don't specify
+ // a delimiter in your request, this element is absent from the response.
Delimiter *string `type:"string"`
// Encoding type used by Amazon S3 to encode object keys in the response.
+ //
+ // If you specify encoding-type request parameter, Amazon S3 includes this element
+ // in the response, and returns encoded key name values in the following response
+ // elements:
+ //
+ // Delimiter, KeyMarker, Prefix, NextKeyMarker, Key.
EncodingType *string `type:"string" enum:"EncodingType"`
// Indicates whether the returned list of multipart uploads is truncated. A
@@ -16198,6 +20904,8 @@ type ListMultipartUploadsOutput struct {
// Upload ID after which listing began.
UploadIdMarker *string `type:"string"`
+ // Container for elements related to a particular multipart upload. A response
+ // can contain zero or more Upload elements.
Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
}
@@ -16293,10 +21001,23 @@ func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMulti
type ListObjectVersionsInput struct {
_ struct{} `locationName:"ListObjectVersionsRequest" type:"structure"`
+ // The bucket name that contains the objects.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- // A delimiter is a character you use to group keys.
+ // A delimiter is a character that you specify to group keys. All keys that
+ // contain the same string between the prefix and the first occurrence of the
+ // delimiter are grouped under a single result element in CommonPrefixes. These
+ // groups are counted as one result against the max-keys limitation. These keys
+ // are not returned elsewhere in the response.
Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
// Requests Amazon S3 to encode the object keys in the response and specifies
@@ -16310,11 +21031,19 @@ type ListObjectVersionsInput struct {
// Specifies the key to start with when listing objects in a bucket.
KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
- // Sets the maximum number of keys returned in the response. The response might
- // contain fewer keys but will never contain more.
+ // Sets the maximum number of keys returned in the response. By default the
+ // API returns up to 1,000 key names. The response might contain fewer keys
+ // but will never contain more. If additional keys satisfy the search criteria,
+ // but were not returned because max-keys was exceeded, the response contains
+ // true. To return the additional keys, see key-marker
+ // and version-id-marker.
MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
- // Limits the response to keys that begin with the specified prefix.
+ // Use this parameter to select only those keys that begin with the specified
+ // prefix. You can use prefixes to separate a bucket into different groupings
+ // of keys. (You can think of using prefix to make groups in the same way you'd
+ // use a folder in a file system.) You can use prefix with delimiter to roll
+ // up numerous objects into a single result under CommonPrefixes.
Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
// Specifies the object version you want to start listing from.
@@ -16396,42 +21125,81 @@ func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersio
return s
}
+func (s *ListObjectVersionsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *ListObjectVersionsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type ListObjectVersionsOutput struct {
_ struct{} `type:"structure"`
+ // All of the keys rolled up into a common prefix count as a single return when
+ // calculating the number of returns.
CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
+ // Container for an object that is a delete marker.
DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
+ // The delimiter grouping the included keys. A delimiter is a character that
+ // you specify to group keys. All keys that contain the same string between
+ // the prefix and the first occurrence of the delimiter are grouped under a
+ // single result element in CommonPrefixes. These groups are counted as one
+ // result against the max-keys limitation. These keys are not returned elsewhere
+ // in the response.
Delimiter *string `type:"string"`
- // Encoding type used by Amazon S3 to encode object keys in the response.
+ // Encoding type used by Amazon S3 to encode object key names in the XML response.
+ //
+ // If you specify encoding-type request parameter, Amazon S3 includes this element
+ // in the response, and returns encoded key name values in the following response
+ // elements:
+ //
+ // KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.
EncodingType *string `type:"string" enum:"EncodingType"`
- // A flag that indicates whether or not Amazon S3 returned all of the results
- // that satisfied the search criteria. If your results were truncated, you can
- // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
+ // A flag that indicates whether Amazon S3 returned all of the results that
+ // satisfied the search criteria. If your results were truncated, you can make
+ // a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
// response parameters as a starting place in another request to return the
// rest of the results.
IsTruncated *bool `type:"boolean"`
- // Marks the last Key returned in a truncated response.
+ // Marks the last key returned in a truncated response.
KeyMarker *string `type:"string"`
+ // Specifies the maximum number of objects to return.
MaxKeys *int64 `type:"integer"`
+ // Bucket name.
Name *string `type:"string"`
- // Use this value for the key marker request parameter in a subsequent request.
+ // When the number of responses exceeds the value of MaxKeys, NextKeyMarker
+ // specifies the first key not returned that satisfies the search criteria.
+ // Use this value for the key-marker request parameter in a subsequent request.
NextKeyMarker *string `type:"string"`
- // Use this value for the next version id marker parameter in a subsequent request.
+ // When the number of responses exceeds the value of MaxKeys, NextVersionIdMarker
+ // specifies the first object version not returned that satisfies the search
+ // criteria. Use this value for the version-id-marker request parameter in a
+ // subsequent request.
NextVersionIdMarker *string `type:"string"`
+ // Selects objects that start with the value supplied by this parameter.
Prefix *string `type:"string"`
+ // Marks the last version of the key returned in a truncated response.
VersionIdMarker *string `type:"string"`
+ // Container for version information.
Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
}
@@ -16526,6 +21294,8 @@ func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVe
type ListObjectsInput struct {
_ struct{} `locationName:"ListObjectsRequest" type:"structure"`
+ // The name of the bucket containing the objects.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -16543,8 +21313,9 @@ type ListObjectsInput struct {
// Specifies the key to start with when listing objects in a bucket.
Marker *string `location:"querystring" locationName:"marker" type:"string"`
- // Sets the maximum number of keys returned in the response. The response might
- // contain fewer keys but will never contain more.
+ // Sets the maximum number of keys returned in the response. By default the
+ // API returns up to 1,000 key names. The response might contain fewer keys
+ // but will never contain more.
MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
// Limits the response to keys that begin with the specified prefix.
@@ -16631,26 +21402,65 @@ func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
return s
}
+func (s *ListObjectsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *ListObjectsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type ListObjectsOutput struct {
_ struct{} `type:"structure"`
+ // All of the keys rolled up in a common prefix count as a single return when
+ // calculating the number of returns.
+ //
+ // A response can contain CommonPrefixes only if you specify a delimiter.
+ //
+ // CommonPrefixes contains all (if there are any) keys between Prefix and the
+ // next occurrence of the string specified by the delimiter.
+ //
+ // CommonPrefixes lists keys that act like subdirectories in the directory specified
+ // by Prefix.
+ //
+ // For example, if the prefix is notes/ and the delimiter is a slash (/) as
+ // in notes/summer/july, the common prefix is notes/summer/. All of the keys
+ // that roll up into a common prefix count as a single return when calculating
+ // the number of returns.
CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
+ // Metadata about each object returned.
Contents []*Object `type:"list" flattened:"true"`
+ // Causes keys that contain the same string between the prefix and the first
+ // occurrence of the delimiter to be rolled up into a single result element
+ // in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere
+ // in the response. Each rolled-up result counts as only one return against
+ // the MaxKeys value.
Delimiter *string `type:"string"`
// Encoding type used by Amazon S3 to encode object keys in the response.
EncodingType *string `type:"string" enum:"EncodingType"`
- // A flag that indicates whether or not Amazon S3 returned all of the results
- // that satisfied the search criteria.
+ // A flag that indicates whether Amazon S3 returned all of the results that
+ // satisfied the search criteria.
IsTruncated *bool `type:"boolean"`
+ // Indicates where in the bucket listing begins. Marker is included in the response
+ // if it was sent with the request.
Marker *string `type:"string"`
+ // The maximum number of keys returned in the response body.
MaxKeys *int64 `type:"integer"`
+ // Bucket name.
Name *string `type:"string"`
// When response is truncated (the IsTruncated element value in the response
@@ -16662,6 +21472,7 @@ type ListObjectsOutput struct {
// subsequent request to get the next set of object keys.
NextMarker *string `type:"string"`
+ // Keys that begin with the indicated prefix.
Prefix *string `type:"string"`
}
@@ -16738,14 +21549,21 @@ func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
type ListObjectsV2Input struct {
_ struct{} `locationName:"ListObjectsV2Request" type:"structure"`
- // Name of the bucket to list.
+ // Bucket name to list.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
//
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// ContinuationToken indicates Amazon S3 that the list is being continued on
// this bucket with a token. ContinuationToken is obfuscated and is not a real
- // key
+ // key.
ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
// A delimiter is a character you use to group keys.
@@ -16756,11 +21574,12 @@ type ListObjectsV2Input struct {
// The owner field is not present in listV2 by default, if you want to return
// owner field with each key in the result then set the fetch owner field to
- // true
+ // true.
FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
- // Sets the maximum number of keys returned in the response. The response might
- // contain fewer keys but will never contain more.
+ // Sets the maximum number of keys returned in the response. By default the
+ // API returns up to 1,000 key names. The response might contain fewer keys
+ // but will never contain more.
MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
// Limits the response to keys that begin with the specified prefix.
@@ -16772,7 +21591,7 @@ type ListObjectsV2Input struct {
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
- // listing after this specified key. StartAfter can be any key in the bucket
+ // listing after this specified key. StartAfter can be any key in the bucket.
StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
}
@@ -16863,29 +21682,65 @@ func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
return s
}
+func (s *ListObjectsV2Input) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *ListObjectsV2Input) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type ListObjectsV2Output struct {
_ struct{} `type:"structure"`
+ // All of the keys rolled up into a common prefix count as a single return when
+ // calculating the number of returns.
+ //
+ // A response can contain CommonPrefixes only if you specify a delimiter.
+ //
// CommonPrefixes contains all (if there are any) keys between Prefix and the
- // next occurrence of the string specified by delimiter
+ // next occurrence of the string specified by a delimiter.
+ //
+ // CommonPrefixes lists keys that act like subdirectories in the directory specified
+ // by Prefix.
+ //
+ // For example, if the prefix is notes/ and the delimiter is a slash (/) as
+ // in notes/summer/july, the common prefix is notes/summer/. All of the keys
+ // that roll up into a common prefix count as a single return when calculating
+ // the number of returns.
CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
// Metadata about each object returned.
Contents []*Object `type:"list" flattened:"true"`
- // ContinuationToken indicates Amazon S3 that the list is being continued on
- // this bucket with a token. ContinuationToken is obfuscated and is not a real
- // key
+ // If ContinuationToken was sent with the request, it is included in the response.
ContinuationToken *string `type:"string"`
- // A delimiter is a character you use to group keys.
+ // Causes keys that contain the same string between the prefix and the first
+ // occurrence of the delimiter to be rolled up into a single result element
+ // in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere
+ // in the response. Each rolled-up result counts as only one return against
+ // the MaxKeys value.
Delimiter *string `type:"string"`
- // Encoding type used by Amazon S3 to encode object keys in the response.
+ // Encoding type used by Amazon S3 to encode object key names in the XML response.
+ //
+ // If you specify the encoding-type request parameter, Amazon S3 includes this
+ // element in the response, and returns encoded key name values in the following
+ // response elements:
+ //
+ // Delimiter, Prefix, Key, and StartAfter.
EncodingType *string `type:"string" enum:"EncodingType"`
- // A flag that indicates whether or not Amazon S3 returned all of the results
- // that satisfied the search criteria.
+ // Set to false if all of the results were returned. Set to true if more keys
+ // are available to return. If the number of results exceeds that specified
+ // by MaxKeys, all of the results might not be returned.
IsTruncated *bool `type:"boolean"`
// KeyCount is the number of keys returned with this request. KeyCount will
@@ -16893,24 +21748,31 @@ type ListObjectsV2Output struct {
// result will include less than equals 50 keys
KeyCount *int64 `type:"integer"`
- // Sets the maximum number of keys returned in the response. The response might
- // contain fewer keys but will never contain more.
+ // Sets the maximum number of keys returned in the response. By default the
+ // API returns up to 1,000 key names. The response might contain fewer keys
+ // but will never contain more.
MaxKeys *int64 `type:"integer"`
- // Name of the bucket to list.
+ // Bucket name.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
Name *string `type:"string"`
- // NextContinuationToken is sent when isTruncated is true which means there
+ // NextContinuationToken is sent when isTruncated is true, which means there
// are more keys in the bucket that can be listed. The next list requests to
// Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
// is obfuscated and is not a real key
NextContinuationToken *string `type:"string"`
- // Limits the response to keys that begin with the specified prefix.
+ // Keys that begin with the indicated prefix.
Prefix *string `type:"string"`
- // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
- // listing after this specified key. StartAfter can be any key in the bucket
+ // If StartAfter was sent with the request, it is included in the response.
StartAfter *string `type:"string"`
}
@@ -16999,9 +21861,20 @@ func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
type ListPartsInput struct {
_ struct{} `locationName:"ListPartsRequest" type:"structure"`
+ // Name of the bucket to which the parts are being uploaded.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Object key for which the multipart upload was initiated.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
@@ -17012,10 +21885,11 @@ type ListPartsInput struct {
// part numbers will be listed.
PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// Upload ID identifying the multipart upload whose parts are being listed.
@@ -17102,23 +21976,51 @@ func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
return s
}
+func (s *ListPartsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *ListPartsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type ListPartsOutput struct {
_ struct{} `type:"structure"`
- // Date when multipart upload will become eligible for abort operation by lifecycle.
+ // If the bucket has a lifecycle rule configured with an action to abort incomplete
+ // multipart uploads and the prefix in the lifecycle rule matches the object
+ // name in the request, then the response includes this header indicating when
+ // the initiated multipart upload will become eligible for abort operation.
+ // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
+ // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
+ //
+ // The response will also include the x-amz-abort-rule-id header that will provide
+ // the ID of the lifecycle configuration rule that defines this action.
AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
- // Id of the lifecycle rule that makes a multipart upload eligible for abort
- // operation.
+ // This header is returned along with the x-amz-abort-date header. It identifies
+ // applicable lifecycle configuration rule that defines the action to abort
+ // incomplete multipart uploads.
AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
// Name of the bucket to which the multipart upload was initiated.
Bucket *string `type:"string"`
- // Identifies who initiated the multipart upload.
+ // Container element that identifies who initiated the multipart upload. If
+ // the initiator is an AWS account, this element provides the same information
+ // as the Owner element. If the initiator is an IAM User, this element provides
+ // the user ARN and display name.
Initiator *Initiator `type:"structure"`
- // Indicates whether the returned list of parts is truncated.
+ // Indicates whether the returned list of parts is truncated. A true value indicates
+ // that the list was truncated. A list can be truncated if the number of parts
+ // exceeds the limit returned in the MaxParts element.
IsTruncated *bool `type:"boolean"`
// Object key for which the multipart upload was initiated.
@@ -17132,18 +22034,26 @@ type ListPartsOutput struct {
// in a subsequent request.
NextPartNumberMarker *int64 `type:"integer"`
+ // Container element that identifies the object owner, after the object is created.
+ // If multipart upload is initiated by an IAM user, this element provides the
+ // parent account ID and display name.
Owner *Owner `type:"structure"`
- // Part number after which listing begins.
+ // When a list is truncated, this element specifies the last part in the list,
+ // as well as the value to use for the part-number-marker request parameter
+ // in a subsequent request.
PartNumberMarker *int64 `type:"integer"`
+ // Container for elements related to a particular part. A response can contain
+ // zero or more Part elements.
Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
// If present, indicates that the requester was successfully charged for the
// request.
RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
- // The class of storage used to store the object.
+ // Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded
+ // object.
StorageClass *string `type:"string" enum:"StorageClass"`
// Upload ID identifying the multipart upload whose parts are being listed.
@@ -17251,7 +22161,8 @@ func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
return s
}
-// Describes an S3 location that will receive the results of the restore request.
+// Describes an Amazon S3 location that will receive the results of the restore
+// request.
type Location struct {
_ struct{} `type:"structure"`
@@ -17266,8 +22177,7 @@ type Location struct {
// The canned ACL to apply to the restore results.
CannedACL *string `type:"string" enum:"ObjectCannedACL"`
- // Describes the server-side encryption that will be applied to the restore
- // results.
+ // Contains the type of server-side encryption used.
Encryption *Encryption `type:"structure"`
// The prefix that is prepended to the restore results for this request.
@@ -17389,13 +22299,14 @@ type LoggingEnabled struct {
// Specifies the bucket where you want Amazon S3 to store server access logs.
// You can have your logs delivered to any bucket that you own, including the
// same bucket that is being logged. You can also configure multiple buckets
- // to deliver their logs to the same target bucket. In this case you should
+ // to deliver their logs to the same target bucket. In this case, you should
// choose a different TargetPrefix for each source bucket so that the delivered
// log files can be distinguished by key.
//
// TargetBucket is a required field
TargetBucket *string `type:"string" required:"true"`
+ // Container for granting information.
TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
// A prefix for all log object keys. If you store log files from multiple Amazon
@@ -17464,8 +22375,10 @@ func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
type MetadataEntry struct {
_ struct{} `type:"structure"`
+ // Name of the Object.
Name *string `type:"string"`
+ // Value of the Object.
Value *string `type:"string"`
}
@@ -17491,6 +22404,65 @@ func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
return s
}
+// A container specifying replication metrics-related settings enabling metrics
+// and Amazon S3 events for S3 Replication Time Control (S3 RTC). Must be specified
+// together with a ReplicationTime block.
+type Metrics struct {
+ _ struct{} `type:"structure"`
+
+ // A container specifying the time threshold for emitting the s3:Replication:OperationMissedThreshold
+ // event.
+ //
+ // EventThreshold is a required field
+ EventThreshold *ReplicationTimeValue `type:"structure" required:"true"`
+
+ // Specifies whether the replication metrics are enabled.
+ //
+ // Status is a required field
+ Status *string `type:"string" required:"true" enum:"MetricsStatus"`
+}
+
+// String returns the string representation
+func (s Metrics) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Metrics) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *Metrics) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "Metrics"}
+ if s.EventThreshold == nil {
+ invalidParams.Add(request.NewErrParamRequired("EventThreshold"))
+ }
+ if s.Status == nil {
+ invalidParams.Add(request.NewErrParamRequired("Status"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetEventThreshold sets the EventThreshold field's value.
+func (s *Metrics) SetEventThreshold(v *ReplicationTimeValue) *Metrics {
+ s.EventThreshold = v
+ return s
+}
+
+// SetStatus sets the Status field's value.
+func (s *Metrics) SetStatus(v string) *Metrics {
+ s.Status = &v
+ return s
+}
+
+// A conjunction (logical AND) of predicates, which is used in evaluating a
+// metrics filter. The operator must have at least two predicates, and an object
+// must match all of the predicates in order for the filter to apply.
type MetricsAndOperator struct {
_ struct{} `type:"structure"`
@@ -17604,6 +22576,9 @@ func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
return s
}
+// Specifies a metrics configuration filter. The metrics configuration only
+// includes objects that meet the filter's criteria. A filter must be a prefix,
+// a tag, or a conjunction (MetricsAndOperator).
type MetricsFilter struct {
_ struct{} `type:"structure"`
@@ -17667,6 +22642,7 @@ func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
return s
}
+// Container for the MultipartUpload for the Amazon S3 object.
type MultipartUpload struct {
_ struct{} `type:"structure"`
@@ -17679,6 +22655,7 @@ type MultipartUpload struct {
// Key of the object for which the multipart upload was initiated.
Key *string `min:"1" type:"string"`
+ // Specifies the owner of the object that is part of the multipart upload.
Owner *Owner `type:"structure"`
// The class of storage used to store the object.
@@ -17778,8 +22755,8 @@ type NoncurrentVersionTransition struct {
// Specifies the number of days an object is noncurrent before Amazon S3 can
// perform the associated action. For information about the noncurrent days
- // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
+ // calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
// in the Amazon Simple Storage Service Developer Guide.
NoncurrentDays *int64 `type:"integer"`
@@ -17898,10 +22875,17 @@ func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfigurati
type NotificationConfigurationDeprecated struct {
_ struct{} `type:"structure"`
+ // Container for specifying the AWS Lambda notification configuration.
CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
+ // This data type is deprecated. This data type specifies the configuration
+ // for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue
+ // when Amazon S3 detects specified events.
QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
+ // This data type is deprecated. A container for specifying the configuration
+ // for publication of messages to an Amazon Simple Notification Service (Amazon
+ // SNS) topic when Amazon S3 detects specified events.
TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
}
@@ -17959,17 +22943,25 @@ func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConf
return s
}
+// An object consists of data and its descriptive metadata.
type Object struct {
_ struct{} `type:"structure"`
+ // The entity tag is an MD5 hash of the object. ETag reflects only changes to
+ // the contents of an object, not its metadata.
ETag *string `type:"string"`
+ // The name that you assign to an object. You use the object key to retrieve
+ // the object.
Key *string `min:"1" type:"string"`
+ // The date the Object was Last Modified
LastModified *time.Time `type:"timestamp"`
+ // The owner of the object
Owner *Owner `type:"structure"`
+ // Size in bytes of the object
Size *int64 `type:"integer"`
// The class of storage used to store the object.
@@ -18022,6 +23014,7 @@ func (s *Object) SetStorageClass(v string) *Object {
return s
}
+// Object Identifier is unique value to identify objects.
type ObjectIdentifier struct {
_ struct{} `type:"structure"`
@@ -18072,14 +23065,14 @@ func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
return s
}
-// The container element for object lock configuration parameters.
+// The container element for Object Lock configuration parameters.
type ObjectLockConfiguration struct {
_ struct{} `type:"structure"`
- // Indicates whether this bucket has an object lock configuration enabled.
+ // Indicates whether this bucket has an Object Lock configuration enabled.
ObjectLockEnabled *string `type:"string" enum:"ObjectLockEnabled"`
- // The object lock rule in place for the specified object.
+ // The Object Lock rule in place for the specified object.
Rule *ObjectLockRule `type:"structure"`
}
@@ -18136,7 +23129,7 @@ type ObjectLockRetention struct {
// Indicates the Retention mode for the specified object.
Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
- // The date on which this object lock retention expires.
+ // The date on which this Object Lock Retention will expire.
RetainUntilDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
}
@@ -18162,7 +23155,7 @@ func (s *ObjectLockRetention) SetRetainUntilDate(v time.Time) *ObjectLockRetenti
return s
}
-// The container element for an object lock rule.
+// The container element for an Object Lock rule.
type ObjectLockRule struct {
_ struct{} `type:"structure"`
@@ -18187,9 +23180,11 @@ func (s *ObjectLockRule) SetDefaultRetention(v *DefaultRetention) *ObjectLockRul
return s
}
+// The version of an object.
type ObjectVersion struct {
_ struct{} `type:"structure"`
+ // The entity tag is an MD5 hash of that version of the object.
ETag *string `type:"string"`
// Specifies whether the object is (true) or is not (false) the latest version
@@ -18202,6 +23197,7 @@ type ObjectVersion struct {
// Date and time the object was last modified.
LastModified *time.Time `type:"timestamp"`
+ // Specifies the owner of the object.
Owner *Owner `type:"structure"`
// Size in bytes of the object.
@@ -18344,11 +23340,14 @@ func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization {
return s
}
+// Container for the owner's display name and ID.
type Owner struct {
_ struct{} `type:"structure"`
+ // Container for the display name of the owner.
DisplayName *string `type:"string"`
+ // Container for the ID of the owner.
ID *string `type:"string"`
}
@@ -18374,6 +23373,7 @@ func (s *Owner) SetID(v string) *Owner {
return s
}
+// Container for Parquet.
type ParquetInput struct {
_ struct{} `type:"structure"`
}
@@ -18388,6 +23388,7 @@ func (s ParquetInput) GoString() string {
return s.String()
}
+// Container for elements related to a part.
type Part struct {
_ struct{} `type:"structure"`
@@ -18464,6 +23465,7 @@ func (s *PolicyStatus) SetIsPublic(v bool) *PolicyStatus {
return s
}
+// This data type contains information about progress of an operation.
type Progress struct {
_ struct{} `type:"structure"`
@@ -18505,6 +23507,7 @@ func (s *Progress) SetBytesScanned(v int64) *Progress {
return s
}
+// This data type contains information about the progress event of an operation.
type ProgressEvent struct {
_ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"`
@@ -18545,7 +23548,21 @@ func (s *ProgressEvent) UnmarshalEvent(
return nil
}
-// Specifies the Block Public Access configuration for an Amazon S3 bucket.
+func (s *ProgressEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
+ msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
+ var buf bytes.Buffer
+ if err = pm.MarshalPayload(&buf, s); err != nil {
+ return eventstream.Message{}, err
+ }
+ msg.Payload = buf.Bytes()
+ return msg, err
+}
+
+// The PublicAccessBlock configuration that you want to apply to this Amazon
+// S3 bucket. You can enable the configuration options in any combination. For
+// more information about when Amazon S3 considers a bucket or object public,
+// see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
+// in the Amazon Simple Storage Service Developer Guide.
type PublicAccessBlockConfiguration struct {
_ struct{} `type:"structure"`
@@ -18558,6 +23575,8 @@ type PublicAccessBlockConfiguration struct {
//
// * PUT Object calls fail if the request includes a public ACL.
//
+ // * PUT Bucket calls fail if the request includes a public ACL.
+ //
// Enabling this setting doesn't affect existing policies or ACLs.
BlockPublicAcls *bool `locationName:"BlockPublicAcls" type:"boolean"`
@@ -18624,7 +23643,7 @@ func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *Publi
type PutBucketAccelerateConfigurationInput struct {
_ struct{} `locationName:"PutBucketAccelerateConfigurationRequest" type:"structure" payload:"AccelerateConfiguration"`
- // Specifies the Accelerate Configuration you want to set for the bucket.
+ // Container for setting the transfer acceleration state.
//
// AccelerateConfiguration is a required field
AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
@@ -18683,6 +23702,20 @@ func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
return *s.Bucket
}
+func (s *PutBucketAccelerateConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketAccelerateConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketAccelerateConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -18706,6 +23739,8 @@ type PutBucketAclInput struct {
// Contains the elements that set the ACL permissions for an object per grantee.
AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
+ // The bucket to which to apply the ACL.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -18812,6 +23847,20 @@ func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
return s
}
+func (s *PutBucketAclInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketAclInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketAclOutput struct {
_ struct{} `type:"structure"`
}
@@ -18907,6 +23956,20 @@ func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyti
return s
}
+func (s *PutBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketAnalyticsConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketAnalyticsConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -18924,6 +23987,8 @@ func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
type PutBucketCorsInput struct {
_ struct{} `locationName:"PutBucketCorsRequest" type:"structure" payload:"CORSConfiguration"`
+ // Specifies the bucket impacted by the corsconfiguration.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -18989,6 +24054,20 @@ func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBuck
return s
}
+func (s *PutBucketCorsInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketCorsInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketCorsOutput struct {
_ struct{} `type:"structure"`
}
@@ -19007,9 +24086,9 @@ type PutBucketEncryptionInput struct {
_ struct{} `locationName:"PutBucketEncryptionRequest" type:"structure" payload:"ServerSideEncryptionConfiguration"`
// Specifies default encryption for a bucket using server-side encryption with
- // Amazon S3-managed keys (SSE-S3) or AWS KMS-managed keys (SSE-KMS). For information
- // about the Amazon S3 default encryption feature, see Amazon S3 Default Bucket
- // Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
+ // Amazon S3-managed keys (SSE-S3) or customer master keys stored in AWS KMS
+ // (SSE-KMS). For information about the Amazon S3 default encryption feature,
+ // see Amazon S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
// in the Amazon Simple Storage Service Developer Guide.
//
// Bucket is a required field
@@ -19074,6 +24153,20 @@ func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *Serve
return s
}
+func (s *PutBucketEncryptionInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketEncryptionInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketEncryptionOutput struct {
_ struct{} `type:"structure"`
}
@@ -19169,6 +24262,20 @@ func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *Inve
return s
}
+func (s *PutBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketInventoryConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketInventoryConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -19186,12 +24293,12 @@ func (s PutBucketInventoryConfigurationOutput) GoString() string {
type PutBucketLifecycleConfigurationInput struct {
_ struct{} `locationName:"PutBucketLifecycleConfigurationRequest" type:"structure" payload:"LifecycleConfiguration"`
+ // The name of the bucket for which to set the configuration.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- // Specifies the lifecycle configuration for objects in an Amazon S3 bucket.
- // For more information, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
- // in the Amazon Simple Storage Service Developer Guide.
+ // Container for lifecycle rules. You can add as many as 1,000 rules.
LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
@@ -19245,6 +24352,20 @@ func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *Buck
return s
}
+func (s *PutBucketLifecycleConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketLifecycleConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketLifecycleConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -19265,6 +24386,7 @@ type PutBucketLifecycleInput struct {
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Container for lifecycle rules. You can add as many as 1000 rules.
LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
@@ -19318,6 +24440,20 @@ func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfigur
return s
}
+func (s *PutBucketLifecycleInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketLifecycleInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketLifecycleOutput struct {
_ struct{} `type:"structure"`
}
@@ -19335,9 +24471,13 @@ func (s PutBucketLifecycleOutput) GoString() string {
type PutBucketLoggingInput struct {
_ struct{} `locationName:"PutBucketLoggingRequest" type:"structure" payload:"BucketLoggingStatus"`
+ // The name of the bucket for which to set the logging parameters.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Container for logging status information.
+ //
// BucketLoggingStatus is a required field
BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
@@ -19395,6 +24535,20 @@ func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *
return s
}
+func (s *PutBucketLoggingInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketLoggingInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketLoggingOutput struct {
_ struct{} `type:"structure"`
}
@@ -19490,6 +24644,20 @@ func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsC
return s
}
+func (s *PutBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketMetricsConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketMetricsConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -19507,6 +24675,8 @@ func (s PutBucketMetricsConfigurationOutput) GoString() string {
type PutBucketNotificationConfigurationInput struct {
_ struct{} `locationName:"PutBucketNotificationConfigurationRequest" type:"structure" payload:"NotificationConfiguration"`
+ // The name of the bucket.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -19570,6 +24740,20 @@ func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v
return s
}
+func (s *PutBucketNotificationConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketNotificationConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketNotificationConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -19587,9 +24771,13 @@ func (s PutBucketNotificationConfigurationOutput) GoString() string {
type PutBucketNotificationInput struct {
_ struct{} `locationName:"PutBucketNotificationRequest" type:"structure" payload:"NotificationConfiguration"`
+ // The name of the bucket.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // The container for the configuration.
+ //
// NotificationConfiguration is a required field
NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
@@ -19642,6 +24830,20 @@ func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *Notificatio
return s
}
+func (s *PutBucketNotificationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketNotificationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketNotificationOutput struct {
_ struct{} `type:"structure"`
}
@@ -19659,6 +24861,8 @@ func (s PutBucketNotificationOutput) GoString() string {
type PutBucketPolicyInput struct {
_ struct{} `locationName:"PutBucketPolicyRequest" type:"structure" payload:"Policy"`
+ // The name of the bucket.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -19726,6 +24930,20 @@ func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
return s
}
+func (s *PutBucketPolicyInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketPolicyInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketPolicyOutput struct {
_ struct{} `type:"structure"`
}
@@ -19743,6 +24961,8 @@ func (s PutBucketPolicyOutput) GoString() string {
type PutBucketReplicationInput struct {
_ struct{} `locationName:"PutBucketReplicationRequest" type:"structure" payload:"ReplicationConfiguration"`
+ // The name of the bucket
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -19752,7 +24972,6 @@ type PutBucketReplicationInput struct {
// ReplicationConfiguration is a required field
ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
- // A token that allows Amazon S3 object lock to be enabled for an existing bucket.
Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"`
}
@@ -19815,6 +25034,20 @@ func (s *PutBucketReplicationInput) SetToken(v string) *PutBucketReplicationInpu
return s
}
+func (s *PutBucketReplicationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketReplicationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketReplicationOutput struct {
_ struct{} `type:"structure"`
}
@@ -19832,9 +25065,13 @@ func (s PutBucketReplicationOutput) GoString() string {
type PutBucketRequestPaymentInput struct {
_ struct{} `locationName:"PutBucketRequestPaymentRequest" type:"structure" payload:"RequestPaymentConfiguration"`
+ // The bucket name.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Container for Payer.
+ //
// RequestPaymentConfiguration is a required field
RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
@@ -19892,6 +25129,20 @@ func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *Request
return s
}
+func (s *PutBucketRequestPaymentInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketRequestPaymentInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketRequestPaymentOutput struct {
_ struct{} `type:"structure"`
}
@@ -19909,9 +25160,13 @@ func (s PutBucketRequestPaymentOutput) GoString() string {
type PutBucketTaggingInput struct {
_ struct{} `locationName:"PutBucketTaggingRequest" type:"structure" payload:"Tagging"`
+ // The bucket name.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Container for the TagSet and Tag elements.
+ //
// Tagging is a required field
Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
@@ -19969,6 +25224,20 @@ func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
return s
}
+func (s *PutBucketTaggingInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketTaggingInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketTaggingOutput struct {
_ struct{} `type:"structure"`
}
@@ -19986,6 +25255,8 @@ func (s PutBucketTaggingOutput) GoString() string {
type PutBucketVersioningInput struct {
_ struct{} `locationName:"PutBucketVersioningRequest" type:"structure" payload:"VersioningConfiguration"`
+ // The bucket name.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -19993,9 +25264,7 @@ type PutBucketVersioningInput struct {
// and the value that is displayed on your authentication device.
MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
- // Describes the versioning state of an Amazon S3 bucket. For more information,
- // see PUT Bucket versioning (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html)
- // in the Amazon Simple Storage Service API Reference.
+ // Container for setting the versioning state.
//
// VersioningConfiguration is a required field
VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
@@ -20055,6 +25324,20 @@ func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfi
return s
}
+func (s *PutBucketVersioningInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketVersioningInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketVersioningOutput struct {
_ struct{} `type:"structure"`
}
@@ -20072,10 +25355,12 @@ func (s PutBucketVersioningOutput) GoString() string {
type PutBucketWebsiteInput struct {
_ struct{} `locationName:"PutBucketWebsiteRequest" type:"structure" payload:"WebsiteConfiguration"`
+ // The bucket name.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- // Specifies website configuration parameters for an Amazon S3 bucket.
+ // Container for the request.
//
// WebsiteConfiguration is a required field
WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
@@ -20134,6 +25419,20 @@ func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration)
return s
}
+func (s *PutBucketWebsiteInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutBucketWebsiteInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutBucketWebsiteOutput struct {
_ struct{} `type:"structure"`
}
@@ -20151,12 +25450,23 @@ func (s PutBucketWebsiteOutput) GoString() string {
type PutObjectAclInput struct {
_ struct{} `locationName:"PutObjectAclRequest" type:"structure" payload:"AccessControlPolicy"`
- // The canned ACL to apply to the object.
+ // The canned ACL to apply to the object. For more information, see Canned ACL
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
// Contains the elements that set the ACL permissions for an object per grantee.
AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
+ // The bucket name that contains the object to which you want to attach the
+ // ACL.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -20176,13 +25486,16 @@ type PutObjectAclInput struct {
// Allows grantee to write the ACL for the applicable bucket.
GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
+ // Key for which the PUT operation was initiated.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// VersionId used to reference a specific version of the object.
@@ -20299,6 +25612,20 @@ func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
return s
}
+func (s *PutObjectAclInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutObjectAclInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutObjectAclOutput struct {
_ struct{} `type:"structure"`
@@ -20326,44 +25653,62 @@ func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
type PutObjectInput struct {
_ struct{} `locationName:"PutObjectRequest" type:"structure" payload:"Body"`
- // The canned ACL to apply to the object.
+ // The canned ACL to apply to the object. For more information, see Canned ACL
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
// Object data.
Body io.ReadSeeker `type:"blob"`
- // Name of the bucket to which the PUT operation was initiated.
+ // Bucket name to which the PUT operation was initiated.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
//
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- // Specifies caching behavior along the request/reply chain.
+ // Can be used to specify caching behavior along the request/reply chain. For
+ // more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
+ // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9).
CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
- // Specifies presentational information for the object.
+ // Specifies presentational information for the object. For more information,
+ // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1).
ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
// Specifies what content encodings have been applied to the object and thus
// what decoding mechanisms must be applied to obtain the media-type referenced
- // by the Content-Type header field.
+ // by the Content-Type header field. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
+ // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11).
ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
// The language the content is in.
ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
// Size of the body in bytes. This parameter is useful when the size of the
- // body cannot be determined automatically.
+ // body cannot be determined automatically. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
+ // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13).
ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
- // The base64-encoded 128-bit MD5 digest of the part data. This parameter is
- // auto-populated when using the command from the CLI. This parameted is required
- // if object lock parameters are specified.
+ // The base64-encoded 128-bit MD5 digest of the message (without the headers)
+ // according to RFC 1864. This header can be used as a message integrity check
+ // to verify that the data is the same data that was originally sent. Although
+ // it is optional, we recommend using the Content-MD5 mechanism as an end-to-end
+ // integrity check. For more information about REST request authentication,
+ // see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).
ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
- // A standard MIME type describing the format of the object data.
+ // A standard MIME type describing the format of the contents. For more information,
+ // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17).
ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
- // The date and time at which the object is no longer cacheable.
+ // The date and time at which the object is no longer cacheable. For more information,
+ // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21).
Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
// Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
@@ -20386,34 +25731,37 @@ type PutObjectInput struct {
// A map of metadata to store with the object in S3.
Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
- // The Legal Hold status that you want to apply to the specified object.
+ // Specifies whether a legal hold will be applied to this object. For more information
+ // about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
- // The object lock mode that you want to apply to this object.
+ // The Object Lock mode that you want to apply to this object.
ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
- // The date and time when you want this object's object lock to expire.
+ // The date and time when you want this object's Object Lock to expire.
ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
// data. This value is used to store the object and then it is discarded; Amazon
- // does not store the encryption key. The key must be appropriate for use with
- // the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
+ // S3 does not store the encryption key. The key must be appropriate for use
+ // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
// header.
SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure the encryption
- // key was transmitted without error.
+ // Amazon S3 uses this header for a message integrity check to ensure that the
+ // encryption key was transmitted without error.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
// Specifies the AWS KMS Encryption Context to use for object encryption. The
@@ -20421,17 +25769,24 @@ type PutObjectInput struct {
// encryption context key-value pairs.
SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
- // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
- // requests for an object protected by AWS KMS will fail if not made via SSL
- // or using SigV4. Documentation on configuring any of the officially supported
- // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
+ // If x-amz-server-side-encryption is present and has the value of aws:kms,
+ // this header specifies the ID of the AWS Key Management Service (AWS KMS)
+ // symmetrical customer managed customer master key (CMK) that was used for
+ // the object.
+ //
+ // If the value of x-amz-server-side-encryption is aws:kms, this header specifies
+ // the ID of the symmetric customer managed AWS KMS CMK that will be used for
+ // the object. If you specify x-amz-server-side-encryption:aws:kms, but do not
+ // providex-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the AWS
+ // managed CMK in AWS to protect the data.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // The server-side encryption algorithm used when storing this object in Amazon
+ // S3 (for example, AES256, aws:kms).
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
- // The type of storage to use for the object. Defaults to 'STANDARD'.
+ // If you don't specify, S3 Standard is the default storage class. Amazon S3
+ // supports other storage classes.
StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
// The tag-set for the object. The tag-set must be encoded as URL Query parameters.
@@ -20440,7 +25795,22 @@ type PutObjectInput struct {
// If the bucket is configured as a website, redirects requests for this object
// to another object in the same bucket or to an external URL. Amazon S3 stores
- // the value of this header in the object metadata.
+ // the value of this header in the object metadata. For information about object
+ // metadata, see Object Key and Metadata (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html).
+ //
+ // In the following example, the request header sets the redirect to an object
+ // (anotherPage.html) in the same bucket:
+ //
+ // x-amz-website-redirect-location: /anotherPage.html
+ //
+ // In the following example, the request header sets the object redirect to
+ // another website:
+ //
+ // x-amz-website-redirect-location: http://www.example.com/
+ //
+ // For more information about website hosting in Amazon S3, see Hosting Websites
+ // on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)
+ // and How to Configure Website Page Redirects (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
}
@@ -20670,10 +26040,32 @@ func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
return s
}
+func (s *PutObjectInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutObjectInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutObjectLegalHoldInput struct {
_ struct{} `locationName:"PutObjectLegalHoldRequest" type:"structure" payload:"LegalHold"`
- // The bucket containing the object that you want to place a Legal Hold on.
+ // The bucket name containing the object that you want to place a Legal Hold
+ // on.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
//
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -20687,10 +26079,11 @@ type PutObjectLegalHoldInput struct {
// specified object.
LegalHold *ObjectLockLegalHold `locationName:"LegalHold" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// The version ID of the object that you want to place a Legal Hold on.
@@ -20766,6 +26159,20 @@ func (s *PutObjectLegalHoldInput) SetVersionId(v string) *PutObjectLegalHoldInpu
return s
}
+func (s *PutObjectLegalHoldInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutObjectLegalHoldInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutObjectLegalHoldOutput struct {
_ struct{} `type:"structure"`
@@ -20793,21 +26200,22 @@ func (s *PutObjectLegalHoldOutput) SetRequestCharged(v string) *PutObjectLegalHo
type PutObjectLockConfigurationInput struct {
_ struct{} `locationName:"PutObjectLockConfigurationRequest" type:"structure" payload:"ObjectLockConfiguration"`
- // The bucket whose object lock configuration you want to create or replace.
+ // The bucket whose Object Lock configuration you want to create or replace.
//
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- // The object lock configuration that you want to apply to the specified bucket.
+ // The Object Lock configuration that you want to apply to the specified bucket.
ObjectLockConfiguration *ObjectLockConfiguration `locationName:"ObjectLockConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // A token to allow Amazon S3 object lock to be enabled for an existing bucket.
+ // A token to allow Object Lock to be enabled for an existing bucket.
Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"`
}
@@ -20868,6 +26276,20 @@ func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfi
return s
}
+func (s *PutObjectLockConfigurationInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutObjectLockConfigurationInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutObjectLockConfigurationOutput struct {
_ struct{} `type:"structure"`
@@ -20898,8 +26320,10 @@ type PutObjectOutput struct {
// Entity tag for the uploaded object.
ETag *string `location:"header" locationName:"ETag" type:"string"`
- // If the object expiration is configured, this will contain the expiration
- // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
+ // If the expiration is configured for the object (see PutBucketLifecycleConfiguration),
+ // the response includes this header. It includes the expiry-date and rule-id
+ // key-value pairs that provide information about object expiration. The value
+ // of the rule-id is URL encoded.
Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
// If present, indicates that the requester was successfully charged for the
@@ -20912,7 +26336,7 @@ type PutObjectOutput struct {
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round trip message integrity
+ // the response will include this header to provide round-trip message integrity
// verification of the customer-provided encryption key.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
@@ -20921,12 +26345,16 @@ type PutObjectOutput struct {
// the encryption context key-value pairs.
SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
- // If present, specifies the ID of the AWS Key Management Service (KMS) master
- // encryption key that was used for the object.
+ // If x-amz-server-side-encryption is present and has the value of aws:kms,
+ // this header specifies the ID of the AWS Key Management Service (AWS KMS)
+ // symmetric customer managed customer master key (CMK) that was used for the
+ // object.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // If you specified server-side encryption either with an AWS KMS customer master
+ // key (CMK) or Amazon S3-managed encryption key in your PUT request, the response
+ // includes this header. It confirms the encryption algorithm that Amazon S3
+ // used to encrypt the object.
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// Version of the object.
@@ -21000,13 +26428,20 @@ func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
type PutObjectRetentionInput struct {
_ struct{} `locationName:"PutObjectRetentionRequest" type:"structure" payload:"Retention"`
- // The bucket that contains the object you want to apply this Object Retention
+ // The bucket name that contains the object you want to apply this Object Retention
// configuration to.
//
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- // Indicates whether this operation should bypass Governance-mode restrictions.j
+ // Indicates whether this operation should bypass Governance-mode restrictions.
BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
// The key name for the object that you want to apply this Object Retention
@@ -21015,10 +26450,11 @@ type PutObjectRetentionInput struct {
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// The container element for the Object Retention configuration.
@@ -21104,6 +26540,20 @@ func (s *PutObjectRetentionInput) SetVersionId(v string) *PutObjectRetentionInpu
return s
}
+func (s *PutObjectRetentionInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutObjectRetentionInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutObjectRetentionOutput struct {
_ struct{} `type:"structure"`
@@ -21131,15 +26581,29 @@ func (s *PutObjectRetentionOutput) SetRequestCharged(v string) *PutObjectRetenti
type PutObjectTaggingInput struct {
_ struct{} `locationName:"PutObjectTaggingRequest" type:"structure" payload:"Tagging"`
+ // The bucket name containing the object.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Name of the tag.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
+ // Container for the TagSet and Tag elements
+ //
// Tagging is a required field
Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
+ // The versionId of the object that the tag-set will be added to.
VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
}
@@ -21214,9 +26678,24 @@ func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
return s
}
+func (s *PutObjectTaggingInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutObjectTaggingInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutObjectTaggingOutput struct {
_ struct{} `type:"structure"`
+ // The versionId of the object the tag-set was added to.
VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
}
@@ -21303,6 +26782,20 @@ func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicA
return s
}
+func (s *PutPublicAccessBlockInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *PutPublicAccessBlockInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type PutPublicAccessBlockOutput struct {
_ struct{} `type:"structure"`
}
@@ -21322,6 +26815,8 @@ func (s PutPublicAccessBlockOutput) GoString() string {
type QueueConfiguration struct {
_ struct{} `type:"structure"`
+ // A collection of bucket events for which to send notifications
+ //
// Events is a required field
Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
@@ -21391,6 +26886,10 @@ func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
return s
}
+// This data type is deprecated. Use QueueConfiguration for the same purposes.
+// This data type specifies the configuration for publishing messages to an
+// Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified
+// events.
type QueueConfigurationDeprecated struct {
_ struct{} `type:"structure"`
@@ -21399,12 +26898,15 @@ type QueueConfigurationDeprecated struct {
// Deprecated: Event has been deprecated
Event *string `deprecated:"true" type:"string" enum:"Event"`
+ // A collection of bucket events for which to send notifications
Events []*string `locationName:"Event" type:"list" flattened:"true"`
// An optional unique identifier for configurations in a notification configuration.
// If you don't provide one, Amazon S3 will assign an ID.
Id *string `type:"string"`
+ // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3
+ // publishes a message when it detects events of the specified type.
Queue *string `type:"string"`
}
@@ -21442,6 +26944,7 @@ func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDep
return s
}
+// The container for the records event.
type RecordsEvent struct {
_ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"`
@@ -21481,6 +26984,13 @@ func (s *RecordsEvent) UnmarshalEvent(
return nil
}
+func (s *RecordsEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
+ msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
+ msg.Headers.Set(":content-type", eventstream.StringValue("application/octet-stream"))
+ msg.Payload = s.Payload
+ return msg, err
+}
+
// Specifies how requests are redirected. In the event of an error, you can
// specify a different error code to return.
type Redirect struct {
@@ -21608,7 +27118,7 @@ type ReplicationConfiguration struct {
// The Amazon Resource Name (ARN) of the AWS Identity and Access Management
// (IAM) role that Amazon S3 assumes when replicating objects. For more information,
- // see How to Set Up Cross-Region Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/crr-how-setup.html)
+ // see How to Set Up Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html)
// in the Amazon Simple Storage Service Developer Guide.
//
// Role is a required field
@@ -21673,14 +27183,30 @@ func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationCo
type ReplicationRule struct {
_ struct{} `type:"structure"`
- // Specifies whether Amazon S3 should replicate delete makers.
+ // Specifies whether Amazon S3 replicates the delete markers. If you specify
+ // a Filter, you must specify this element. However, in the latest version of
+ // replication configuration (when Filter is specified), Amazon S3 doesn't replicate
+ // delete markers. Therefore, the DeleteMarkerReplication element can contain
+ // only Disabled. For an example configuration, see Basic Rule
+ // Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
+ //
+ // If you don't specify the Filter element, Amazon S3 assumes that the replication
+ // configuration is the earlier version, V1. In the earlier version, Amazon
+ // S3 handled replication of delete markers differently. For more information,
+ // see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"`
- // A container for information about the replication destination.
+ // A container for information about the replication destination and its configurations
+ // including enabling the S3 Replication Time Control (S3 RTC).
//
// Destination is a required field
Destination *Destination `type:"structure" required:"true"`
+ // Optional configuration to replicate existing source bucket objects. For more
+ // information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication)
+ // in the Amazon S3 Developer Guide.
+ ExistingObjectReplication *ExistingObjectReplication `type:"structure"`
+
// A filter that identifies the subset of objects to which the replication rule
// applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
Filter *ReplicationRuleFilter `type:"structure"`
@@ -21688,9 +27214,9 @@ type ReplicationRule struct {
// A unique identifier for the rule. The maximum value is 255 characters.
ID *string `type:"string"`
- // An object keyname prefix that identifies the object or objects to which the
- // rule applies. The maximum prefix length is 1,024 characters. To include all
- // objects in a bucket, specify an empty string.
+ // An object key name prefix that identifies the object or objects to which
+ // the rule applies. The maximum prefix length is 1,024 characters. To include
+ // all objects in a bucket, specify an empty string.
//
// Deprecated: Prefix has been deprecated
Prefix *string `deprecated:"true" type:"string"`
@@ -21700,21 +27226,21 @@ type ReplicationRule struct {
// when filtering. If two or more rules identify the same object based on a
// specified filter, the rule with higher priority takes precedence. For example:
//
- // * Same object quality prefix based filter criteria If prefixes you specified
+ // * Same object quality prefix-based filter criteria if prefixes you specified
// in multiple rules overlap
//
- // * Same object qualify tag based filter criteria specified in multiple
+ // * Same object qualify tag-based filter criteria specified in multiple
// rules
//
- // For more information, see Cross-Region Replication (CRR) (https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
- // in the Amazon S3 Developer Guide.
+ // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
+ // in the Amazon Simple Storage Service Developer Guide.
Priority *int64 `type:"integer"`
// A container that describes additional filters for identifying the source
// objects that you want to replicate. You can choose to enable or disable the
// replication of these objects. Currently, Amazon S3 supports only the filter
// that you can specify for objects created with server-side encryption using
- // an AWS KMS-Managed Key (SSE-KMS).
+ // a customer master key (CMK) stored in AWS Key Management Service (SSE-KMS).
SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
// Specifies whether the rule is enabled.
@@ -21747,6 +27273,11 @@ func (s *ReplicationRule) Validate() error {
invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
}
}
+ if s.ExistingObjectReplication != nil {
+ if err := s.ExistingObjectReplication.Validate(); err != nil {
+ invalidParams.AddNested("ExistingObjectReplication", err.(request.ErrInvalidParams))
+ }
+ }
if s.Filter != nil {
if err := s.Filter.Validate(); err != nil {
invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
@@ -21776,6 +27307,12 @@ func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
return s
}
+// SetExistingObjectReplication sets the ExistingObjectReplication field's value.
+func (s *ReplicationRule) SetExistingObjectReplication(v *ExistingObjectReplication) *ReplicationRule {
+ s.ExistingObjectReplication = v
+ return s
+}
+
// SetFilter sets the Filter field's value.
func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule {
s.Filter = v
@@ -21812,11 +27349,25 @@ func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
return s
}
+// A container for specifying rule filters. The filters determine the subset
+// of objects to which the rule applies. This element is required only if you
+// specify more than one filter.
+//
+// For example:
+//
+// * If you specify both a Prefix and a Tag filter, wrap these filters in
+// an And tag.
+//
+// * If you specify a filter based on multiple tags, wrap the Tag elements
+// in an And tag
type ReplicationRuleAndOperator struct {
_ struct{} `type:"structure"`
+ // An object key name prefix that identifies the subset of objects to which
+ // the rule applies.
Prefix *string `type:"string"`
+ // An array of tags containing key and value pairs.
Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
}
@@ -21878,8 +27429,8 @@ type ReplicationRuleFilter struct {
// in an And tag.
And *ReplicationRuleAndOperator `type:"structure"`
- // An object keyname prefix that identifies the subset of objects to which the
- // rule applies.
+ // An object key name prefix that identifies the subset of objects to which
+ // the rule applies.
Prefix *string `type:"string"`
// A container for specifying a tag key and value.
@@ -21936,6 +27487,91 @@ func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter {
return s
}
+// A container specifying S3 Replication Time Control (S3 RTC) related information,
+// including whether S3 RTC is enabled and the time when all objects and operations
+// on objects must be replicated. Must be specified together with a Metrics
+// block.
+type ReplicationTime struct {
+ _ struct{} `type:"structure"`
+
+ // Specifies whether the replication time is enabled.
+ //
+ // Status is a required field
+ Status *string `type:"string" required:"true" enum:"ReplicationTimeStatus"`
+
+ // A container specifying the time by which replication should be complete for
+ // all objects and operations on objects.
+ //
+ // Time is a required field
+ Time *ReplicationTimeValue `type:"structure" required:"true"`
+}
+
+// String returns the string representation
+func (s ReplicationTime) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicationTime) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ReplicationTime) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ReplicationTime"}
+ if s.Status == nil {
+ invalidParams.Add(request.NewErrParamRequired("Status"))
+ }
+ if s.Time == nil {
+ invalidParams.Add(request.NewErrParamRequired("Time"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetStatus sets the Status field's value.
+func (s *ReplicationTime) SetStatus(v string) *ReplicationTime {
+ s.Status = &v
+ return s
+}
+
+// SetTime sets the Time field's value.
+func (s *ReplicationTime) SetTime(v *ReplicationTimeValue) *ReplicationTime {
+ s.Time = v
+ return s
+}
+
+// A container specifying the time value for S3 Replication Time Control (S3
+// RTC) and replication metrics EventThreshold.
+type ReplicationTimeValue struct {
+ _ struct{} `type:"structure"`
+
+ // Contains an integer specifying time in minutes.
+ //
+ // Valid values: 15 minutes.
+ Minutes *int64 `type:"integer"`
+}
+
+// String returns the string representation
+func (s ReplicationTimeValue) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicationTimeValue) GoString() string {
+ return s.String()
+}
+
+// SetMinutes sets the Minutes field's value.
+func (s *ReplicationTimeValue) SetMinutes(v int64) *ReplicationTimeValue {
+ s.Minutes = &v
+ return s
+}
+
+// Container for Payer.
type RequestPaymentConfiguration struct {
_ struct{} `type:"structure"`
@@ -21974,6 +27610,7 @@ func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfigur
return s
}
+// Container for specifying if periodic QueryProgress messages should be sent.
type RequestProgress struct {
_ struct{} `type:"structure"`
@@ -22001,21 +27638,34 @@ func (s *RequestProgress) SetEnabled(v bool) *RequestProgress {
type RestoreObjectInput struct {
_ struct{} `locationName:"RestoreObjectRequest" type:"structure" payload:"RestoreRequest"`
+ // The bucket name or containing the object to restore.
+ //
+ // When using this API with an access point, you must direct requests to the
+ // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
+ // When using this operation using an access point through the AWS SDKs, you
+ // provide the access point ARN in place of the bucket name. For more information
+ // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html)
+ // in the Amazon Simple Storage Service Developer Guide.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Object key for which the operation was initiated.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// Container for restore job parameters.
RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
+ // VersionId used to reference a specific version of the object.
VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
}
@@ -22093,6 +27743,20 @@ func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
return s
}
+func (s *RestoreObjectInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *RestoreObjectInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type RestoreObjectOutput struct {
_ struct{} `type:"structure"`
@@ -22138,7 +27802,7 @@ type RestoreRequest struct {
// The optional description for the job.
Description *string `type:"string"`
- // Glacier related parameters pertaining to this job. Do not use with restores
+ // S3 Glacier related parameters pertaining to this job. Do not use with restores
// that specify OutputLocation.
GlacierJobParameters *GlacierJobParameters `type:"structure"`
@@ -22148,7 +27812,7 @@ type RestoreRequest struct {
// Describes the parameters for Select job types.
SelectParameters *SelectParameters `type:"structure"`
- // Glacier retrieval tier at which the restore will be processed.
+ // S3 Glacier retrieval tier at which the restore will be processed.
Tier *string `type:"string" enum:"Tier"`
// Type of restore request.
@@ -22286,8 +27950,9 @@ func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
}
// Specifies lifecycle rules for an Amazon S3 bucket. For more information,
-// see PUT Bucket lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html)
-// in the Amazon Simple Storage Service API Reference.
+// see Put Bucket Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html)
+// in the Amazon Simple Storage Service API Reference. For examples, see Put
+// Bucket Lifecycle Configuration Examples (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html#API_PutBucketLifecycleConfiguration_Examples)
type Rule struct {
_ struct{} `type:"structure"`
@@ -22298,6 +27963,7 @@ type Rule struct {
// in the Amazon Simple Storage Service Developer Guide.
AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
+ // Specifies the expiration for the lifecycle of the object.
Expiration *LifecycleExpiration `type:"structure"`
// Unique identifier for the rule. The value can't be longer than 255 characters.
@@ -22331,7 +27997,10 @@ type Rule struct {
// Status is a required field
Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
- // Specifies when an object transitions to a specified storage class.
+ // Specifies when an object transitions to a specified storage class. For more
+ // information about Amazon S3 lifecycle configuration rules, see Transitioning
+ // Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html)
+ // in the Amazon Simple Storage Service Developer Guide.
Transition *Transition `type:"structure"`
}
@@ -22409,12 +28078,12 @@ func (s *Rule) SetTransition(v *Transition) *Rule {
return s
}
-// Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
+// Specifies the use of SSE-KMS to encrypt delivered inventory reports.
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.
+ // Specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer
+ // managed customer master key (CMK) to use for encrypting inventory reports.
//
// KeyId is a required field
KeyId *string `type:"string" required:"true" sensitive:"true"`
@@ -22449,7 +28118,7 @@ func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
return s
}
-// Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
+// Specifies the use of SSE-S3 to encrypt delivered inventory reports.
type SSES3 struct {
_ struct{} `locationName:"SSE-S3" type:"structure"`
}
@@ -22464,75 +28133,51 @@ func (s SSES3) GoString() string {
return s.String()
}
-// SelectObjectContentEventStream provides handling of EventStreams for
-// the SelectObjectContent API.
-//
-// Use this type to receive SelectObjectContentEventStream events. The events
-// can be read from the Events channel member.
-//
-// The events that can be received are:
-//
-// * ContinuationEvent
-// * EndEvent
-// * ProgressEvent
-// * RecordsEvent
-// * StatsEvent
-type SelectObjectContentEventStream struct {
- // Reader is the EventStream reader for the SelectObjectContentEventStream
- // events. This value is automatically set by the SDK when the API call is made
- // Use this member when unit testing your code with the SDK to mock out the
- // EventStream Reader.
- //
- // Must not be nil.
- Reader SelectObjectContentEventStreamReader
+// Specifies the byte range of the object to get the records from. A record
+// is processed when its first byte is contained by the range. This parameter
+// is optional, but when specified, it must not be empty. See RFC 2616, Section
+// 14.35.1 about how to specify the start and end of the range.
+type ScanRange struct {
+ _ struct{} `type:"structure"`
- // StreamCloser is the io.Closer for the EventStream connection. For HTTP
- // EventStream this is the response Body. The stream will be closed when
- // the Close method of the EventStream is called.
- StreamCloser io.Closer
+ // Specifies the end of the byte range. This parameter is optional. Valid values:
+ // non-negative integers. The default value is one less than the size of the
+ // object being queried. If only the End parameter is supplied, it is interpreted
+ // to mean scan the last N bytes of the file. For example, 50
+ // means scan the last 50 bytes.
+ End *int64 `type:"long"`
+
+ // Specifies the start of the byte range. This parameter is optional. Valid
+ // values: non-negative integers. The default value is 0. If only start is supplied,
+ // it means scan from that point to the end of the file.For example; 50
+ // means scan from byte 50 until the end of the file.
+ Start *int64 `type:"long"`
}
-// Close closes the EventStream. This will also cause the Events channel to be
-// closed. You can use the closing of the Events channel to terminate your
-// application's read from the API's EventStream.
-//
-// Will close the underlying EventStream reader. For EventStream over HTTP
-// connection this will also close the HTTP connection.
-//
-// Close must be called when done using the EventStream API. Not calling Close
-// may result in resource leaks.
-func (es *SelectObjectContentEventStream) Close() (err error) {
- es.Reader.Close()
- return es.Err()
+// String returns the string representation
+func (s ScanRange) String() string {
+ return awsutil.Prettify(s)
}
-// Err returns any error that occurred while reading EventStream Events from
-// the service API's response. Returns nil if there were no errors.
-func (es *SelectObjectContentEventStream) Err() error {
- if err := es.Reader.Err(); err != nil {
- return err
- }
- es.StreamCloser.Close()
+// GoString returns the string representation
+func (s ScanRange) GoString() string {
+ return s.String()
+}
- return nil
+// SetEnd sets the End field's value.
+func (s *ScanRange) SetEnd(v int64) *ScanRange {
+ s.End = &v
+ return s
}
-// Events returns a channel to read EventStream Events from the
-// SelectObjectContent API.
-//
-// These events are:
-//
-// * ContinuationEvent
-// * EndEvent
-// * ProgressEvent
-// * RecordsEvent
-// * StatsEvent
-func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
- return es.Reader.Events()
+// SetStart sets the Start field's value.
+func (s *ScanRange) SetStart(v int64) *ScanRange {
+ s.Start = &v
+ return s
}
// SelectObjectContentEventStreamEvent groups together all EventStream
-// events read from the SelectObjectContent API.
+// events writes for SelectObjectContentEventStream.
//
// These events are:
//
@@ -22543,11 +28188,12 @@ func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEve
// * StatsEvent
type SelectObjectContentEventStreamEvent interface {
eventSelectObjectContentEventStream()
+ eventstreamapi.Marshaler
+ eventstreamapi.Unmarshaler
}
-// SelectObjectContentEventStreamReader provides the interface for reading EventStream
-// Events from the SelectObjectContent API. The
-// default implementation for this interface will be SelectObjectContentEventStream.
+// SelectObjectContentEventStreamReader provides the interface for reading to the stream. The
+// default implementation for this interface will be SelectObjectContentEventStreamData.
//
// The reader's Close method must allow multiple concurrent calls.
//
@@ -22562,8 +28208,7 @@ type SelectObjectContentEventStreamReader interface {
// Returns a channel of events as they are read from the event stream.
Events() <-chan SelectObjectContentEventStreamEvent
- // Close will close the underlying event stream reader. For event stream over
- // HTTP this will also close the HTTP connection.
+ // Close will stop the reader reading events from the stream.
Close() error
// Returns any error that has occurred while reading from the event stream.
@@ -22573,57 +28218,44 @@ type SelectObjectContentEventStreamReader interface {
type readSelectObjectContentEventStream struct {
eventReader *eventstreamapi.EventReader
stream chan SelectObjectContentEventStreamEvent
- errVal atomic.Value
+ err *eventstreamapi.OnceError
done chan struct{}
closeOnce sync.Once
}
-func newReadSelectObjectContentEventStream(
- reader io.ReadCloser,
- unmarshalers request.HandlerList,
- logger aws.Logger,
- logLevel aws.LogLevelType,
-) *readSelectObjectContentEventStream {
+func newReadSelectObjectContentEventStream(eventReader *eventstreamapi.EventReader) *readSelectObjectContentEventStream {
r := &readSelectObjectContentEventStream{
- stream: make(chan SelectObjectContentEventStreamEvent),
- done: make(chan struct{}),
+ eventReader: eventReader,
+ stream: make(chan SelectObjectContentEventStreamEvent),
+ done: make(chan struct{}),
+ err: eventstreamapi.NewOnceError(),
}
-
- r.eventReader = eventstreamapi.NewEventReader(
- reader,
- protocol.HandlerPayloadUnmarshal{
- Unmarshalers: unmarshalers,
- },
- r.unmarshalerForEventType,
- )
- r.eventReader.UseLogger(logger, logLevel)
+ go r.readEventStream()
return r
}
-// Close will close the underlying event stream reader. For EventStream over
-// HTTP this will also close the HTTP connection.
+// Close will close the underlying event stream reader.
func (r *readSelectObjectContentEventStream) Close() error {
r.closeOnce.Do(r.safeClose)
-
return r.Err()
}
+func (r *readSelectObjectContentEventStream) ErrorSet() <-chan struct{} {
+ return r.err.ErrorSet()
+}
+
+func (r *readSelectObjectContentEventStream) Closed() <-chan struct{} {
+ return r.done
+}
+
func (r *readSelectObjectContentEventStream) safeClose() {
close(r.done)
- err := r.eventReader.Close()
- if err != nil {
- r.errVal.Store(err)
- }
}
func (r *readSelectObjectContentEventStream) Err() error {
- if v := r.errVal.Load(); v != nil {
- return v.(error)
- }
-
- return nil
+ return r.err.Err()
}
func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
@@ -22631,6 +28263,7 @@ func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContent
}
func (r *readSelectObjectContentEventStream) readEventStream() {
+ defer r.Close()
defer close(r.stream)
for {
@@ -22645,7 +28278,7 @@ func (r *readSelectObjectContentEventStream) readEventStream() {
return
default:
}
- r.errVal.Store(err)
+ r.err.SetError(err)
return
}
@@ -22657,22 +28290,20 @@ func (r *readSelectObjectContentEventStream) readEventStream() {
}
}
-func (r *readSelectObjectContentEventStream) unmarshalerForEventType(
- eventType string,
-) (eventstreamapi.Unmarshaler, error) {
+type unmarshalerForSelectObjectContentEventStreamEvent struct {
+ metadata protocol.ResponseMetadata
+}
+
+func (u unmarshalerForSelectObjectContentEventStreamEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) {
switch eventType {
case "Cont":
return &ContinuationEvent{}, nil
-
case "End":
return &EndEvent{}, nil
-
case "Progress":
return &ProgressEvent{}, nil
-
case "Records":
return &RecordsEvent{}, nil
-
case "Stats":
return &StatsEvent{}, nil
default:
@@ -22704,7 +28335,7 @@ type SelectObjectContentInput struct {
// Expression is a required field
Expression *string `type:"string" required:"true"`
- // The type of the provided expression (for example., SQL).
+ // The type of the provided expression (for example, SQL).
//
// ExpressionType is a required field
ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
@@ -22738,6 +28369,24 @@ type SelectObjectContentInput struct {
// The SSE Customer Key MD5. For more information, see Server-Side Encryption
// (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
+
+ // Specifies the byte range of the object to get the records from. A record
+ // is processed when its first byte is contained by the range. This parameter
+ // is optional, but when specified, it must not be empty. See RFC 2616, Section
+ // 14.35.1 about how to specify the start and end of the range.
+ //
+ // ScanRangemay be used in the following ways:
+ //
+ // * 50100 - process only
+ // the records starting between the bytes 50 and 100 (inclusive, counting
+ // from zero)
+ //
+ // * 50 - process only the records
+ // starting after the byte 50
+ //
+ // * 50 - process only the records within
+ // the last 50 bytes of the file.
+ ScanRange *ScanRange `type:"structure"`
}
// String returns the string representation
@@ -22858,11 +28507,30 @@ func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectC
return s
}
+// SetScanRange sets the ScanRange field's value.
+func (s *SelectObjectContentInput) SetScanRange(v *ScanRange) *SelectObjectContentInput {
+ s.ScanRange = v
+ return s
+}
+
+func (s *SelectObjectContentInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *SelectObjectContentInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type SelectObjectContentOutput struct {
_ struct{} `type:"structure" payload:"Payload"`
- // Use EventStream to use the API's stream.
- EventStream *SelectObjectContentEventStream `type:"structure"`
+ EventStream *SelectObjectContentEventStream
}
// String returns the string representation
@@ -22875,29 +28543,17 @@ func (s SelectObjectContentOutput) GoString() string {
return s.String()
}
-// SetEventStream sets the EventStream field's value.
func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput {
s.EventStream = v
return s
}
+func (s *SelectObjectContentOutput) GetEventStream() *SelectObjectContentEventStream {
+ return s.EventStream
+}
-func (s *SelectObjectContentOutput) runEventStreamLoop(r *request.Request) {
- if r.Error != nil {
- return
- }
- reader := newReadSelectObjectContentEventStream(
- r.HTTPResponse.Body,
- r.Handlers.UnmarshalStream,
- r.Config.Logger,
- r.Config.LogLevel.Value(),
- )
- go reader.readEventStream()
-
- eventStream := &SelectObjectContentEventStream{
- StreamCloser: r.HTTPResponse.Body,
- Reader: reader,
- }
- s.EventStream = eventStream
+// GetStream returns the type to interact with the event stream.
+func (s *SelectObjectContentOutput) GetStream() *SelectObjectContentEventStream {
+ return s.EventStream
}
// Describes the parameters for Select job types.
@@ -22909,7 +28565,7 @@ type SelectParameters struct {
// Expression is a required field
Expression *string `type:"string" required:"true"`
- // The type of the provided expression (e.g., SQL).
+ // The type of the provided expression (for example, SQL).
//
// ExpressionType is a required field
ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
@@ -22989,8 +28645,24 @@ func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *Selec
type ServerSideEncryptionByDefault struct {
_ struct{} `type:"structure"`
- // KMS master key ID to use for the default encryption. This parameter is allowed
- // if and only if SSEAlgorithm is set to aws:kms.
+ // AWS Key Management Service (KMS) customer master key ID to use for the default
+ // encryption. This parameter is allowed if and only if SSEAlgorithm is set
+ // to aws:kms.
+ //
+ // You can specify the key ID or the Amazon Resource Name (ARN) of the CMK.
+ // However, if you are using encryption with cross-account operations, you must
+ // use a fully qualified CMK ARN. For more information, see Using encryption
+ // for cross-account operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy).
+ //
+ // For example:
+ //
+ // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // Amazon S3 only supports symmetric CMKs and not asymmetric CMKs. For more
+ // information, see Using Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
+ // in the AWS Key Management Service Developer Guide.
KMSMasterKeyID *string `type:"string" sensitive:"true"`
// Server-side encryption algorithm to use for the default encryption.
@@ -23129,7 +28801,7 @@ func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *Serv
// objects that you want to replicate. You can choose to enable or disable the
// replication of these objects. Currently, Amazon S3 supports only the filter
// that you can specify for objects created with server-side encryption using
-// an AWS KMS-Managed Key (SSE-KMS).
+// a customer master key (CMK) stored in AWS Key Management Service (SSE-KMS).
type SourceSelectionCriteria struct {
_ struct{} `type:"structure"`
@@ -23176,7 +28848,7 @@ type SseKmsEncryptedObjects struct {
_ struct{} `type:"structure"`
// Specifies whether Amazon S3 replicates objects created with server-side encryption
- // using an AWS KMS-managed key.
+ // using a customer master key (CMK) stored in AWS Key Management Service.
//
// Status is a required field
Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
@@ -23211,6 +28883,7 @@ func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
return s
}
+// Container for the stats details.
type Stats struct {
_ struct{} `type:"structure"`
@@ -23252,6 +28925,7 @@ func (s *Stats) SetBytesScanned(v int64) *Stats {
return s
}
+// Container for the Stats Event.
type StatsEvent struct {
_ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"`
@@ -23292,6 +28966,16 @@ func (s *StatsEvent) UnmarshalEvent(
return nil
}
+func (s *StatsEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
+ msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
+ var buf bytes.Buffer
+ if err = pm.MarshalPayload(&buf, s); err != nil {
+ return eventstream.Message{}, err
+ }
+ msg.Payload = buf.Bytes()
+ return msg, err
+}
+
// Specifies data related to access patterns to be collected and made available
// to analyze the tradeoffs between different storage classes for an Amazon
// S3 bucket.
@@ -23334,6 +29018,8 @@ func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport)
return s
}
+// Container for data related to the storage class analysis for an Amazon S3
+// bucket for export.
type StorageClassAnalysisDataExport struct {
_ struct{} `type:"structure"`
@@ -23391,6 +29077,7 @@ func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *Stora
return s
}
+// A container of a key value name pair.
type Tag struct {
_ struct{} `type:"structure"`
@@ -23446,9 +29133,12 @@ func (s *Tag) SetValue(v string) *Tag {
return s
}
+// Container for TagSet elements.
type Tagging struct {
_ struct{} `type:"structure"`
+ // A collection for a set of tags
+ //
// TagSet is a required field
TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
}
@@ -23492,9 +29182,11 @@ func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
return s
}
+// Container for granting information.
type TargetGrant struct {
_ struct{} `type:"structure"`
+ // Container for the person being granted permissions.
Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
// Logging permissions assigned to the Grantee for the bucket.
@@ -23617,6 +29309,10 @@ func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
return s
}
+// A container for specifying the configuration for publication of messages
+// to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3
+// detects specified events. This data type is deprecated. Use TopicConfiguration
+// instead.
type TopicConfigurationDeprecated struct {
_ struct{} `type:"structure"`
@@ -23625,6 +29321,7 @@ type TopicConfigurationDeprecated struct {
// Deprecated: Event has been deprecated
Event *string `deprecated:"true" type:"string" enum:"Event"`
+ // A collection of events related to objects
Events []*string `locationName:"Event" type:"list" flattened:"true"`
// An optional unique identifier for configurations in a notification configuration.
@@ -23670,7 +29367,10 @@ func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDep
return s
}
-// Specifies when an object transitions to a specified storage class.
+// Specifies when an object transitions to a specified storage class. For more
+// information about Amazon S3 lifecycle configuration rules, see Transitioning
+// Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html)
+// in the Amazon Simple Storage Service Developer Guide.
type Transition struct {
_ struct{} `type:"structure"`
@@ -23717,6 +29417,8 @@ func (s *Transition) SetStorageClass(v string) *Transition {
type UploadPartCopyInput struct {
_ struct{} `locationName:"UploadPartCopyRequest" type:"structure"`
+ // The bucket name.
+ //
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -23742,11 +29444,12 @@ type UploadPartCopyInput struct {
// The range of bytes to copy from the source object. The range value must use
// the form bytes=first-last, where the first and last are the zero-based byte
// offsets to copy. For example, bytes=0-9 indicates that you want to copy the
- // first ten bytes of the source. You can copy a range only if the source object
+ // first 10 bytes of the source. You can copy a range only if the source object
// is greater than 5 MB.
CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
- // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
+ // Specifies the algorithm to use when decrypting the source object (for example,
+ // AES256).
CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
@@ -23755,10 +29458,12 @@ type UploadPartCopyInput struct {
CopySourceSSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure the encryption
- // key was transmitted without error.
+ // Amazon S3 uses this header for a message integrity check to ensure that the
+ // encryption key was transmitted without error.
CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
+ // Object key for which the multipart upload was initiated.
+ //
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
@@ -23768,26 +29473,28 @@ type UploadPartCopyInput struct {
// PartNumber is a required field
PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
// data. This value is used to store the object and then it is discarded; Amazon
- // does not store the encryption key. The key must be appropriate for use with
- // the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
+ // S3 does not store the encryption key. The key must be appropriate for use
+ // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
// header. This must be the same encryption key specified in the initiate multipart
// upload request.
SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure the encryption
- // key was transmitted without error.
+ // Amazon S3 uses this header for a message integrity check to ensure that the
+ // encryption key was transmitted without error.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
// Upload ID identifying the multipart upload whose part is being copied.
@@ -23960,9 +29667,24 @@ func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
return s
}
+func (s *UploadPartCopyInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *UploadPartCopyInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type UploadPartCopyOutput struct {
_ struct{} `type:"structure" payload:"CopyPartResult"`
+ // Container for all response elements.
CopyPartResult *CopyPartResult `type:"structure"`
// The version of the source object that was copied, if you have enabled versioning
@@ -23979,16 +29701,17 @@ type UploadPartCopyOutput struct {
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round trip message integrity
+ // the response will include this header to provide round-trip message integrity
// verification of the customer-provided encryption key.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
- // If present, specifies the ID of the AWS Key Management Service (KMS) master
- // encryption key that was used for the object.
+ // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
+ // symmetric customer managed customer master key (CMK) that was used for the
+ // object.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // The server-side encryption algorithm used when storing this object in Amazon
+ // S3 (for example, AES256, aws:kms).
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
}
@@ -24060,7 +29783,7 @@ type UploadPartInput struct {
ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
// The base64-encoded 128-bit MD5 digest of the part data. This parameter is
- // auto-populated when using the command from the CLI. This parameted is required
+ // auto-populated when using the command from the CLI. This parameter is required
// if object lock parameters are specified.
ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
@@ -24075,26 +29798,28 @@ type UploadPartInput struct {
// PartNumber is a required field
PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
- // Confirms that the requester knows that she or he will be charged for the
- // request. Bucket owners need not specify this parameter in their requests.
- // Documentation on downloading objects from requester pays buckets can be found
- // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ // Confirms that the requester knows that they will be charged for the request.
+ // Bucket owners need not specify this parameter in their requests. For information
+ // about downloading objects from requester pays buckets, see Downloading Objects
+ // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+ // in the Amazon S3 Developer Guide.
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
// data. This value is used to store the object and then it is discarded; Amazon
- // does not store the encryption key. The key must be appropriate for use with
- // the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
+ // S3 does not store the encryption key. The key must be appropriate for use
+ // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
// header. This must be the same encryption key specified in the initiate multipart
// upload request.
SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure the encryption
- // key was transmitted without error.
+ // Amazon S3 uses this header for a message integrity check to ensure that the
+ // encryption key was transmitted without error.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
// Upload ID identifying the multipart upload whose part is being uploaded.
@@ -24221,6 +29946,20 @@ func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
return s
}
+func (s *UploadPartInput) getEndpointARN() (arn.Resource, error) {
+ if s.Bucket == nil {
+ return nil, fmt.Errorf("member Bucket is nil")
+ }
+ return parseEndpointARN(*s.Bucket)
+}
+
+func (s *UploadPartInput) hasEndpointARN() bool {
+ if s.Bucket == nil {
+ return false
+ }
+ return arn.IsARN(*s.Bucket)
+}
+
type UploadPartOutput struct {
_ struct{} `type:"structure"`
@@ -24237,16 +29976,16 @@ type UploadPartOutput struct {
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round trip message integrity
+ // the response will include this header to provide round-trip message integrity
// verification of the customer-provided encryption key.
SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
- // If present, specifies the ID of the AWS Key Management Service (KMS) master
- // encryption key that was used for the object.
+ // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
+ // symmetric customer managed customer master key (CMK) was used for the object.
SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
- // The Server-side encryption algorithm used when storing this object in S3
- // (e.g., AES256, aws:kms).
+ // The server-side encryption algorithm used when storing this object in Amazon
+ // S3 (for example, AES256, aws:kms).
ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
}
@@ -24561,11 +30300,37 @@ const (
// EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
+ // EventS3ObjectRestore is a Event enum value
+ EventS3ObjectRestore = "s3:ObjectRestore:*"
+
// EventS3ObjectRestorePost is a Event enum value
EventS3ObjectRestorePost = "s3:ObjectRestore:Post"
// EventS3ObjectRestoreCompleted is a Event enum value
EventS3ObjectRestoreCompleted = "s3:ObjectRestore:Completed"
+
+ // EventS3Replication is a Event enum value
+ EventS3Replication = "s3:Replication:*"
+
+ // EventS3ReplicationOperationFailedReplication is a Event enum value
+ EventS3ReplicationOperationFailedReplication = "s3:Replication:OperationFailedReplication"
+
+ // EventS3ReplicationOperationNotTracked is a Event enum value
+ EventS3ReplicationOperationNotTracked = "s3:Replication:OperationNotTracked"
+
+ // EventS3ReplicationOperationMissedThreshold is a Event enum value
+ EventS3ReplicationOperationMissedThreshold = "s3:Replication:OperationMissedThreshold"
+
+ // EventS3ReplicationOperationReplicatedAfterThreshold is a Event enum value
+ EventS3ReplicationOperationReplicatedAfterThreshold = "s3:Replication:OperationReplicatedAfterThreshold"
+)
+
+const (
+ // ExistingObjectReplicationStatusEnabled is a ExistingObjectReplicationStatus enum value
+ ExistingObjectReplicationStatusEnabled = "Enabled"
+
+ // ExistingObjectReplicationStatusDisabled is a ExistingObjectReplicationStatus enum value
+ ExistingObjectReplicationStatusDisabled = "Disabled"
)
const (
@@ -24657,6 +30422,9 @@ const (
// InventoryOptionalFieldObjectLockLegalHoldStatus is a InventoryOptionalField enum value
InventoryOptionalFieldObjectLockLegalHoldStatus = "ObjectLockLegalHoldStatus"
+
+ // InventoryOptionalFieldIntelligentTieringAccessTier is a InventoryOptionalField enum value
+ InventoryOptionalFieldIntelligentTieringAccessTier = "IntelligentTieringAccessTier"
)
const (
@@ -24691,6 +30459,14 @@ const (
MetadataDirectiveReplace = "REPLACE"
)
+const (
+ // MetricsStatusEnabled is a MetricsStatus enum value
+ MetricsStatusEnabled = "Enabled"
+
+ // MetricsStatusDisabled is a MetricsStatus enum value
+ MetricsStatusDisabled = "Disabled"
+)
+
const (
// ObjectCannedACLPrivate is a ObjectCannedACL enum value
ObjectCannedACLPrivate = "private"
@@ -24839,6 +30615,14 @@ const (
ReplicationStatusReplica = "REPLICA"
)
+const (
+ // ReplicationTimeStatusEnabled is a ReplicationTimeStatus enum value
+ ReplicationTimeStatusEnabled = "Enabled"
+
+ // ReplicationTimeStatusDisabled is a ReplicationTimeStatus enum value
+ ReplicationTimeStatusDisabled = "Disabled"
+)
+
// If present, indicates that the requester was successfully charged for the
// request.
const (
@@ -24846,10 +30630,11 @@ const (
RequestChargedRequester = "requester"
)
-// Confirms that the requester knows that she or he will be charged for the
-// request. Bucket owners need not specify this parameter in their requests.
-// Documentation on downloading objects from requester pays buckets can be found
-// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+// Confirms that the requester knows that they will be charged for the request.
+// Bucket owners need not specify this parameter in their requests. For information
+// about downloading objects from requester pays buckets, see Downloading Objects
+// in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
+// in the Amazon S3 Developer Guide.
const (
// RequestPayerRequester is a RequestPayer enum value
RequestPayerRequester = "requester"
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go b/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go
index 5c8ce5cc..407f06b6 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go
@@ -13,7 +13,6 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkio"
)
const (
@@ -25,30 +24,6 @@ const (
appendMD5TxEncoding = "append-md5"
)
-// contentMD5 computes and sets the HTTP Content-MD5 header for requests that
-// require it.
-func contentMD5(r *request.Request) {
- h := md5.New()
-
- if !aws.IsReaderSeekable(r.Body) {
- if r.Config.Logger != nil {
- r.Config.Logger.Log(fmt.Sprintf(
- "Unable to compute Content-MD5 for unseekable body, S3.%s",
- r.Operation.Name))
- }
- return
- }
-
- if _, err := copySeekableBody(h, r.Body); err != nil {
- r.Error = awserr.New("ContentMD5", "failed to compute body MD5", err)
- return
- }
-
- // encode the md5 checksum in base64 and set the request header.
- v := base64.StdEncoding.EncodeToString(h.Sum(nil))
- r.HTTPRequest.Header.Set(contentMD5Header, v)
-}
-
// computeBodyHashes will add Content MD5 and Content Sha256 hashes to the
// request. If the body is not seekable or S3DisableContentMD5Validation set
// this handler will be ignored.
@@ -90,7 +65,7 @@ func computeBodyHashes(r *request.Request) {
dst = io.MultiWriter(hashers...)
}
- if _, err := copySeekableBody(dst, r.Body); err != nil {
+ if _, err := aws.CopySeekableBody(dst, r.Body); err != nil {
r.Error = awserr.New("BodyHashError", "failed to compute body hashes", err)
return
}
@@ -119,28 +94,6 @@ const (
sha256HexEncLen = sha256.Size * 2 // hex.EncodedLen
)
-func copySeekableBody(dst io.Writer, src io.ReadSeeker) (int64, error) {
- curPos, err := src.Seek(0, sdkio.SeekCurrent)
- if err != nil {
- return 0, err
- }
-
- // hash the body. seek back to the first position after reading to reset
- // the body for transmission. copy errors may be assumed to be from the
- // body.
- n, err := io.Copy(dst, src)
- if err != nil {
- return n, err
- }
-
- _, err = src.Seek(curPos, sdkio.SeekStart)
- if err != nil {
- return n, err
- }
-
- return n, nil
-}
-
// Adds the x-amz-te: append_md5 header to the request. This requests the service
// responds with a trailing MD5 checksum.
//
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
index 23d386b1..a7698d5e 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
@@ -4,6 +4,7 @@ import (
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/internal/s3err"
+ "github.com/aws/aws-sdk-go/service/s3/internal/arn"
)
func init() {
@@ -13,7 +14,7 @@ func init() {
func defaultInitClientFn(c *client.Client) {
// Support building custom endpoints based on config
- c.Handlers.Build.PushFront(updateEndpointForS3Config)
+ c.Handlers.Build.PushFront(endpointHandler)
// Require SSL when using SSE keys
c.Handlers.Validate.PushBack(validateSSERequiresSSL)
@@ -27,17 +28,11 @@ func defaultInitClientFn(c *client.Client) {
}
func defaultInitRequestFn(r *request.Request) {
- // Add reuest handlers for specific platforms.
+ // Add request handlers for specific platforms.
// e.g. 100-continue support for PUT requests using Go 1.6
platformRequestHandlers(r)
switch r.Operation.Name {
- case opPutBucketCors, opPutBucketLifecycle, opPutBucketPolicy,
- opPutBucketTagging, opDeleteObjects, opPutBucketLifecycleConfiguration,
- opPutObjectLegalHold, opPutObjectRetention, opPutObjectLockConfiguration,
- opPutBucketReplication:
- // These S3 operations require Content-MD5 to be set
- r.Handlers.Build.PushBack(contentMD5)
case opGetBucketLocation:
// GetBucketLocation has custom parsing logic
r.Handlers.Unmarshal.PushFront(buildGetBucketLocation)
@@ -73,3 +68,8 @@ type sseCustomerKeyGetter interface {
type copySourceSSECustomerKeyGetter interface {
getCopySourceSSECustomerKey() string
}
+
+type endpointARNGetter interface {
+ getEndpointARN() (arn.Resource, error)
+ hasEndpointARN() bool
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
index 931cb17b..49aeff16 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
@@ -13,6 +13,12 @@ const (
// ErrCodeBucketAlreadyOwnedByYou for service response error code
// "BucketAlreadyOwnedByYou".
+ //
+ // The bucket you tried to create already exists, and you own it. Amazon S3
+ // returns this error in all AWS Regions except in the North Virginia Region.
+ // For legacy compatibility, if you re-create an existing bucket that you already
+ // own in the North Virginia Region, Amazon S3 returns 200 OK and resets the
+ // bucket access control lists (ACLs).
ErrCodeBucketAlreadyOwnedByYou = "BucketAlreadyOwnedByYou"
// ErrCodeNoSuchBucket for service response error code
@@ -36,13 +42,13 @@ const (
// ErrCodeObjectAlreadyInActiveTierError for service response error code
// "ObjectAlreadyInActiveTierError".
//
- // This operation is not allowed against this storage tier
+ // This operation is not allowed against this storage tier.
ErrCodeObjectAlreadyInActiveTierError = "ObjectAlreadyInActiveTierError"
// ErrCodeObjectNotInActiveTierError for service response error code
// "ObjectNotInActiveTierError".
//
// The source object of the COPY operation is not in the active tier and is
- // only stored in Amazon Glacier.
+ // only stored in Amazon S3 Glacier.
ErrCodeObjectNotInActiveTierError = "ObjectNotInActiveTierError"
)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
index a7fbc2de..81cdec1a 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
@@ -30,10 +30,10 @@ var accelerateOpBlacklist = operationBlacklist{
opListBuckets, opCreateBucket, opDeleteBucket,
}
-// Request handler to automatically add the bucket name to the endpoint domain
+// Automatically add the bucket name to the endpoint domain
// if possible. This style of bucket is valid for all bucket names which are
// DNS compatible and do not contain "."
-func updateEndpointForS3Config(r *request.Request) {
+func updateEndpointForS3Config(r *request.Request, bucketName string) {
forceHostStyle := aws.BoolValue(r.Config.S3ForcePathStyle)
accelerate := aws.BoolValue(r.Config.S3UseAccelerate)
@@ -43,45 +43,29 @@ func updateEndpointForS3Config(r *request.Request) {
r.Config.Logger.Log("ERROR: aws.Config.S3UseAccelerate is not compatible with aws.Config.S3ForcePathStyle, ignoring S3ForcePathStyle.")
}
}
- updateEndpointForAccelerate(r)
+ updateEndpointForAccelerate(r, bucketName)
} else if !forceHostStyle && r.Operation.Name != opGetBucketLocation {
- updateEndpointForHostStyle(r)
+ updateEndpointForHostStyle(r, bucketName)
}
}
-func updateEndpointForHostStyle(r *request.Request) {
- bucket, ok := bucketNameFromReqParams(r.Params)
- if !ok {
- // Ignore operation requests if the bucketname was not provided
- // if this is an input validation error the validation handler
- // will report it.
- return
- }
-
- if !hostCompatibleBucketName(r.HTTPRequest.URL, bucket) {
+func updateEndpointForHostStyle(r *request.Request, bucketName string) {
+ if !hostCompatibleBucketName(r.HTTPRequest.URL, bucketName) {
// bucket name must be valid to put into the host
return
}
- moveBucketToHost(r.HTTPRequest.URL, bucket)
+ moveBucketToHost(r.HTTPRequest.URL, bucketName)
}
var (
accelElem = []byte("s3-accelerate.dualstack.")
)
-func updateEndpointForAccelerate(r *request.Request) {
- bucket, ok := bucketNameFromReqParams(r.Params)
- if !ok {
- // Ignore operation requests if the bucketname was not provided
- // if this is an input validation error the validation handler
- // will report it.
- return
- }
-
- if !hostCompatibleBucketName(r.HTTPRequest.URL, bucket) {
+func updateEndpointForAccelerate(r *request.Request, bucketName string) {
+ if !hostCompatibleBucketName(r.HTTPRequest.URL, bucketName) {
r.Error = awserr.New("InvalidParameterException",
- fmt.Sprintf("bucket name %s is not compatible with S3 Accelerate", bucket),
+ fmt.Sprintf("bucket name %s is not compatible with S3 Accelerate", bucketName),
nil)
return
}
@@ -106,7 +90,7 @@ func updateEndpointForAccelerate(r *request.Request) {
r.HTTPRequest.URL.Host = strings.Join(parts, ".")
- moveBucketToHost(r.HTTPRequest.URL, bucket)
+ moveBucketToHost(r.HTTPRequest.URL, bucketName)
}
// Attempts to retrieve the bucket name from the request input parameters.
@@ -148,8 +132,5 @@ func dnsCompatibleBucketName(bucket string) bool {
// moveBucketToHost moves the bucket name from the URI path to URL host.
func moveBucketToHost(u *url.URL, bucket string) {
u.Host = bucket + "." + u.Host
- u.Path = strings.Replace(u.Path, "/{Bucket}", "", -1)
- if u.Path == "" {
- u.Path = "/"
- }
+ removeBucketFromPath(u)
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
index d17dcc9d..b4c07b4d 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
@@ -31,7 +31,7 @@ var initRequest func(*request.Request)
const (
ServiceName = "s3" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "S3" // ServiceID is a unique identifer of a specific service.
+ ServiceID = "S3" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the S3 client with a session.
@@ -39,6 +39,8 @@ const (
// aws.Config parameter to add your extra config.
//
// Example:
+// mySession := session.Must(session.NewSession())
+//
// // Create a S3 client from just a session.
// svc := s3.New(mySession)
//
@@ -46,11 +48,11 @@ const (
// svc := s3.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3 {
c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
+ return newClient(*c.Config, c.Handlers, c.PartitionID, 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) *S3 {
+func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *S3 {
svc := &S3{
Client: client.New(
cfg,
@@ -59,6 +61,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
+ PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2006-03-01",
},
@@ -75,6 +78,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
+ svc.Handlers.BuildStream.PushBackNamed(restxml.BuildHandler)
svc.Handlers.UnmarshalStream.PushBackNamed(restxml.UnmarshalHandler)
// Run custom client initialization if present
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go
index f6a69aed..247770e4 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go
@@ -2,6 +2,7 @@ package s3
import (
"bytes"
+ "io"
"io/ioutil"
"net/http"
@@ -24,17 +25,18 @@ func copyMultipartStatusOKUnmarhsalError(r *request.Request) {
r.HTTPResponse.Body = ioutil.NopCloser(body)
defer body.Seek(0, sdkio.SeekStart)
- if body.Len() == 0 {
- // If there is no body don't attempt to parse the body.
- return
- }
-
unmarshalError(r)
if err, ok := r.Error.(awserr.Error); ok && err != nil {
- if err.Code() == request.ErrCodeSerialization {
+ if err.Code() == request.ErrCodeSerialization &&
+ err.OrigErr() != io.EOF {
r.Error = nil
return
}
- r.HTTPResponse.StatusCode = http.StatusServiceUnavailable
+ // if empty payload
+ if err.OrigErr() == io.EOF {
+ r.HTTPResponse.StatusCode = http.StatusInternalServerError
+ } else {
+ r.HTTPResponse.StatusCode = http.StatusServiceUnavailable
+ }
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
index 5b63fac7..6eecf669 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
@@ -1,6 +1,7 @@
package s3
import (
+ "bytes"
"encoding/xml"
"fmt"
"io"
@@ -45,17 +46,24 @@ func unmarshalError(r *request.Request) {
// Attempt to parse error from body if it is known
var errResp xmlErrorResponse
- err := xmlutil.UnmarshalXMLError(&errResp, r.HTTPResponse.Body)
- if err == io.EOF {
- // Only capture the error if an unmarshal error occurs that is not EOF,
- // because S3 might send an error without a error message which causes
- // the XML unmarshal to fail with EOF.
- err = nil
+ var err error
+ if r.HTTPResponse.StatusCode >= 200 && r.HTTPResponse.StatusCode < 300 {
+ err = s3unmarshalXMLError(&errResp, r.HTTPResponse.Body)
+ } else {
+ err = xmlutil.UnmarshalXMLError(&errResp, r.HTTPResponse.Body)
}
+
if err != nil {
+ var errorMsg string
+ if err == io.EOF {
+ errorMsg = "empty response payload"
+ } else {
+ errorMsg = "failed to unmarshal error message"
+ }
+
r.Error = awserr.NewRequestFailure(
awserr.New(request.ErrCodeSerialization,
- "failed to unmarshal error message", err),
+ errorMsg, err),
r.HTTPResponse.StatusCode,
r.RequestID,
)
@@ -86,3 +94,21 @@ type RequestFailure interface {
// Host ID is the S3 Host ID needed for debug, and contacting support
HostID() string
}
+
+// s3unmarshalXMLError is s3 specific xml error unmarshaler
+// for 200 OK errors and response payloads.
+// This function differs from the xmlUtil.UnmarshalXMLError
+// func. It does not ignore the EOF error and passes it up.
+// Related to bug fix for `s3 200 OK response with empty payload`
+func s3unmarshalXMLError(v interface{}, stream io.Reader) error {
+ var errBuf bytes.Buffer
+ body := io.TeeReader(stream, &errBuf)
+
+ err := xml.NewDecoder(body).Decode(v)
+ if err != nil && err != io.EOF {
+ return awserr.NewUnmarshalError(err,
+ "failed to unmarshal error message", errBuf.Bytes())
+ }
+
+ return err
+}
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 8695fea0..dcea0517 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
@@ -73,10 +73,11 @@ func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ
// We recommend that you devise a set of tag keys that meets your needs for
// each resource type. Using a consistent set of tag keys makes it easier for
// you to manage your resources. You can search and filter the resources based
-// on the tags you add. Tags don't have any semantic meaning to Amazon EC2 and
-// are interpreted strictly as a string of characters.
+// on the tags you add. Tags don't have any semantic meaning to and are interpreted
+// strictly as a string of characters.
//
-// For more information about tags, see Tagging Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
+// For more information about using tags with EC2 instances, see Tagging your
+// Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
// in the Amazon EC2 User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -86,23 +87,23 @@ func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation AddTagsToResource for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidResourceType "InvalidResourceType"
+// Returned Error Types:
+// * InvalidResourceType
// 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"
+// * InvalidResourceId
// The resource ID is not valid. Verify that you entered the correct ID and
// try again.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeTooManyTagsError "TooManyTagsError"
+// * TooManyTagsError
// The Targets parameter includes too many tags. Remove one or more tags and
// try the command again.
//
-// * ErrCodeTooManyUpdates "TooManyUpdates"
+// * TooManyUpdates
// There are concurrent updates for a resource that supports one update at a
// time.
//
@@ -183,13 +184,13 @@ func (c *SSM) CancelCommandRequest(input *CancelCommandInput) (req *request.Requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation CancelCommand for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidCommandId "InvalidCommandId"
+// * InvalidCommandId
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -201,7 +202,7 @@ func (c *SSM) CancelCommandRequest(input *CancelCommandInput) (req *request.Requ
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeDuplicateInstanceId "DuplicateInstanceId"
+// * DuplicateInstanceId
// You cannot specify an instance ID in more than one association.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelCommand
@@ -281,16 +282,17 @@ func (c *SSM) CancelMaintenanceWindowExecutionRequest(input *CancelMaintenanceWi
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation CancelMaintenanceWindowExecution for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelMaintenanceWindowExecution
func (c *SSM) CancelMaintenanceWindowExecution(input *CancelMaintenanceWindowExecutionInput) (*CancelMaintenanceWindowExecutionOutput, error) {
@@ -358,11 +360,17 @@ func (c *SSM) CreateActivationRequest(input *CreateActivationInput) (req *reques
// CreateActivation API operation for Amazon Simple Systems Manager (SSM).
//
-// Registers your on-premises server or virtual machine with Amazon EC2 so that
-// you can manage these resources using Run Command. An on-premises server or
-// virtual machine that has been registered with EC2 is called a managed instance.
-// For more information about activations, see Setting Up AWS Systems Manager
-// for Hybrid Environments (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html).
+// Generates an activation code and activation ID you can use to register your
+// on-premises server or virtual machine (VM) with Systems Manager. Registering
+// these machines with Systems Manager makes it possible to manage them using
+// Systems Manager capabilities. You use the activation code and ID when installing
+// SSM Agent on machines in your hybrid environment. For more information about
+// requirements for managing on-premises instances and VMs using Systems Manager,
+// see Setting up AWS Systems Manager for hybrid environments (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html)
+// in the AWS Systems Manager User Guide.
+//
+// On-premises servers or VMs that are registered with Systems Manager and EC2
+// instances that you manage with Systems Manager are all called managed instances.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -371,8 +379,8 @@ func (c *SSM) CreateActivationRequest(input *CreateActivationInput) (req *reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation CreateActivation for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateActivation
@@ -441,15 +449,18 @@ func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *requ
// CreateAssociation API operation for Amazon Simple Systems Manager (SSM).
//
-// Associates the specified Systems Manager document with the specified instances
-// or targets.
-//
-// When you associate a document with one or more instances using instance IDs
-// or tags, SSM Agent running on the instance processes the document and configures
-// the instance as specified.
-//
-// If you associate a document with an instance that already has an associated
-// document, the system returns the AssociationAlreadyExists exception.
+// A State Manager association defines the state that you want to maintain on
+// your instances. For example, an association can specify that anti-virus software
+// must be installed and running on your instances, or that certain ports must
+// be closed. For static targets, the association specifies a schedule for when
+// the configuration is reapplied. For dynamic targets, such as an AWS Resource
+// Group or an AWS Autoscaling Group, State Manager applies the configuration
+// when new instances are added to the group. The association also specifies
+// actions to take when applying the configuration. For example, an association
+// for anti-virus software might run once a day. If the software is not installed,
+// then State Manager installs it. If the software is installed, but the service
+// is not running, then the association might instruct State Manager to start
+// the service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -458,23 +469,23 @@ func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation CreateAssociation for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeAssociationAlreadyExists "AssociationAlreadyExists"
+// Returned Error Types:
+// * AssociationAlreadyExists
// The specified association already exists.
//
-// * ErrCodeAssociationLimitExceeded "AssociationLimitExceeded"
+// * AssociationLimitExceeded
// You can have at most 2,000 active associations.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion"
+// * InvalidDocumentVersion
// The document version is not valid or does not exist.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -486,23 +497,23 @@ func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *requ
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeUnsupportedPlatformType "UnsupportedPlatformType"
+// * UnsupportedPlatformType
// The document does not support the platform type of the given instance ID(s).
// For example, you sent an document for a Windows instance to a Linux instance.
//
-// * ErrCodeInvalidOutputLocation "InvalidOutputLocation"
+// * InvalidOutputLocation
// The output location is not valid or does not exist.
//
-// * ErrCodeInvalidParameters "InvalidParameters"
+// * InvalidParameters
// 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"
+// * InvalidTarget
// The target is not valid or does not exist. It might not be configured for
-// EC2 Systems Manager or you might not have permission to perform the operation.
+// Systems Manager or you might not have permission to perform the operation.
//
-// * ErrCodeInvalidSchedule "InvalidSchedule"
+// * InvalidSchedule
// The schedule is invalid. Verify your cron or rate expression and try again.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateAssociation
@@ -588,17 +599,17 @@ func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput)
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation CreateAssociationBatch for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion"
+// * InvalidDocumentVersion
// The document version is not valid or does not exist.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -610,29 +621,29 @@ func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput)
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidParameters "InvalidParameters"
+// * InvalidParameters
// 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"
+// * DuplicateInstanceId
// You cannot specify an instance ID in more than one association.
//
-// * ErrCodeAssociationLimitExceeded "AssociationLimitExceeded"
+// * AssociationLimitExceeded
// You can have at most 2,000 active associations.
//
-// * ErrCodeUnsupportedPlatformType "UnsupportedPlatformType"
+// * UnsupportedPlatformType
// The document does not support the platform type of the given instance ID(s).
// For example, you sent an document for a Windows instance to a Linux instance.
//
-// * ErrCodeInvalidOutputLocation "InvalidOutputLocation"
+// * InvalidOutputLocation
// The output location is not valid or does not exist.
//
-// * ErrCodeInvalidTarget "InvalidTarget"
+// * InvalidTarget
// The target is not valid or does not exist. It might not be configured for
-// EC2 Systems Manager or you might not have permission to perform the operation.
+// Systems Manager or you might not have permission to perform the operation.
//
-// * ErrCodeInvalidSchedule "InvalidSchedule"
+// * InvalidSchedule
// The schedule is invalid. Verify your cron or rate expression and try again.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateAssociationBatch
@@ -701,10 +712,11 @@ func (c *SSM) CreateDocumentRequest(input *CreateDocumentInput) (req *request.Re
// CreateDocument API operation for Amazon Simple Systems Manager (SSM).
//
-// Creates a Systems Manager document.
-//
-// After you create a document, you can use CreateAssociation to associate it
-// with one or more running instances.
+// Creates a Systems Manager (SSM) document. An SSM document defines the actions
+// that Systems Manager performs on your managed instances. For more information
+// about SSM documents, including information about supported schemas, features,
+// and syntax, see AWS Systems Manager Documents (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html)
+// in the AWS Systems Manager 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
@@ -713,23 +725,23 @@ func (c *SSM) CreateDocumentRequest(input *CreateDocumentInput) (req *request.Re
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation CreateDocument for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDocumentAlreadyExists "DocumentAlreadyExists"
+// Returned Error Types:
+// * DocumentAlreadyExists
// The specified document already exists.
//
-// * ErrCodeMaxDocumentSizeExceeded "MaxDocumentSizeExceeded"
+// * MaxDocumentSizeExceeded
// The size limit of a document is 64 KB.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocumentContent "InvalidDocumentContent"
+// * InvalidDocumentContent
// The content for the document is not valid.
//
-// * ErrCodeDocumentLimitExceeded "DocumentLimitExceeded"
+// * DocumentLimitExceeded
// You can have at most 500 active Systems Manager documents.
//
-// * ErrCodeInvalidDocumentSchemaVersion "InvalidDocumentSchemaVersion"
+// * InvalidDocumentSchemaVersion
// The version of the document schema is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateDocument
@@ -814,19 +826,20 @@ func (c *SSM) CreateMaintenanceWindowRequest(input *CreateMaintenanceWindowInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation CreateMaintenanceWindow for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch"
+// Returned Error Types:
+// * 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.
//
-// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
-// Error returned when the caller has exceeded the default resource limits.
+// * ResourceLimitExceededException
+// Error returned when the caller has exceeded the default resource quotas.
// For example, too many maintenance windows or patch baselines have been created.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateMaintenanceWindow
@@ -897,13 +910,13 @@ func (c *SSM) CreateOpsItemRequest(input *CreateOpsItemInput) (req *request.Requ
//
// Creates a new OpsItem. You must have permission in AWS Identity and Access
// Management (IAM) to create a new OpsItem. For more information, see Getting
-// Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html)
+// started with OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html)
// in the AWS Systems Manager User Guide.
//
// Operations engineers and IT professionals use OpsCenter to view, investigate,
// and remediate operational issues impacting the performance and health of
// their AWS resources. For more information, see AWS Systems Manager OpsCenter
-// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
+// (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
// in the AWS Systems Manager User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -913,18 +926,18 @@ func (c *SSM) CreateOpsItemRequest(input *CreateOpsItemInput) (req *request.Requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation CreateOpsItem for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeOpsItemAlreadyExistsException "OpsItemAlreadyExistsException"
+// * OpsItemAlreadyExistsException
// The OpsItem already exists.
//
-// * ErrCodeOpsItemLimitExceededException "OpsItemLimitExceededException"
-// The request caused OpsItems to exceed one or more limits. For information
-// about OpsItem limits, see What are the resource limits for OpsCenter? (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits).
+// * OpsItemLimitExceededException
+// The request caused OpsItems to exceed one or more quotas. For information
+// about OpsItem quotas, see What are the resource limits for OpsCenter? (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits).
//
-// * ErrCodeOpsItemInvalidParameterException "OpsItemInvalidParameterException"
+// * OpsItemInvalidParameterException
// A specified parameter argument isn't valid. Verify the available arguments
// and try again.
//
@@ -1006,19 +1019,20 @@ func (c *SSM) CreatePatchBaselineRequest(input *CreatePatchBaselineInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation CreatePatchBaseline for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch"
+// Returned Error Types:
+// * 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.
//
-// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
-// Error returned when the caller has exceeded the default resource limits.
+// * ResourceLimitExceededException
+// Error returned when the caller has exceeded the default resource quotas.
// For example, too many maintenance windows or patch baselines have been created.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreatePatchBaseline
@@ -1088,17 +1102,32 @@ func (c *SSM) CreateResourceDataSyncRequest(input *CreateResourceDataSyncInput)
// CreateResourceDataSync API operation for Amazon Simple Systems Manager (SSM).
//
-// 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.
+// A resource data sync helps you view data from multiple sources in a single
+// location. Systems Manager offers two types of resource data sync: SyncToDestination
+// and SyncFromSource.
+//
+// You can configure Systems Manager Inventory to use the SyncToDestination
+// type to synchronize Inventory data from multiple AWS Regions to a single
+// S3 bucket. For more information, see Configuring Resource Data Sync for Inventory
+// (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync.html)
+// in the AWS Systems Manager User Guide.
+//
+// You can configure Systems Manager Explorer to use the SyncFromSource type
+// to synchronize operational work items (OpsItems) and operational data (OpsData)
+// from multiple AWS Regions to a single S3 bucket. This type can synchronize
+// OpsItems and OpsData from multiple AWS accounts and Regions or EntireOrganization
+// by using AWS Organizations. For more information, see Setting up Systems
+// Manager Explorer to display data from multiple accounts and Regions (https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html)
+// in the AWS Systems Manager User Guide.
+//
+// A resource data sync is an asynchronous operation that returns immediately.
+// After a successful initial sync is completed, the system continuously syncs
+// data. To check the status of a 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
// recommend that you secure access to the Amazon S3 bucket by creating a restrictive
-// bucket policy. For more information, see Configuring Resource Data Sync for
-// Inventory (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync.html)
-// in the AWS Systems Manager User Guide.
+// bucket 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
@@ -1107,17 +1136,17 @@ func (c *SSM) CreateResourceDataSyncRequest(input *CreateResourceDataSyncInput)
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation CreateResourceDataSync for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeResourceDataSyncCountExceededException "ResourceDataSyncCountExceededException"
+// * ResourceDataSyncCountExceededException
// You have exceeded the allowed maximum sync configurations.
//
-// * ErrCodeResourceDataSyncAlreadyExistsException "ResourceDataSyncAlreadyExistsException"
+// * ResourceDataSyncAlreadyExistsException
// A sync configuration with the same name already exists.
//
-// * ErrCodeResourceDataSyncInvalidConfigurationException "ResourceDataSyncInvalidConfigurationException"
+// * ResourceDataSyncInvalidConfigurationException
// The specified sync configuration is invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateResourceDataSync
@@ -1199,19 +1228,19 @@ func (c *SSM) DeleteActivationRequest(input *DeleteActivationInput) (req *reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeleteActivation for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidActivationId "InvalidActivationId"
+// Returned Error Types:
+// * InvalidActivationId
// The activation ID is not valid. Verify the you entered the correct ActivationId
// or ActivationCode and try again.
//
-// * ErrCodeInvalidActivation "InvalidActivation"
+// * InvalidActivation
// The activation is not valid. The activation might have been deleted, or the
// ActivationId and the ActivationCode do not match.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeTooManyUpdates "TooManyUpdates"
+// * TooManyUpdates
// There are concurrent updates for a resource that supports one update at a
// time.
//
@@ -1296,17 +1325,17 @@ func (c *SSM) DeleteAssociationRequest(input *DeleteAssociationInput) (req *requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeleteAssociation for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist"
+// Returned Error Types:
+// * AssociationDoesNotExist
// The specified association does not exist.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -1318,7 +1347,7 @@ func (c *SSM) DeleteAssociationRequest(input *DeleteAssociationInput) (req *requ
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeTooManyUpdates "TooManyUpdates"
+// * TooManyUpdates
// There are concurrent updates for a resource that supports one update at a
// time.
//
@@ -1402,18 +1431,18 @@ func (c *SSM) DeleteDocumentRequest(input *DeleteDocumentInput) (req *request.Re
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeleteDocument for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidDocumentOperation "InvalidDocumentOperation"
+// * InvalidDocumentOperation
// You attempted to delete a document while it is still shared. You must stop
// sharing the document before you can delete it.
//
-// * ErrCodeAssociatedInstances "AssociatedInstances"
+// * AssociatedInstances
// You must disassociate a document from all instances before you can delete
// it.
//
@@ -1494,22 +1523,22 @@ func (c *SSM) DeleteInventoryRequest(input *DeleteInventoryInput) (req *request.
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeleteInventory for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidTypeNameException "InvalidTypeNameException"
+// * InvalidTypeNameException
// The parameter type name is not valid.
//
-// * ErrCodeInvalidOptionException "InvalidOptionException"
+// * InvalidOptionException
// The delete inventory option specified is not valid. Verify the option and
// try again.
//
-// * ErrCodeInvalidDeleteInventoryParametersException "InvalidDeleteInventoryParametersException"
+// * InvalidDeleteInventoryParametersException
// One or more of the parameters specified for the delete operation is not valid.
// Verify all parameters and try again.
//
-// * ErrCodeInvalidInventoryRequestException "InvalidInventoryRequestException"
+// * InvalidInventoryRequestException
// The request is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteInventory
@@ -1587,8 +1616,8 @@ func (c *SSM) DeleteMaintenanceWindowRequest(input *DeleteMaintenanceWindowInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeleteMaintenanceWindow for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteMaintenanceWindow
@@ -1667,11 +1696,11 @@ func (c *SSM) DeleteParameterRequest(input *DeleteParameterInput) (req *request.
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeleteParameter for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeParameterNotFound "ParameterNotFound"
+// * ParameterNotFound
// The parameter could not be found. Verify the name and try again.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteParameter
@@ -1749,8 +1778,8 @@ func (c *SSM) DeleteParametersRequest(input *DeleteParametersInput) (req *reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeleteParameters for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteParameters
@@ -1828,12 +1857,12 @@ func (c *SSM) DeletePatchBaselineRequest(input *DeletePatchBaselineInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeletePatchBaseline for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeResourceInUseException "ResourceInUseException"
+// Returned Error Types:
+// * ResourceInUseException
// Error returned if an attempt is made to delete a patch baseline that is registered
// for a patch group.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeletePatchBaseline
@@ -1904,9 +1933,8 @@ func (c *SSM) DeleteResourceDataSyncRequest(input *DeleteResourceDataSyncInput)
// DeleteResourceDataSync API operation for Amazon Simple Systems Manager (SSM).
//
// Deletes a Resource Data Sync configuration. After the configuration is deleted,
-// changes to inventory data on managed instances are no longer synced with
-// the target Amazon S3 bucket. Deleting a sync configuration does not delete
-// data in the target Amazon S3 bucket.
+// changes to data on managed instances are no longer synced to or from the
+// target. Deleting a sync configuration does not delete data.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -1915,13 +1943,16 @@ func (c *SSM) DeleteResourceDataSyncRequest(input *DeleteResourceDataSyncInput)
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeleteResourceDataSync for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeResourceDataSyncNotFoundException "ResourceDataSyncNotFoundException"
+// * ResourceDataSyncNotFoundException
// The specified sync name was not found.
//
+// * ResourceDataSyncInvalidConfigurationException
+// The specified sync configuration is invalid.
+//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteResourceDataSync
func (c *SSM) DeleteResourceDataSync(input *DeleteResourceDataSyncInput) (*DeleteResourceDataSyncOutput, error) {
req, out := c.DeleteResourceDataSyncRequest(input)
@@ -2000,8 +2031,8 @@ func (c *SSM) DeregisterManagedInstanceRequest(input *DeregisterManagedInstanceI
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeregisterManagedInstance for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// Returned Error Types:
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -2013,7 +2044,7 @@ func (c *SSM) DeregisterManagedInstanceRequest(input *DeregisterManagedInstanceI
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterManagedInstance
@@ -2091,12 +2122,12 @@ func (c *SSM) DeregisterPatchBaselineForPatchGroupRequest(input *DeregisterPatch
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeregisterPatchBaselineForPatchGroup for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidResourceId "InvalidResourceId"
+// Returned Error Types:
+// * InvalidResourceId
// The resource ID is not valid. Verify that you entered the correct ID and
// try again.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterPatchBaselineForPatchGroup
@@ -2174,18 +2205,19 @@ func (c *SSM) DeregisterTargetFromMaintenanceWindowRequest(input *DeregisterTarg
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeregisterTargetFromMaintenanceWindow for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeTargetInUseException "TargetInUseException"
+// * TargetInUseException
// You specified the Safe option for the DeregisterTargetFromMaintenanceWindow
// operation, but the target is still referenced in a task.
//
@@ -2264,15 +2296,16 @@ func (c *SSM) DeregisterTaskFromMaintenanceWindowRequest(input *DeregisterTaskFr
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DeregisterTaskFromMaintenanceWindow for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterTaskFromMaintenanceWindow
@@ -2358,15 +2391,15 @@ func (c *SSM) DescribeActivationsRequest(input *DescribeActivationsInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeActivations for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidFilter "InvalidFilter"
+// Returned Error Types:
+// * InvalidFilter
// The filter name is not valid. Verify the you entered the correct name and
// try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeActivations
@@ -2434,10 +2467,12 @@ func (c *SSM) DescribeActivationsPagesWithContext(ctx aws.Context, input *Descri
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeActivationsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*DescribeActivationsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -2498,22 +2533,22 @@ func (c *SSM) DescribeAssociationRequest(input *DescribeAssociationInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeAssociation for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist"
+// Returned Error Types:
+// * AssociationDoesNotExist
// The specified association does not exist.
//
-// * ErrCodeInvalidAssociationVersion "InvalidAssociationVersion"
+// * InvalidAssociationVersion
// The version you specified is not valid. Use ListAssociationVersions to view
// all versions of an association according to the association ID. Or, use the
// $LATEST parameter to view the latest version of the association.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -2601,17 +2636,17 @@ func (c *SSM) DescribeAssociationExecutionTargetsRequest(input *DescribeAssociat
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeAssociationExecutionTargets for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist"
+// * AssociationDoesNotExist
// The specified association does not exist.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeAssociationExecutionDoesNotExist "AssociationExecutionDoesNotExist"
+// * AssociationExecutionDoesNotExist
// The specified execution ID does not exist. Verify the ID number and try again.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutionTargets
@@ -2689,14 +2724,14 @@ func (c *SSM) DescribeAssociationExecutionsRequest(input *DescribeAssociationExe
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeAssociationExecutions for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist"
+// * AssociationDoesNotExist
// The specified association does not exist.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutions
@@ -2774,17 +2809,17 @@ func (c *SSM) DescribeAutomationExecutionsRequest(input *DescribeAutomationExecu
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeAutomationExecutions for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidFilterKey "InvalidFilterKey"
+// Returned Error Types:
+// * InvalidFilterKey
// The specified key is not valid.
//
-// * ErrCodeInvalidFilterValue "InvalidFilterValue"
+// * InvalidFilterValue
// The filter value is not valid. Verify the value and try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAutomationExecutions
@@ -2863,21 +2898,21 @@ func (c *SSM) DescribeAutomationStepExecutionsRequest(input *DescribeAutomationS
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeAutomationStepExecutions for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeAutomationExecutionNotFoundException "AutomationExecutionNotFoundException"
+// Returned Error Types:
+// * AutomationExecutionNotFoundException
// There is no automation execution information for the requested automation
// execution ID.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInvalidFilterKey "InvalidFilterKey"
+// * InvalidFilterKey
// The specified key is not valid.
//
-// * ErrCodeInvalidFilterValue "InvalidFilterValue"
+// * InvalidFilterValue
// The filter value is not valid. Verify the value and try again.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAutomationStepExecutions
@@ -2955,8 +2990,8 @@ func (c *SSM) DescribeAvailablePatchesRequest(input *DescribeAvailablePatchesInp
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeAvailablePatches for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAvailablePatches
@@ -3034,14 +3069,14 @@ func (c *SSM) DescribeDocumentRequest(input *DescribeDocumentInput) (req *reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeDocument for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion"
+// * InvalidDocumentVersion
// The document version is not valid or does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeDocument
@@ -3121,14 +3156,14 @@ func (c *SSM) DescribeDocumentPermissionRequest(input *DescribeDocumentPermissio
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeDocumentPermission for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidPermissionType "InvalidPermissionType"
+// * InvalidPermissionType
// The permission type is not supported. Share is the only supported permission
// type.
//
@@ -3207,11 +3242,11 @@ func (c *SSM) DescribeEffectiveInstanceAssociationsRequest(input *DescribeEffect
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeEffectiveInstanceAssociations for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -3223,7 +3258,7 @@ func (c *SSM) DescribeEffectiveInstanceAssociationsRequest(input *DescribeEffect
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeEffectiveInstanceAssociations
@@ -3303,24 +3338,25 @@ func (c *SSM) DescribeEffectivePatchesForPatchBaselineRequest(input *DescribeEff
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeEffectivePatchesForPatchBaseline for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidResourceId "InvalidResourceId"
+// Returned Error Types:
+// * InvalidResourceId
// The resource ID is not valid. Verify that you entered the correct ID and
// try again.
//
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeUnsupportedOperatingSystem "UnsupportedOperatingSystem"
+// * UnsupportedOperatingSystem
// The operating systems you specified is not supported, or the operation is
// not supported for the operating system. Valid operating systems include:
// Windows, AmazonLinux, RedhatEnterpriseLinux, and Ubuntu.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeEffectivePatchesForPatchBaseline
@@ -3398,11 +3434,11 @@ func (c *SSM) DescribeInstanceAssociationsStatusRequest(input *DescribeInstanceA
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeInstanceAssociationsStatus for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -3414,7 +3450,7 @@ func (c *SSM) DescribeInstanceAssociationsStatusRequest(input *DescribeInstanceA
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceAssociationsStatus
@@ -3489,16 +3525,18 @@ func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformat
// DescribeInstanceInformation API operation for Amazon Simple Systems Manager (SSM).
//
-// Describes one or more of your instances. You can use this to get information
-// about instances like the operating system platform, the SSM Agent version
-// (Linux), status etc. If you specify one or more instance IDs, it returns
-// information for those instances. If you do not specify instance IDs, it returns
-// information for all your instances. If you specify an instance ID that is
-// not valid or an instance that you do not own, you receive an error.
+// Describes one or more of your instances, including information about the
+// operating system platform, the version of SSM Agent installed on the instance,
+// instance status, and so on.
+//
+// If you specify one or more instance IDs, it returns information for those
+// instances. If you do not specify instance IDs, it returns information for
+// all your instances. If you specify an instance ID that is not valid or an
+// instance that you do not own, you receive an error.
//
// The IamRole field for this API action is the Amazon Identity and Access Management
// (IAM) role assigned to on-premises instances. This call does not return the
-// IAM role for Amazon EC2 instances.
+// IAM role for EC2 instances.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -3507,11 +3545,11 @@ func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformat
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeInstanceInformation for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -3523,13 +3561,13 @@ func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformat
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInvalidInstanceInformationFilterValue "InvalidInstanceInformationFilterValue"
+// * InvalidInstanceInformationFilterValue
// The specified filter value is not valid.
//
-// * ErrCodeInvalidFilterKey "InvalidFilterKey"
+// * InvalidFilterKey
// The specified key is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceInformation
@@ -3597,10 +3635,12 @@ func (c *SSM) DescribeInstanceInformationPagesWithContext(ctx aws.Context, input
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeInstanceInformationOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*DescribeInstanceInformationOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -3657,11 +3697,11 @@ func (c *SSM) DescribeInstancePatchStatesRequest(input *DescribeInstancePatchSta
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeInstancePatchStates for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatchStates
@@ -3740,15 +3780,15 @@ func (c *SSM) DescribeInstancePatchStatesForPatchGroupRequest(input *DescribeIns
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeInstancePatchStatesForPatchGroup for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidFilter "InvalidFilter"
+// * InvalidFilter
// The filter name is not valid. Verify the you entered the correct name and
// try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatchStatesForPatchGroup
@@ -3827,11 +3867,11 @@ func (c *SSM) DescribeInstancePatchesRequest(input *DescribeInstancePatchesInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeInstancePatches for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -3843,11 +3883,11 @@ func (c *SSM) DescribeInstancePatchesRequest(input *DescribeInstancePatchesInput
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidFilter "InvalidFilter"
+// * InvalidFilter
// The filter name is not valid. Verify the you entered the correct name and
// try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatches
@@ -3925,15 +3965,15 @@ func (c *SSM) DescribeInventoryDeletionsRequest(input *DescribeInventoryDeletion
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeInventoryDeletions for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDeletionIdException "InvalidDeletionIdException"
+// * InvalidDeletionIdException
// The ID specified for the delete operation does not exist or is not valid.
// Verify the ID and try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInventoryDeletions
@@ -4012,15 +4052,16 @@ func (c *SSM) DescribeMaintenanceWindowExecutionTaskInvocationsRequest(input *De
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeMaintenanceWindowExecutionTaskInvocations for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutionTaskInvocations
@@ -4098,15 +4139,16 @@ func (c *SSM) DescribeMaintenanceWindowExecutionTasksRequest(input *DescribeMain
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeMaintenanceWindowExecutionTasks for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutionTasks
@@ -4186,8 +4228,8 @@ func (c *SSM) DescribeMaintenanceWindowExecutionsRequest(input *DescribeMaintena
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeMaintenanceWindowExecutions for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutions
@@ -4265,16 +4307,17 @@ func (c *SSM) DescribeMaintenanceWindowScheduleRequest(input *DescribeMaintenanc
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeMaintenanceWindowSchedule for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowSchedule
func (c *SSM) DescribeMaintenanceWindowSchedule(input *DescribeMaintenanceWindowScheduleInput) (*DescribeMaintenanceWindowScheduleOutput, error) {
@@ -4351,15 +4394,16 @@ func (c *SSM) DescribeMaintenanceWindowTargetsRequest(input *DescribeMaintenance
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeMaintenanceWindowTargets for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowTargets
@@ -4437,15 +4481,16 @@ func (c *SSM) DescribeMaintenanceWindowTasksRequest(input *DescribeMaintenanceWi
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeMaintenanceWindowTasks for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowTasks
@@ -4523,8 +4568,8 @@ func (c *SSM) DescribeMaintenanceWindowsRequest(input *DescribeMaintenanceWindow
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeMaintenanceWindows for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindows
@@ -4603,8 +4648,8 @@ func (c *SSM) DescribeMaintenanceWindowsForTargetRequest(input *DescribeMaintena
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeMaintenanceWindowsForTarget for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowsForTarget
@@ -4675,13 +4720,13 @@ func (c *SSM) DescribeOpsItemsRequest(input *DescribeOpsItemsInput) (req *reques
//
// Query a set of OpsItems. You must have permission in AWS Identity and Access
// Management (IAM) to query a list of OpsItems. For more information, see Getting
-// Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html)
+// started with OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html)
// in the AWS Systems Manager User Guide.
//
// Operations engineers and IT professionals use OpsCenter to view, investigate,
// and remediate operational issues impacting the performance and health of
// their AWS resources. For more information, see AWS Systems Manager OpsCenter
-// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
+// (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
// in the AWS Systems Manager User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -4691,8 +4736,8 @@ func (c *SSM) DescribeOpsItemsRequest(input *DescribeOpsItemsInput) (req *reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeOpsItems for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeOpsItems
@@ -4784,21 +4829,21 @@ func (c *SSM) DescribeParametersRequest(input *DescribeParametersInput) (req *re
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeParameters for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidFilterKey "InvalidFilterKey"
+// * InvalidFilterKey
// The specified key is not valid.
//
-// * ErrCodeInvalidFilterOption "InvalidFilterOption"
+// * InvalidFilterOption
// The specified filter option is not valid. Valid options are Equals and BeginsWith.
// For Path filter, valid options are Recursive and OneLevel.
//
-// * ErrCodeInvalidFilterValue "InvalidFilterValue"
+// * InvalidFilterValue
// The filter value is not valid. Verify the value and try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeParameters
@@ -4866,10 +4911,12 @@ func (c *SSM) DescribeParametersPagesWithContext(ctx aws.Context, input *Describ
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeParametersOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*DescribeParametersOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -4926,8 +4973,8 @@ func (c *SSM) DescribePatchBaselinesRequest(input *DescribePatchBaselinesInput)
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribePatchBaselines for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchBaselines
@@ -5005,11 +5052,11 @@ func (c *SSM) DescribePatchGroupStateRequest(input *DescribePatchGroupStateInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribePatchGroupState for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchGroupState
@@ -5087,8 +5134,8 @@ func (c *SSM) DescribePatchGroupsRequest(input *DescribePatchGroupsInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribePatchGroups for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchGroups
@@ -5201,8 +5248,8 @@ func (c *SSM) DescribePatchPropertiesRequest(input *DescribePatchPropertiesInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribePatchProperties for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchProperties
@@ -5281,14 +5328,14 @@ func (c *SSM) DescribeSessionsRequest(input *DescribeSessionsInput) (req *reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation DescribeSessions for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidFilterKey "InvalidFilterKey"
+// * InvalidFilterKey
// The specified key is not valid.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeSessions
@@ -5366,12 +5413,12 @@ func (c *SSM) GetAutomationExecutionRequest(input *GetAutomationExecutionInput)
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetAutomationExecution for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeAutomationExecutionNotFoundException "AutomationExecutionNotFoundException"
+// Returned Error Types:
+// * AutomationExecutionNotFoundException
// There is no automation execution information for the requested automation
// execution ID.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetAutomationExecution
@@ -5396,6 +5443,103 @@ func (c *SSM) GetAutomationExecutionWithContext(ctx aws.Context, input *GetAutom
return out, req.Send()
}
+const opGetCalendarState = "GetCalendarState"
+
+// GetCalendarStateRequest generates a "aws/request.Request" representing the
+// client's request for the GetCalendarState operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See GetCalendarState for more information on using the GetCalendarState
+// 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 GetCalendarStateRequest method.
+// req, resp := client.GetCalendarStateRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetCalendarState
+func (c *SSM) GetCalendarStateRequest(input *GetCalendarStateInput) (req *request.Request, output *GetCalendarStateOutput) {
+ op := &request.Operation{
+ Name: opGetCalendarState,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &GetCalendarStateInput{}
+ }
+
+ output = &GetCalendarStateOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// GetCalendarState API operation for Amazon Simple Systems Manager (SSM).
+//
+// Gets the state of the AWS Systems Manager Change Calendar at an optional,
+// specified time. If you specify a time, GetCalendarState returns the state
+// of the calendar at a specific time, and returns the next time that the Change
+// Calendar state will transition. If you do not specify a time, GetCalendarState
+// assumes the current time. Change Calendar entries have two possible states:
+// OPEN or CLOSED. For more information about Systems Manager Change Calendar,
+// see AWS Systems Manager Change Calendar (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar.html)
+// in the AWS Systems Manager 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 Simple Systems Manager (SSM)'s
+// API operation GetCalendarState for usage and error information.
+//
+// Returned Error Types:
+// * InternalServerError
+// An error occurred on the server side.
+//
+// * InvalidDocument
+// The specified document does not exist.
+//
+// * InvalidDocumentType
+// The document type is not valid. Valid document types are described in the
+// DocumentType property.
+//
+// * UnsupportedCalendarException
+// The calendar entry contained in the specified Systems Manager document is
+// not supported.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetCalendarState
+func (c *SSM) GetCalendarState(input *GetCalendarStateInput) (*GetCalendarStateOutput, error) {
+ req, out := c.GetCalendarStateRequest(input)
+ return out, req.Send()
+}
+
+// GetCalendarStateWithContext is the same as GetCalendarState with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetCalendarState 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 *SSM) GetCalendarStateWithContext(ctx aws.Context, input *GetCalendarStateInput, opts ...request.Option) (*GetCalendarStateOutput, error) {
+ req, out := c.GetCalendarStateRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opGetCommandInvocation = "GetCommandInvocation"
// GetCommandInvocationRequest generates a "aws/request.Request" representing the
@@ -5450,13 +5594,13 @@ func (c *SSM) GetCommandInvocationRequest(input *GetCommandInvocationInput) (req
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetCommandInvocation for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidCommandId "InvalidCommandId"
+// * InvalidCommandId
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -5468,10 +5612,10 @@ func (c *SSM) GetCommandInvocationRequest(input *GetCommandInvocationInput) (req
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidPluginName "InvalidPluginName"
+// * InvalidPluginName
// The plugin name is not valid.
//
-// * ErrCodeInvocationDoesNotExist "InvocationDoesNotExist"
+// * InvocationDoesNotExist
// The command ID and instance ID you specified did not match any invocations.
// Verify the command ID and the instance ID and try again.
//
@@ -5542,7 +5686,7 @@ func (c *SSM) GetConnectionStatusRequest(input *GetConnectionStatusInput) (req *
// GetConnectionStatus API operation for Amazon Simple Systems Manager (SSM).
//
// Retrieves the Session Manager connection status for an instance to determine
-// whether it is connected and ready to receive Session Manager connections.
+// whether it is running and ready to receive Session Manager 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
@@ -5551,8 +5695,8 @@ func (c *SSM) GetConnectionStatusRequest(input *GetConnectionStatusInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetConnectionStatus for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetConnectionStatus
@@ -5635,8 +5779,8 @@ func (c *SSM) GetDefaultPatchBaselineRequest(input *GetDefaultPatchBaselineInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetDefaultPatchBaseline for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDefaultPatchBaseline
@@ -5715,20 +5859,20 @@ func (c *SSM) GetDeployablePatchSnapshotForInstanceRequest(input *GetDeployableP
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetDeployablePatchSnapshotForInstance for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeUnsupportedOperatingSystem "UnsupportedOperatingSystem"
+// * UnsupportedOperatingSystem
// The operating systems you specified is not supported, or the operation is
// not supported for the operating system. Valid operating systems include:
// Windows, AmazonLinux, RedhatEnterpriseLinux, and Ubuntu.
//
-// * ErrCodeUnsupportedFeatureRequiredException "UnsupportedFeatureRequiredException"
-// Microsoft application patching is only available on EC2 instances and Advanced
-// Instances. To patch Microsoft applications on on-premises servers and VMs,
-// you must enable Advanced Instances. For more information, see Using the Advanced-Instances
-// Tier (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html)
+// * UnsupportedFeatureRequiredException
+// Microsoft application patching is only available on EC2 instances and advanced
+// instances. To patch Microsoft applications on on-premises servers and VMs,
+// you must enable advanced instances. For more information, see Using the advanced-instances
+// tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html)
// in the AWS Systems Manager User Guide.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDeployablePatchSnapshotForInstance
@@ -5806,14 +5950,14 @@ func (c *SSM) GetDocumentRequest(input *GetDocumentInput) (req *request.Request,
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetDocument for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion"
+// * InvalidDocumentVersion
// The document version is not valid or does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDocument
@@ -5891,28 +6035,28 @@ func (c *SSM) GetInventoryRequest(input *GetInventoryInput) (req *request.Reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetInventory for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidFilter "InvalidFilter"
+// * InvalidFilter
// The filter name is not valid. Verify the you entered the correct name and
// try again.
//
-// * ErrCodeInvalidInventoryGroupException "InvalidInventoryGroupException"
+// * InvalidInventoryGroupException
// The specified inventory group is not valid.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInvalidTypeNameException "InvalidTypeNameException"
+// * InvalidTypeNameException
// The parameter type name is not valid.
//
-// * ErrCodeInvalidAggregatorException "InvalidAggregatorException"
+// * InvalidAggregatorException
// The specified aggregator is not valid for inventory groups. Verify that the
// aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation.
//
-// * ErrCodeInvalidResultAttributeException "InvalidResultAttributeException"
+// * InvalidResultAttributeException
// The specified inventory item result attribute is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetInventory
@@ -5991,14 +6135,14 @@ func (c *SSM) GetInventorySchemaRequest(input *GetInventorySchemaInput) (req *re
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetInventorySchema for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidTypeNameException "InvalidTypeNameException"
+// * InvalidTypeNameException
// The parameter type name is not valid.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetInventorySchema
@@ -6076,15 +6220,16 @@ func (c *SSM) GetMaintenanceWindowRequest(input *GetMaintenanceWindowInput) (req
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetMaintenanceWindow for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindow
@@ -6162,15 +6307,16 @@ func (c *SSM) GetMaintenanceWindowExecutionRequest(input *GetMaintenanceWindowEx
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetMaintenanceWindowExecution for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecution
@@ -6249,15 +6395,16 @@ func (c *SSM) GetMaintenanceWindowExecutionTaskRequest(input *GetMaintenanceWind
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetMaintenanceWindowExecutionTask for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecutionTask
@@ -6335,15 +6482,16 @@ func (c *SSM) GetMaintenanceWindowExecutionTaskInvocationRequest(input *GetMaint
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetMaintenanceWindowExecutionTaskInvocation for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecutionTaskInvocation
@@ -6421,15 +6569,16 @@ func (c *SSM) GetMaintenanceWindowTaskRequest(input *GetMaintenanceWindowTaskInp
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetMaintenanceWindowTask for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowTask
@@ -6500,13 +6649,13 @@ func (c *SSM) GetOpsItemRequest(input *GetOpsItemInput) (req *request.Request, o
//
// Get information about an OpsItem by using the ID. You must have permission
// in AWS Identity and Access Management (IAM) to view information about an
-// OpsItem. For more information, see Getting Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html)
+// OpsItem. For more information, see Getting started with OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html)
// in the AWS Systems Manager User Guide.
//
// Operations engineers and IT professionals use OpsCenter to view, investigate,
// and remediate operational issues impacting the performance and health of
// their AWS resources. For more information, see AWS Systems Manager OpsCenter
-// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
+// (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
// in the AWS Systems Manager User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -6516,11 +6665,11 @@ func (c *SSM) GetOpsItemRequest(input *GetOpsItemInput) (req *request.Request, o
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetOpsItem for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeOpsItemNotFoundException "OpsItemNotFoundException"
+// * OpsItemNotFoundException
// The specified OpsItem ID doesn't exist. Verify the ID and try again.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsItem
@@ -6598,21 +6747,24 @@ func (c *SSM) GetOpsSummaryRequest(input *GetOpsSummaryInput) (req *request.Requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetOpsSummary for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidFilter "InvalidFilter"
+// * ResourceDataSyncNotFoundException
+// The specified sync name was not found.
+//
+// * InvalidFilter
// The filter name is not valid. Verify the you entered the correct name and
// try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInvalidTypeNameException "InvalidTypeNameException"
+// * InvalidTypeNameException
// The parameter type name is not valid.
//
-// * ErrCodeInvalidAggregatorException "InvalidAggregatorException"
+// * InvalidAggregatorException
// The specified aggregator is not valid for inventory groups. Verify that the
// aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation.
//
@@ -6692,17 +6844,17 @@ func (c *SSM) GetParameterRequest(input *GetParameterInput) (req *request.Reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetParameter for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidKeyId "InvalidKeyId"
+// * InvalidKeyId
// The query key ID is not valid.
//
-// * ErrCodeParameterNotFound "ParameterNotFound"
+// * ParameterNotFound
// The parameter could not be found. Verify the name and try again.
//
-// * ErrCodeParameterVersionNotFound "ParameterVersionNotFound"
+// * ParameterVersionNotFound
// The specified parameter version was not found. Verify the parameter name
// and version, and try again.
//
@@ -6787,17 +6939,17 @@ func (c *SSM) GetParameterHistoryRequest(input *GetParameterHistoryInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetParameterHistory for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeParameterNotFound "ParameterNotFound"
+// * ParameterNotFound
// The parameter could not be found. Verify the name and try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInvalidKeyId "InvalidKeyId"
+// * InvalidKeyId
// The query key ID is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameterHistory
@@ -6865,10 +7017,12 @@ func (c *SSM) GetParameterHistoryPagesWithContext(ctx aws.Context, input *GetPar
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*GetParameterHistoryOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*GetParameterHistoryOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -6926,11 +7080,11 @@ func (c *SSM) GetParametersRequest(input *GetParametersInput) (req *request.Requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetParameters for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidKeyId "InvalidKeyId"
+// Returned Error Types:
+// * InvalidKeyId
// The query key ID is not valid.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameters
@@ -7005,9 +7159,7 @@ func (c *SSM) GetParametersByPathRequest(input *GetParametersByPathInput) (req *
// GetParametersByPath API operation for Amazon Simple Systems Manager (SSM).
//
-// Retrieve parameters in a specific hierarchy. For more information, see Working
-// with Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html)
-// in the AWS Systems Manager User Guide.
+// Retrieve information about one or more parameters in a specific hierarchy.
//
// Request results are returned on a best-effort basis. If you specify MaxResults
// in the request, the response includes information up to the limit specified.
@@ -7017,8 +7169,6 @@ func (c *SSM) GetParametersByPathRequest(input *GetParametersByPathInput) (req *
// that point and a NextToken. You can specify the NextToken in a subsequent
// call to get the next set of results.
//
-// This API action doesn't support filtering by tags.
-//
// Returns awserr.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.
@@ -7026,24 +7176,24 @@ func (c *SSM) GetParametersByPathRequest(input *GetParametersByPathInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetParametersByPath for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidFilterKey "InvalidFilterKey"
+// * InvalidFilterKey
// The specified key is not valid.
//
-// * ErrCodeInvalidFilterOption "InvalidFilterOption"
+// * InvalidFilterOption
// The specified filter option is not valid. Valid options are Equals and BeginsWith.
// For Path filter, valid options are Recursive and OneLevel.
//
-// * ErrCodeInvalidFilterValue "InvalidFilterValue"
+// * InvalidFilterValue
// The filter value is not valid. Verify the value and try again.
//
-// * ErrCodeInvalidKeyId "InvalidKeyId"
+// * InvalidKeyId
// The query key ID is not valid.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParametersByPath
@@ -7111,10 +7261,12 @@ func (c *SSM) GetParametersByPathPagesWithContext(ctx aws.Context, input *GetPar
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*GetParametersByPathOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*GetParametersByPathOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -7171,19 +7323,20 @@ func (c *SSM) GetPatchBaselineRequest(input *GetPatchBaselineInput) (req *reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetPatchBaseline for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInvalidResourceId "InvalidResourceId"
+// * InvalidResourceId
// The resource ID is not valid. Verify that you entered the correct ID and
// try again.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetPatchBaseline
@@ -7262,8 +7415,8 @@ func (c *SSM) GetPatchBaselineForPatchGroupRequest(input *GetPatchBaselineForPat
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetPatchBaselineForPatchGroup for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetPatchBaselineForPatchGroup
@@ -7355,11 +7508,11 @@ func (c *SSM) GetServiceSettingRequest(input *GetServiceSettingInput) (req *requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation GetServiceSetting for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeServiceSettingNotFound "ServiceSettingNotFound"
+// * ServiceSettingNotFound
// The specified service setting was not found. Either the service name or the
// setting has not been provisioned by the AWS service team.
//
@@ -7466,22 +7619,22 @@ func (c *SSM) LabelParameterVersionRequest(input *LabelParameterVersionInput) (r
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation LabelParameterVersion for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeTooManyUpdates "TooManyUpdates"
+// * TooManyUpdates
// There are concurrent updates for a resource that supports one update at a
// time.
//
-// * ErrCodeParameterNotFound "ParameterNotFound"
+// * ParameterNotFound
// The parameter could not be found. Verify the name and try again.
//
-// * ErrCodeParameterVersionNotFound "ParameterVersionNotFound"
+// * ParameterVersionNotFound
// The specified parameter version was not found. Verify the parameter name
// and version, and try again.
//
-// * ErrCodeParameterVersionLabelLimitExceeded "ParameterVersionLabelLimitExceeded"
+// * ParameterVersionLabelLimitExceeded
// A parameter version can have a maximum of ten labels.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/LabelParameterVersion
@@ -7559,14 +7712,14 @@ func (c *SSM) ListAssociationVersionsRequest(input *ListAssociationVersionsInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListAssociationVersions for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist"
+// * AssociationDoesNotExist
// The specified association does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListAssociationVersions
@@ -7641,7 +7794,9 @@ func (c *SSM) ListAssociationsRequest(input *ListAssociationsInput) (req *reques
// ListAssociations API operation for Amazon Simple Systems Manager (SSM).
//
-// Lists the associations for the specified Systems Manager document or instance.
+// Returns all State Manager associations in the current AWS account and Region.
+// You can limit the results to a specific State Manager association document
+// or instance by specifying a filter.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -7650,11 +7805,11 @@ func (c *SSM) ListAssociationsRequest(input *ListAssociationsInput) (req *reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListAssociations for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListAssociations
@@ -7722,10 +7877,12 @@ func (c *SSM) ListAssociationsPagesWithContext(ctx aws.Context, input *ListAssoc
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListAssociationsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListAssociationsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -7792,13 +7949,13 @@ func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput)
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListCommandInvocations for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidCommandId "InvalidCommandId"
+// * InvalidCommandId
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -7810,10 +7967,10 @@ func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput)
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidFilterKey "InvalidFilterKey"
+// * InvalidFilterKey
// The specified key is not valid.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommandInvocations
@@ -7881,10 +8038,12 @@ func (c *SSM) ListCommandInvocationsPagesWithContext(ctx aws.Context, input *Lis
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListCommandInvocationsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListCommandInvocationsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -7947,13 +8106,13 @@ func (c *SSM) ListCommandsRequest(input *ListCommandsInput) (req *request.Reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListCommands for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidCommandId "InvalidCommandId"
+// * InvalidCommandId
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -7965,10 +8124,10 @@ func (c *SSM) ListCommandsRequest(input *ListCommandsInput) (req *request.Reques
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidFilterKey "InvalidFilterKey"
+// * InvalidFilterKey
// The specified key is not valid.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommands
@@ -8036,10 +8195,12 @@ func (c *SSM) ListCommandsPagesWithContext(ctx aws.Context, input *ListCommandsI
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListCommandsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListCommandsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -8099,23 +8260,23 @@ func (c *SSM) ListComplianceItemsRequest(input *ListComplianceItemsInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListComplianceItems for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidResourceType "InvalidResourceType"
+// Returned Error Types:
+// * InvalidResourceType
// 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"
+// * InvalidResourceId
// The resource ID is not valid. Verify that you entered the correct ID and
// try again.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidFilter "InvalidFilter"
+// * InvalidFilter
// The filter name is not valid. Verify the you entered the correct name and
// try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListComplianceItems
@@ -8195,15 +8356,15 @@ func (c *SSM) ListComplianceSummariesRequest(input *ListComplianceSummariesInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListComplianceSummaries for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidFilter "InvalidFilter"
+// Returned Error Types:
+// * InvalidFilter
// The filter name is not valid. Verify the you entered the correct name and
// try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListComplianceSummaries
@@ -8281,14 +8442,14 @@ func (c *SSM) ListDocumentVersionsRequest(input *ListDocumentVersionsInput) (req
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListDocumentVersions for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocumentVersions
@@ -8363,7 +8524,8 @@ func (c *SSM) ListDocumentsRequest(input *ListDocumentsInput) (req *request.Requ
// ListDocuments API operation for Amazon Simple Systems Manager (SSM).
//
-// Describes one or more of your Systems Manager documents.
+// Returns all Systems Manager (SSM) documents in the current AWS account and
+// Region. You can limit the results of this request by using a filter.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -8372,14 +8534,14 @@ func (c *SSM) ListDocumentsRequest(input *ListDocumentsInput) (req *request.Requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListDocuments for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInvalidFilterKey "InvalidFilterKey"
+// * InvalidFilterKey
// The specified key is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocuments
@@ -8447,10 +8609,12 @@ func (c *SSM) ListDocumentsPagesWithContext(ctx aws.Context, input *ListDocument
},
}
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListDocumentsOutput), !p.HasNextPage())
+ for p.Next() {
+ if !fn(p.Page().(*ListDocumentsOutput), !p.HasNextPage()) {
+ break
+ }
}
+
return p.Err()
}
@@ -8507,11 +8671,11 @@ func (c *SSM) ListInventoryEntriesRequest(input *ListInventoryEntriesInput) (req
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListInventoryEntries for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -8523,14 +8687,14 @@ func (c *SSM) ListInventoryEntriesRequest(input *ListInventoryEntriesInput) (req
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidTypeNameException "InvalidTypeNameException"
+// * InvalidTypeNameException
// The parameter type name is not valid.
//
-// * ErrCodeInvalidFilter "InvalidFilter"
+// * InvalidFilter
// The filter name is not valid. Verify the you entered the correct name and
// try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListInventoryEntries
@@ -8610,15 +8774,15 @@ func (c *SSM) ListResourceComplianceSummariesRequest(input *ListResourceComplian
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListResourceComplianceSummaries for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidFilter "InvalidFilter"
+// Returned Error Types:
+// * InvalidFilter
// The filter name is not valid. Verify the you entered the correct name and
// try again.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListResourceComplianceSummaries
@@ -8705,11 +8869,14 @@ func (c *SSM) ListResourceDataSyncRequest(input *ListResourceDataSyncInput) (req
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListResourceDataSync for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * ResourceDataSyncInvalidConfigurationException
+// The specified sync configuration is invalid.
+//
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidNextToken "InvalidNextToken"
+// * InvalidNextToken
// The specified token is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListResourceDataSync
@@ -8787,16 +8954,16 @@ func (c *SSM) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ListTagsForResource for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidResourceType "InvalidResourceType"
+// Returned Error Types:
+// * InvalidResourceType
// 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"
+// * InvalidResourceId
// The resource ID is not valid. Verify that you entered the correct ID and
// try again.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListTagsForResource
@@ -8878,23 +9045,23 @@ func (c *SSM) ModifyDocumentPermissionRequest(input *ModifyDocumentPermissionInp
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ModifyDocumentPermission for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidPermissionType "InvalidPermissionType"
+// * InvalidPermissionType
// The permission type is not supported. Share is the only supported permission
// type.
//
-// * ErrCodeDocumentPermissionLimit "DocumentPermissionLimit"
+// * DocumentPermissionLimit
// The document cannot be shared with more AWS user accounts. You can share
// a document with a maximum of 20 accounts. You can publicly share up to five
// documents. If you need to increase this limit, contact AWS Support.
//
-// * ErrCodeDocumentLimitExceeded "DocumentLimitExceeded"
+// * DocumentLimitExceeded
// You can have at most 500 active Systems Manager documents.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ModifyDocumentPermission
@@ -9014,28 +9181,28 @@ func (c *SSM) PutComplianceItemsRequest(input *PutComplianceItemsInput) (req *re
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation PutComplianceItems for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidItemContentException "InvalidItemContentException"
+// * InvalidItemContentException
// One or more content items is not valid.
//
-// * ErrCodeTotalSizeLimitExceededException "TotalSizeLimitExceededException"
+// * TotalSizeLimitExceededException
// The size of inventory data has exceeded the total size limit for the resource.
//
-// * ErrCodeItemSizeLimitExceededException "ItemSizeLimitExceededException"
+// * ItemSizeLimitExceededException
// The inventory item size has exceeded the size limit.
//
-// * ErrCodeComplianceTypeCountLimitExceededException "ComplianceTypeCountLimitExceededException"
+// * ComplianceTypeCountLimitExceededException
// You specified too many custom compliance types. You can specify a maximum
// of 10 different types.
//
-// * ErrCodeInvalidResourceType "InvalidResourceType"
+// * InvalidResourceType
// 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"
+// * InvalidResourceId
// The resource ID is not valid. Verify that you entered the correct ID and
// try again.
//
@@ -9116,11 +9283,11 @@ func (c *SSM) PutInventoryRequest(input *PutInventoryInput) (req *request.Reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation PutInventory for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -9132,40 +9299,40 @@ func (c *SSM) PutInventoryRequest(input *PutInventoryInput) (req *request.Reques
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidTypeNameException "InvalidTypeNameException"
+// * InvalidTypeNameException
// The parameter type name is not valid.
//
-// * ErrCodeInvalidItemContentException "InvalidItemContentException"
+// * InvalidItemContentException
// One or more content items is not valid.
//
-// * ErrCodeTotalSizeLimitExceededException "TotalSizeLimitExceededException"
+// * TotalSizeLimitExceededException
// The size of inventory data has exceeded the total size limit for the resource.
//
-// * ErrCodeItemSizeLimitExceededException "ItemSizeLimitExceededException"
+// * ItemSizeLimitExceededException
// The inventory item size has exceeded the size limit.
//
-// * ErrCodeItemContentMismatchException "ItemContentMismatchException"
+// * ItemContentMismatchException
// The inventory item has invalid content.
//
-// * ErrCodeCustomSchemaCountLimitExceededException "CustomSchemaCountLimitExceededException"
+// * CustomSchemaCountLimitExceededException
// You have exceeded the limit for custom schemas. Delete one or more custom
// schemas and try again.
//
-// * ErrCodeUnsupportedInventorySchemaVersionException "UnsupportedInventorySchemaVersionException"
+// * UnsupportedInventorySchemaVersionException
// Inventory item type schema version has to match supported versions in the
// service. Check output of GetInventorySchema to see the available schema version
// for each type.
//
-// * ErrCodeUnsupportedInventoryItemContextException "UnsupportedInventoryItemContextException"
+// * UnsupportedInventoryItemContextException
// The Context attribute that you specified for the InventoryItem is not allowed
// for this inventory type. You can only use the Context attribute with inventory
// types like AWS:ComplianceItem.
//
-// * ErrCodeInvalidInventoryItemContextException "InvalidInventoryItemContextException"
+// * InvalidInventoryItemContextException
// You specified invalid keys or values in the Context attribute for InventoryItem.
// Verify the keys and values, and try again.
//
-// * ErrCodeSubTypeCountLimitExceededException "SubTypeCountLimitExceededException"
+// * SubTypeCountLimitExceededException
// The sub-type count exceeded the limit for the inventory type.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutInventory
@@ -9243,58 +9410,58 @@ func (c *SSM) PutParameterRequest(input *PutParameterInput) (req *request.Reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation PutParameter for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidKeyId "InvalidKeyId"
+// * InvalidKeyId
// The query key ID is not valid.
//
-// * ErrCodeParameterLimitExceeded "ParameterLimitExceeded"
+// * ParameterLimitExceeded
// You have exceeded the number of parameters for this AWS account. Delete one
// or more parameters and try again.
//
-// * ErrCodeTooManyUpdates "TooManyUpdates"
+// * TooManyUpdates
// There are concurrent updates for a resource that supports one update at a
// time.
//
-// * ErrCodeParameterAlreadyExists "ParameterAlreadyExists"
+// * ParameterAlreadyExists
// The parameter already exists. You can't create duplicate parameters.
//
-// * ErrCodeHierarchyLevelLimitExceededException "HierarchyLevelLimitExceededException"
+// * HierarchyLevelLimitExceededException
// A hierarchy can have a maximum of 15 levels. For more information, see Requirements
-// and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html)
+// and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html)
// in the AWS Systems Manager User Guide.
//
-// * ErrCodeHierarchyTypeMismatchException "HierarchyTypeMismatchException"
+// * HierarchyTypeMismatchException
// Parameter Store does not support changing a parameter type in a hierarchy.
// For example, you can't change a parameter from a String type to a SecureString
// type. You must create a new, unique parameter.
//
-// * ErrCodeInvalidAllowedPatternException "InvalidAllowedPatternException"
+// * InvalidAllowedPatternException
// The request does not meet the regular expression requirement.
//
-// * ErrCodeParameterMaxVersionLimitExceeded "ParameterMaxVersionLimitExceeded"
+// * ParameterMaxVersionLimitExceeded
// The parameter exceeded the maximum number of allowed versions.
//
-// * ErrCodeParameterPatternMismatchException "ParameterPatternMismatchException"
+// * ParameterPatternMismatchException
// The parameter name is not valid.
//
-// * ErrCodeUnsupportedParameterType "UnsupportedParameterType"
+// * UnsupportedParameterType
// The parameter type is not supported.
//
-// * ErrCodePoliciesLimitExceededException "PoliciesLimitExceededException"
+// * PoliciesLimitExceededException
// You specified more than the maximum number of allowed policies for the parameter.
// The maximum is 10.
//
-// * ErrCodeInvalidPolicyTypeException "InvalidPolicyTypeException"
+// * InvalidPolicyTypeException
// The policy type is not supported. Parameter Store supports the following
// policy types: Expiration, ExpirationNotification, and NoChangeNotification.
//
-// * ErrCodeInvalidPolicyAttributeException "InvalidPolicyAttributeException"
+// * InvalidPolicyAttributeException
// A policy attribute or its value is invalid.
//
-// * ErrCodeIncompatiblePolicyException "IncompatiblePolicyException"
+// * IncompatiblePolicyException
// There is a conflict in the policies specified for this parameter. You can't,
// for example, specify two Expiration policies for a parameter. Review your
// policies, and try again.
@@ -9379,19 +9546,20 @@ func (c *SSM) RegisterDefaultPatchBaselineRequest(input *RegisterDefaultPatchBas
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation RegisterDefaultPatchBaseline for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidResourceId "InvalidResourceId"
+// Returned Error Types:
+// * InvalidResourceId
// The resource ID is not valid. Verify that you entered the correct ID and
// try again.
//
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterDefaultPatchBaseline
@@ -9469,30 +9637,32 @@ func (c *SSM) RegisterPatchBaselineForPatchGroupRequest(input *RegisterPatchBase
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation RegisterPatchBaselineForPatchGroup for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeAlreadyExistsException "AlreadyExistsException"
+// Returned Error Types:
+// * AlreadyExistsException
// Error returned if an attempt is made to register a patch group with a patch
// baseline that is already registered with a different patch baseline.
//
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInvalidResourceId "InvalidResourceId"
+// * InvalidResourceId
// The resource ID is not valid. Verify that you entered the correct ID and
// try again.
//
-// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
-// Error returned when the caller has exceeded the default resource limits.
+// * ResourceLimitExceededException
+// Error returned when the caller has exceeded the default resource quotas.
// For example, too many maintenance windows or patch baselines have been created.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterPatchBaselineForPatchGroup
@@ -9570,26 +9740,28 @@ func (c *SSM) RegisterTargetWithMaintenanceWindowRequest(input *RegisterTargetWi
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation RegisterTargetWithMaintenanceWindow for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch"
+// Returned Error Types:
+// * 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.
//
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
-// Error returned when the caller has exceeded the default resource limits.
+// * ResourceLimitExceededException
+// Error returned when the caller has exceeded the default resource quotas.
// For example, too many maintenance windows or patch baselines have been created.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterTargetWithMaintenanceWindow
@@ -9667,30 +9839,32 @@ func (c *SSM) RegisterTaskWithMaintenanceWindowRequest(input *RegisterTaskWithMa
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation RegisterTaskWithMaintenanceWindow for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch"
+// Returned Error Types:
+// * 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.
//
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
-// Error returned when the caller has exceeded the default resource limits.
+// * ResourceLimitExceededException
+// Error returned when the caller has exceeded the default resource quotas.
// For example, too many maintenance windows or patch baselines have been created.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeFeatureNotAvailableException "FeatureNotAvailableException"
+// * FeatureNotAvailableException
// You attempted to register a LAMBDA or STEP_FUNCTIONS task in a region where
// the corresponding service is not available.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterTaskWithMaintenanceWindow
@@ -9769,19 +9943,19 @@ func (c *SSM) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput)
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation RemoveTagsFromResource for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidResourceType "InvalidResourceType"
+// Returned Error Types:
+// * InvalidResourceType
// 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"
+// * InvalidResourceId
// The resource ID is not valid. Verify that you entered the correct ID and
// try again.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeTooManyUpdates "TooManyUpdates"
+// * TooManyUpdates
// There are concurrent updates for a resource that supports one update at a
// time.
//
@@ -9875,15 +10049,15 @@ func (c *SSM) ResetServiceSettingRequest(input *ResetServiceSettingInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ResetServiceSetting for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeServiceSettingNotFound "ServiceSettingNotFound"
+// * ServiceSettingNotFound
// The specified service setting was not found. Either the service name or the
// setting has not been provisioned by the AWS service team.
//
-// * ErrCodeTooManyUpdates "TooManyUpdates"
+// * TooManyUpdates
// There are concurrent updates for a resource that supports one update at a
// time.
//
@@ -9966,15 +10140,16 @@ func (c *SSM) ResumeSessionRequest(input *ResumeSessionInput) (req *request.Requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation ResumeSession for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ResumeSession
@@ -10054,19 +10229,19 @@ func (c *SSM) SendAutomationSignalRequest(input *SendAutomationSignalInput) (req
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation SendAutomationSignal for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeAutomationExecutionNotFoundException "AutomationExecutionNotFoundException"
+// Returned Error Types:
+// * AutomationExecutionNotFoundException
// There is no automation execution information for the requested automation
// execution ID.
//
-// * ErrCodeAutomationStepNotFoundException "AutomationStepNotFoundException"
+// * AutomationStepNotFoundException
// The specified step name and execution ID don't exist. Verify the information
// and try again.
//
-// * ErrCodeInvalidAutomationSignalException "InvalidAutomationSignalException"
+// * InvalidAutomationSignalException
// The signal is not valid for the current Automation execution.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/SendAutomationSignal
@@ -10144,14 +10319,14 @@ func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request,
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation SendCommand for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDuplicateInstanceId "DuplicateInstanceId"
+// Returned Error Types:
+// * DuplicateInstanceId
// You cannot specify an instance ID in more than one association.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -10163,35 +10338,35 @@ func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request,
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion"
+// * InvalidDocumentVersion
// The document version is not valid or does not exist.
//
-// * ErrCodeInvalidOutputFolder "InvalidOutputFolder"
+// * InvalidOutputFolder
// The S3 bucket does not exist.
//
-// * ErrCodeInvalidParameters "InvalidParameters"
+// * InvalidParameters
// 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"
+// * UnsupportedPlatformType
// The document does not support the platform type of the given instance ID(s).
// For example, you sent an document for a Windows instance to a Linux instance.
//
-// * ErrCodeMaxDocumentSizeExceeded "MaxDocumentSizeExceeded"
+// * MaxDocumentSizeExceeded
// The size limit of a document is 64 KB.
//
-// * ErrCodeInvalidRole "InvalidRole"
+// * InvalidRole
// The role name can't contain invalid characters. Also verify that you specified
// an IAM role for notifications that includes the required trust policy. For
// information about configuring the IAM role for Run Command notifications,
-// see Configuring Amazon SNS Notifications for Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html)
+// see Configuring Amazon SNS Notifications for Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html)
// in the AWS Systems Manager User Guide.
//
-// * ErrCodeInvalidNotificationConfig "InvalidNotificationConfig"
+// * InvalidNotificationConfig
// One or more configuration items is not valid. Verify that a valid Amazon
// Resource Name (ARN) was provided for an Amazon SNS topic.
//
@@ -10272,11 +10447,11 @@ func (c *SSM) StartAssociationsOnceRequest(input *StartAssociationsOnceInput) (r
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation StartAssociationsOnce for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidAssociation "InvalidAssociation"
+// Returned Error Types:
+// * InvalidAssociation
// The association is not valid or does not exist.
//
-// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist"
+// * AssociationDoesNotExist
// The specified association does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAssociationsOnce
@@ -10354,31 +10529,31 @@ func (c *SSM) StartAutomationExecutionRequest(input *StartAutomationExecutionInp
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation StartAutomationExecution for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeAutomationDefinitionNotFoundException "AutomationDefinitionNotFoundException"
+// Returned Error Types:
+// * AutomationDefinitionNotFoundException
// An Automation document with the specified name could not be found.
//
-// * ErrCodeInvalidAutomationExecutionParametersException "InvalidAutomationExecutionParametersException"
+// * InvalidAutomationExecutionParametersException
// The supplied parameters for invoking the specified Automation document are
// incorrect. For example, they may not match the set of parameters permitted
// for the specified Automation document.
//
-// * ErrCodeAutomationExecutionLimitExceededException "AutomationExecutionLimitExceededException"
+// * AutomationExecutionLimitExceededException
// The number of simultaneously running Automation executions exceeded the allowable
// limit.
//
-// * ErrCodeAutomationDefinitionVersionNotFoundException "AutomationDefinitionVersionNotFoundException"
+// * AutomationDefinitionVersionNotFoundException
// An Automation document with the specified name and version could not be found.
//
-// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch"
+// * 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.
//
-// * ErrCodeInvalidTarget "InvalidTarget"
+// * InvalidTarget
// The target is not valid or does not exist. It might not be configured for
-// EC2 Systems Manager or you might not have permission to perform the operation.
+// Systems Manager or you might not have permission to perform the operation.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAutomationExecution
@@ -10453,7 +10628,7 @@ func (c *SSM) StartSessionRequest(input *StartSessionInput) (req *request.Reques
//
// AWS CLI usage: start-session is an interactive command that requires the
// Session Manager plugin to be installed on the client machine making the call.
-// For information, see Install the Session Manager Plugin for the AWS CLI (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
+// For information, see Install the Session Manager plugin for the AWS CLI (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
// in the AWS Systems Manager User Guide.
//
// AWS Tools for PowerShell usage: Start-SSMSession is not currently supported
@@ -10466,17 +10641,17 @@ func (c *SSM) StartSessionRequest(input *StartSessionInput) (req *request.Reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation StartSession for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidDocument "InvalidDocument"
+// Returned Error Types:
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeTargetNotConnected "TargetNotConnected"
+// * TargetNotConnected
// The specified target instance for the session is not fully configured for
-// use with Session Manager. For more information, see Getting Started with
-// Session Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html)
+// use with Session Manager. For more information, see Getting started with
+// Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html)
// in the AWS Systems Manager User Guide.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartSession
@@ -10555,15 +10730,15 @@ func (c *SSM) StopAutomationExecutionRequest(input *StopAutomationExecutionInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation StopAutomationExecution for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeAutomationExecutionNotFoundException "AutomationExecutionNotFoundException"
+// Returned Error Types:
+// * AutomationExecutionNotFoundException
// There is no automation execution information for the requested automation
// execution ID.
//
-// * ErrCodeInvalidAutomationStatusUpdateException "InvalidAutomationStatusUpdateException"
+// * InvalidAutomationStatusUpdateException
// The specified update status operation is not valid.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StopAutomationExecution
@@ -10643,15 +10818,16 @@ func (c *SSM) TerminateSessionRequest(input *TerminateSessionInput) (req *reques
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation TerminateSession for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/TerminateSession
@@ -10740,47 +10916,47 @@ func (c *SSM) UpdateAssociationRequest(input *UpdateAssociationInput) (req *requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdateAssociation for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidSchedule "InvalidSchedule"
+// * InvalidSchedule
// The schedule is invalid. Verify your cron or rate expression and try again.
//
-// * ErrCodeInvalidParameters "InvalidParameters"
+// * InvalidParameters
// 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"
+// * InvalidOutputLocation
// The output location is not valid or does not exist.
//
-// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion"
+// * InvalidDocumentVersion
// The document version is not valid or does not exist.
//
-// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist"
+// * AssociationDoesNotExist
// The specified association does not exist.
//
-// * ErrCodeInvalidUpdate "InvalidUpdate"
+// * InvalidUpdate
// The update is not valid.
//
-// * ErrCodeTooManyUpdates "TooManyUpdates"
+// * TooManyUpdates
// There are concurrent updates for a resource that supports one update at a
// time.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidTarget "InvalidTarget"
+// * InvalidTarget
// The target is not valid or does not exist. It might not be configured for
-// EC2 Systems Manager or you might not have permission to perform the operation.
+// Systems Manager or you might not have permission to perform the operation.
//
-// * ErrCodeInvalidAssociationVersion "InvalidAssociationVersion"
+// * InvalidAssociationVersion
// The version you specified is not valid. Use ListAssociationVersions to view
// all versions of an association according to the association ID. Or, use the
// $LATEST parameter to view the latest version of the association.
//
-// * ErrCodeAssociationVersionLimitExceeded "AssociationVersionLimitExceeded"
+// * AssociationVersionLimitExceeded
// You have reached the maximum number versions allowed for an association.
// Each association has a limit of 1,000 versions.
//
@@ -10860,11 +11036,11 @@ func (c *SSM) UpdateAssociationStatusRequest(input *UpdateAssociationStatusInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdateAssociationStatus for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -10876,16 +11052,16 @@ func (c *SSM) UpdateAssociationStatusRequest(input *UpdateAssociationStatusInput
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist"
+// * AssociationDoesNotExist
// The specified association does not exist.
//
-// * ErrCodeStatusUnchanged "StatusUnchanged"
+// * StatusUnchanged
// The updated status is the same as the current status.
//
-// * ErrCodeTooManyUpdates "TooManyUpdates"
+// * TooManyUpdates
// There are concurrent updates for a resource that supports one update at a
// time.
//
@@ -10964,38 +11140,38 @@ func (c *SSM) UpdateDocumentRequest(input *UpdateDocumentInput) (req *request.Re
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdateDocument for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeMaxDocumentSizeExceeded "MaxDocumentSizeExceeded"
+// Returned Error Types:
+// * MaxDocumentSizeExceeded
// The size limit of a document is 64 KB.
//
-// * ErrCodeDocumentVersionLimitExceeded "DocumentVersionLimitExceeded"
+// * DocumentVersionLimitExceeded
// The document has too many versions. Delete one or more document versions
// and try again.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeDuplicateDocumentContent "DuplicateDocumentContent"
+// * DuplicateDocumentContent
// The content of the association document matches another document. Change
// the content of the document and try again.
//
-// * ErrCodeDuplicateDocumentVersionName "DuplicateDocumentVersionName"
+// * DuplicateDocumentVersionName
// The version name has already been used in this document. Specify a different
// version name, and then try again.
//
-// * ErrCodeInvalidDocumentContent "InvalidDocumentContent"
+// * InvalidDocumentContent
// The content for the document is not valid.
//
-// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion"
+// * InvalidDocumentVersion
// The document version is not valid or does not exist.
//
-// * ErrCodeInvalidDocumentSchemaVersion "InvalidDocumentSchemaVersion"
+// * InvalidDocumentSchemaVersion
// The version of the document schema is not supported.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidDocumentOperation "InvalidDocumentOperation"
+// * InvalidDocumentOperation
// You attempted to delete a document while it is still shared. You must stop
// sharing the document before you can delete it.
//
@@ -11074,17 +11250,17 @@ func (c *SSM) UpdateDocumentDefaultVersionRequest(input *UpdateDocumentDefaultVe
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdateDocumentDefaultVersion for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeInvalidDocument "InvalidDocument"
+// * InvalidDocument
// The specified document does not exist.
//
-// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion"
+// * InvalidDocumentVersion
// The document version is not valid or does not exist.
//
-// * ErrCodeInvalidDocumentSchemaVersion "InvalidDocumentSchemaVersion"
+// * InvalidDocumentSchemaVersion
// The version of the document schema is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocumentDefaultVersion
@@ -11169,15 +11345,16 @@ func (c *SSM) UpdateMaintenanceWindowRequest(input *UpdateMaintenanceWindowInput
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdateMaintenanceWindow for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindow
@@ -11272,15 +11449,16 @@ func (c *SSM) UpdateMaintenanceWindowTargetRequest(input *UpdateMaintenanceWindo
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdateMaintenanceWindowTarget for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindowTarget
@@ -11377,15 +11555,16 @@ func (c *SSM) UpdateMaintenanceWindowTaskRequest(input *UpdateMaintenanceWindowT
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdateMaintenanceWindowTask for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindowTask
@@ -11455,8 +11634,10 @@ func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleI
// UpdateManagedInstanceRole API operation for Amazon Simple Systems Manager (SSM).
//
-// Assigns or changes an Amazon Identity and Access Management (IAM) role for
-// the managed instance.
+// Changes the Amazon Identity and Access Management (IAM) role that is assigned
+// to the on-premises instance or virtual machines (VM). IAM roles are first
+// assigned to these hybrid instances during the activation process. For more
+// information, see CreateActivation.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -11465,8 +11646,8 @@ func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleI
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdateManagedInstanceRole for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInvalidInstanceId "InvalidInstanceId"
+// Returned Error Types:
+// * InvalidInstanceId
// The following problems can cause this exception:
//
// You do not have permission to access the instance.
@@ -11478,7 +11659,7 @@ func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleI
// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
// Stopping. Invalid states are: Shutting-down and Terminated.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateManagedInstanceRole
@@ -11550,13 +11731,13 @@ func (c *SSM) UpdateOpsItemRequest(input *UpdateOpsItemInput) (req *request.Requ
//
// Edit or change an OpsItem. You must have permission in AWS Identity and Access
// Management (IAM) to update an OpsItem. For more information, see Getting
-// Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html)
+// started with OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html)
// in the AWS Systems Manager User Guide.
//
// Operations engineers and IT professionals use OpsCenter to view, investigate,
// and remediate operational issues impacting the performance and health of
// their AWS resources. For more information, see AWS Systems Manager OpsCenter
-// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
+// (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
// in the AWS Systems Manager User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -11566,21 +11747,21 @@ func (c *SSM) UpdateOpsItemRequest(input *UpdateOpsItemInput) (req *request.Requ
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdateOpsItem for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeOpsItemNotFoundException "OpsItemNotFoundException"
+// * OpsItemNotFoundException
// The specified OpsItem ID doesn't exist. Verify the ID and try again.
//
-// * ErrCodeOpsItemAlreadyExistsException "OpsItemAlreadyExistsException"
+// * OpsItemAlreadyExistsException
// The OpsItem already exists.
//
-// * ErrCodeOpsItemLimitExceededException "OpsItemLimitExceededException"
-// The request caused OpsItems to exceed one or more limits. For information
-// about OpsItem limits, see What are the resource limits for OpsCenter? (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits).
+// * OpsItemLimitExceededException
+// The request caused OpsItems to exceed one or more quotas. For information
+// about OpsItem quotas, see What are the resource limits for OpsCenter? (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits).
//
-// * ErrCodeOpsItemInvalidParameterException "OpsItemInvalidParameterException"
+// * OpsItemInvalidParameterException
// A specified parameter argument isn't valid. Verify the available arguments
// and try again.
//
@@ -11663,15 +11844,16 @@ func (c *SSM) UpdatePatchBaselineRequest(input *UpdatePatchBaselineInput) (req *
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdatePatchBaseline for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeDoesNotExistException "DoesNotExistException"
+// Returned Error Types:
+// * DoesNotExistException
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
-// For information about resource limits in Systems Manager, see AWS Systems
-// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
//
-// * ErrCodeInternalServerError "InternalServerError"
+// * InternalServerError
// An error occurred on the server side.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdatePatchBaseline
@@ -11696,6 +11878,104 @@ func (c *SSM) UpdatePatchBaselineWithContext(ctx aws.Context, input *UpdatePatch
return out, req.Send()
}
+const opUpdateResourceDataSync = "UpdateResourceDataSync"
+
+// UpdateResourceDataSyncRequest generates a "aws/request.Request" representing the
+// client's request for the UpdateResourceDataSync operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See UpdateResourceDataSync for more information on using the UpdateResourceDataSync
+// 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 UpdateResourceDataSyncRequest method.
+// req, resp := client.UpdateResourceDataSyncRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateResourceDataSync
+func (c *SSM) UpdateResourceDataSyncRequest(input *UpdateResourceDataSyncInput) (req *request.Request, output *UpdateResourceDataSyncOutput) {
+ op := &request.Operation{
+ Name: opUpdateResourceDataSync,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &UpdateResourceDataSyncInput{}
+ }
+
+ output = &UpdateResourceDataSyncOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// UpdateResourceDataSync API operation for Amazon Simple Systems Manager (SSM).
+//
+// Update a resource data sync. After you create a resource data sync for a
+// Region, you can't change the account options for that sync. For example,
+// if you create a sync in the us-east-2 (Ohio) Region and you choose the Include
+// only the current account option, you can't edit that sync later and choose
+// the Include all accounts from my AWS Organizations configuration option.
+// Instead, you must delete the first resource data sync, and create a new one.
+//
+// This API action only supports a resource data sync that was created with
+// a SyncFromSource SyncType.
+//
+// Returns awserr.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 Systems Manager (SSM)'s
+// API operation UpdateResourceDataSync for usage and error information.
+//
+// Returned Error Types:
+// * ResourceDataSyncNotFoundException
+// The specified sync name was not found.
+//
+// * ResourceDataSyncInvalidConfigurationException
+// The specified sync configuration is invalid.
+//
+// * ResourceDataSyncConflictException
+// Another UpdateResourceDataSync request is being processed. Wait a few minutes
+// and try again.
+//
+// * InternalServerError
+// An error occurred on the server side.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateResourceDataSync
+func (c *SSM) UpdateResourceDataSync(input *UpdateResourceDataSyncInput) (*UpdateResourceDataSyncOutput, error) {
+ req, out := c.UpdateResourceDataSyncRequest(input)
+ return out, req.Send()
+}
+
+// UpdateResourceDataSyncWithContext is the same as UpdateResourceDataSync with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UpdateResourceDataSync 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 *SSM) UpdateResourceDataSyncWithContext(ctx aws.Context, input *UpdateResourceDataSyncInput, opts ...request.Option) (*UpdateResourceDataSyncOutput, error) {
+ req, out := c.UpdateResourceDataSyncRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opUpdateServiceSetting = "UpdateServiceSetting"
// UpdateServiceSettingRequest generates a "aws/request.Request" representing the
@@ -11764,15 +12044,15 @@ func (c *SSM) UpdateServiceSettingRequest(input *UpdateServiceSettingInput) (req
// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s
// API operation UpdateServiceSetting for usage and error information.
//
-// Returned Error Codes:
-// * ErrCodeInternalServerError "InternalServerError"
+// Returned Error Types:
+// * InternalServerError
// An error occurred on the server side.
//
-// * ErrCodeServiceSettingNotFound "ServiceSettingNotFound"
+// * ServiceSettingNotFound
// The specified service setting was not found. Either the service name or the
// setting has not been provisioned by the AWS service team.
//
-// * ErrCodeTooManyUpdates "TooManyUpdates"
+// * TooManyUpdates
// There are concurrent updates for a resource that supports one update at a
// time.
//
@@ -11798,6 +12078,40 @@ func (c *SSM) UpdateServiceSettingWithContext(ctx aws.Context, input *UpdateServ
return out, req.Send()
}
+// Information includes the AWS account ID where the current document is shared
+// and the version shared with that account.
+type AccountSharingInfo struct {
+ _ struct{} `type:"structure"`
+
+ // The AWS account ID where the current document is shared.
+ AccountId *string `type:"string"`
+
+ // The version of the current document shared with the account.
+ SharedDocumentVersion *string `type:"string"`
+}
+
+// String returns the string representation
+func (s AccountSharingInfo) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccountSharingInfo) GoString() string {
+ return s.String()
+}
+
+// SetAccountId sets the AccountId field's value.
+func (s *AccountSharingInfo) SetAccountId(v string) *AccountSharingInfo {
+ s.AccountId = &v
+ return s
+}
+
+// SetSharedDocumentVersion sets the SharedDocumentVersion field's value.
+func (s *AccountSharingInfo) SetSharedDocumentVersion(v string) *AccountSharingInfo {
+ s.SharedDocumentVersion = &v
+ return s
+}
+
// An activation registers one or more on-premises servers or virtual machines
// (VMs) with AWS so that you can configure those servers or VMs using Run Command.
// A server or VM that has been registered with AWS is called a managed instance.
@@ -12019,6 +12333,120 @@ func (s AddTagsToResourceOutput) GoString() string {
return s.String()
}
+// Error returned if an attempt is made to register a patch group with a patch
+// baseline that is already registered with a different patch baseline.
+type AlreadyExistsException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AlreadyExistsException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AlreadyExistsException) GoString() string {
+ return s.String()
+}
+
+func newErrorAlreadyExistsException(v protocol.ResponseMetadata) error {
+ return &AlreadyExistsException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AlreadyExistsException) Code() string {
+ return "AlreadyExistsException"
+}
+
+// Message returns the exception's message.
+func (s *AlreadyExistsException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AlreadyExistsException) OrigErr() error {
+ return nil
+}
+
+func (s *AlreadyExistsException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AlreadyExistsException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AlreadyExistsException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// You must disassociate a document from all instances before you can delete
+// it.
+type AssociatedInstances struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s AssociatedInstances) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociatedInstances) GoString() string {
+ return s.String()
+}
+
+func newErrorAssociatedInstances(v protocol.ResponseMetadata) error {
+ return &AssociatedInstances{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AssociatedInstances) Code() string {
+ return "AssociatedInstances"
+}
+
+// Message returns the exception's message.
+func (s *AssociatedInstances) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AssociatedInstances) OrigErr() error {
+ return nil
+}
+
+func (s *AssociatedInstances) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AssociatedInstances) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AssociatedInstances) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Describes an association of a Systems Manager document and an instance.
type Association struct {
_ struct{} `type:"structure"`
@@ -12125,10 +12553,72 @@ func (s *Association) SetTargets(v []*Target) *Association {
return s
}
+// The specified association already exists.
+type AssociationAlreadyExists struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s AssociationAlreadyExists) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociationAlreadyExists) GoString() string {
+ return s.String()
+}
+
+func newErrorAssociationAlreadyExists(v protocol.ResponseMetadata) error {
+ return &AssociationAlreadyExists{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AssociationAlreadyExists) Code() string {
+ return "AssociationAlreadyExists"
+}
+
+// Message returns the exception's message.
+func (s *AssociationAlreadyExists) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AssociationAlreadyExists) OrigErr() error {
+ return nil
+}
+
+func (s *AssociationAlreadyExists) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AssociationAlreadyExists) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AssociationAlreadyExists) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Describes the parameters for a document.
type AssociationDescription struct {
_ struct{} `type:"structure"`
+ // By default, when you create a new associations, the system runs it immediately
+ // after it is created and then according to the schedule you specified. Specify
+ // this option if you don't want an association to run immediately after you
+ // create it.
+ ApplyOnlyAtCronInterval *bool `type:"boolean"`
+
// The association ID.
AssociationId *string `type:"string"`
@@ -12192,7 +12682,7 @@ type AssociationDescription struct {
// 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.
+ // An S3 bucket where you want to store the output details of the request.
OutputLocation *InstanceAssociationOutputLocation `type:"structure"`
// Information about the association.
@@ -12207,6 +12697,20 @@ type AssociationDescription struct {
// The association status.
Status *AssociationStatus `type:"structure"`
+ // The mode for generating association compliance. You can specify AUTO or MANUAL.
+ // In AUTO mode, the system uses the status of the association execution to
+ // determine the compliance status. If the association execution runs successfully,
+ // then the association is COMPLIANT. If the association execution doesn't run
+ // successfully, the association is NON-COMPLIANT.
+ //
+ // In MANUAL mode, you must specify the AssociationId as a parameter for the
+ // PutComplianceItems API action. In this case, compliance data is not managed
+ // by State Manager. It is managed by your direct call to the PutComplianceItems
+ // API action.
+ //
+ // By default, all associations use AUTO mode.
+ SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"`
+
// The instances targeted by the request.
Targets []*Target `type:"list"`
}
@@ -12221,6 +12725,12 @@ func (s AssociationDescription) GoString() string {
return s.String()
}
+// SetApplyOnlyAtCronInterval sets the ApplyOnlyAtCronInterval field's value.
+func (s *AssociationDescription) SetApplyOnlyAtCronInterval(v bool) *AssociationDescription {
+ s.ApplyOnlyAtCronInterval = &v
+ return s
+}
+
// SetAssociationId sets the AssociationId field's value.
func (s *AssociationDescription) SetAssociationId(v string) *AssociationDescription {
s.AssociationId = &v
@@ -12335,12 +12845,74 @@ func (s *AssociationDescription) SetStatus(v *AssociationStatus) *AssociationDes
return s
}
+// SetSyncCompliance sets the SyncCompliance field's value.
+func (s *AssociationDescription) SetSyncCompliance(v string) *AssociationDescription {
+ s.SyncCompliance = &v
+ return s
+}
+
// SetTargets sets the Targets field's value.
func (s *AssociationDescription) SetTargets(v []*Target) *AssociationDescription {
s.Targets = v
return s
}
+// The specified association does not exist.
+type AssociationDoesNotExist struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AssociationDoesNotExist) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociationDoesNotExist) GoString() string {
+ return s.String()
+}
+
+func newErrorAssociationDoesNotExist(v protocol.ResponseMetadata) error {
+ return &AssociationDoesNotExist{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AssociationDoesNotExist) Code() string {
+ return "AssociationDoesNotExist"
+}
+
+// Message returns the exception's message.
+func (s *AssociationDoesNotExist) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AssociationDoesNotExist) OrigErr() error {
+ return nil
+}
+
+func (s *AssociationDoesNotExist) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AssociationDoesNotExist) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AssociationDoesNotExist) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Includes information about the specified association.
type AssociationExecution struct {
_ struct{} `type:"structure"`
@@ -12429,6 +13001,62 @@ func (s *AssociationExecution) SetStatus(v string) *AssociationExecution {
return s
}
+// The specified execution ID does not exist. Verify the ID number and try again.
+type AssociationExecutionDoesNotExist struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AssociationExecutionDoesNotExist) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociationExecutionDoesNotExist) GoString() string {
+ return s.String()
+}
+
+func newErrorAssociationExecutionDoesNotExist(v protocol.ResponseMetadata) error {
+ return &AssociationExecutionDoesNotExist{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AssociationExecutionDoesNotExist) Code() string {
+ return "AssociationExecutionDoesNotExist"
+}
+
+// Message returns the exception's message.
+func (s *AssociationExecutionDoesNotExist) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AssociationExecutionDoesNotExist) OrigErr() error {
+ return nil
+}
+
+func (s *AssociationExecutionDoesNotExist) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AssociationExecutionDoesNotExist) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AssociationExecutionDoesNotExist) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Filters used in the request.
type AssociationExecutionFilter struct {
_ struct{} `type:"structure"`
@@ -12707,6 +13335,62 @@ func (s *AssociationFilter) SetValue(v string) *AssociationFilter {
return s
}
+// You can have at most 2,000 active associations.
+type AssociationLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s AssociationLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociationLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorAssociationLimitExceeded(v protocol.ResponseMetadata) error {
+ return &AssociationLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AssociationLimitExceeded) Code() string {
+ return "AssociationLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *AssociationLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AssociationLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *AssociationLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AssociationLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AssociationLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Information about the association.
type AssociationOverview struct {
_ struct{} `type:"structure"`
@@ -12834,6 +13518,12 @@ func (s *AssociationStatus) SetName(v string) *AssociationStatus {
type AssociationVersionInfo struct {
_ struct{} `type:"structure"`
+ // By default, when you create a new associations, the system runs it immediately
+ // after it is created and then according to the schedule you specified. Specify
+ // this option if you don't want an association to run immediately after you
+ // create it.
+ ApplyOnlyAtCronInterval *bool `type:"boolean"`
+
// The ID created by the system when the association was created.
AssociationId *string `type:"string"`
@@ -12894,6 +13584,20 @@ type AssociationVersionInfo struct {
// version was created.
ScheduleExpression *string `min:"1" type:"string"`
+ // The mode for generating association compliance. You can specify AUTO or MANUAL.
+ // In AUTO mode, the system uses the status of the association execution to
+ // determine the compliance status. If the association execution runs successfully,
+ // then the association is COMPLIANT. If the association execution doesn't run
+ // successfully, the association is NON-COMPLIANT.
+ //
+ // In MANUAL mode, you must specify the AssociationId as a parameter for the
+ // PutComplianceItems API action. In this case, compliance data is not managed
+ // by State Manager. It is managed by your direct call to the PutComplianceItems
+ // API action.
+ //
+ // By default, all associations use AUTO mode.
+ SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"`
+
// The targets specified for the association when the association version was
// created.
Targets []*Target `type:"list"`
@@ -12909,6 +13613,12 @@ func (s AssociationVersionInfo) GoString() string {
return s.String()
}
+// SetApplyOnlyAtCronInterval sets the ApplyOnlyAtCronInterval field's value.
+func (s *AssociationVersionInfo) SetApplyOnlyAtCronInterval(v bool) *AssociationVersionInfo {
+ s.ApplyOnlyAtCronInterval = &v
+ return s
+}
+
// SetAssociationId sets the AssociationId field's value.
func (s *AssociationVersionInfo) SetAssociationId(v string) *AssociationVersionInfo {
s.AssociationId = &v
@@ -12981,12 +13691,75 @@ func (s *AssociationVersionInfo) SetScheduleExpression(v string) *AssociationVer
return s
}
+// SetSyncCompliance sets the SyncCompliance field's value.
+func (s *AssociationVersionInfo) SetSyncCompliance(v string) *AssociationVersionInfo {
+ s.SyncCompliance = &v
+ return s
+}
+
// SetTargets sets the Targets field's value.
func (s *AssociationVersionInfo) SetTargets(v []*Target) *AssociationVersionInfo {
s.Targets = v
return s
}
+// You have reached the maximum number versions allowed for an association.
+// Each association has a limit of 1,000 versions.
+type AssociationVersionLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AssociationVersionLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociationVersionLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorAssociationVersionLimitExceeded(v protocol.ResponseMetadata) error {
+ return &AssociationVersionLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AssociationVersionLimitExceeded) Code() string {
+ return "AssociationVersionLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *AssociationVersionLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AssociationVersionLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *AssociationVersionLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AssociationVersionLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AssociationVersionLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// A structure that includes attributes that describe a document attachment.
type AttachmentContent struct {
_ struct{} `type:"structure"`
@@ -13071,16 +13844,35 @@ func (s *AttachmentInformation) SetName(v string) *AttachmentInformation {
return s
}
-// A key and value pair that identifies the location of an attachment to a document.
+// Identifying information about a document attachment, including the file name
+// and a key-value pair that identifies the location of an attachment to a document.
type AttachmentsSource struct {
_ struct{} `type:"structure"`
- // The key of a key and value pair that identifies the location of an attachment
+ // The key of a key-value pair that identifies the location of an attachment
// to a document.
Key *string `type:"string" enum:"AttachmentsSourceKey"`
- // The URL of the location of a document attachment, such as the URL of an Amazon
- // S3 bucket.
+ // The name of the document attachment file.
+ Name *string `type:"string"`
+
+ // The value of a key-value pair that identifies the location of an attachment
+ // to a document. The format for Value depends on the type of key you specify.
+ //
+ // * For the key SourceUrl, the value is an S3 bucket location. For example:
+ // "Values": [ "s3://my-bucket/my-folder" ]
+ //
+ // * For the key S3FileUrl, the value is a file in an S3 bucket. For example:
+ // "Values": [ "s3://my-bucket/my-folder/my-file.py" ]
+ //
+ // * For the key AttachmentReference, the value is constructed from the name
+ // of another SSM document in your account, a version number of that document,
+ // and a file attached to that document version that you want to reuse. For
+ // example: "Values": [ "MyOtherDocument/3/my-other-file.py" ] However, if
+ // the SSM document is shared with you from another account, the full SSM
+ // document ARN must be specified instead of the document name only. For
+ // example: "Values": [ "arn:aws:ssm:us-east-2:111122223333:document/OtherAccountDocument/3/their-file.py"
+ // ]
Values []*string `min:"1" type:"list"`
}
@@ -13113,12 +13905,130 @@ func (s *AttachmentsSource) SetKey(v string) *AttachmentsSource {
return s
}
+// SetName sets the Name field's value.
+func (s *AttachmentsSource) SetName(v string) *AttachmentsSource {
+ s.Name = &v
+ return s
+}
+
// SetValues sets the Values field's value.
func (s *AttachmentsSource) SetValues(v []*string) *AttachmentsSource {
s.Values = v
return s
}
+// An Automation document with the specified name could not be found.
+type AutomationDefinitionNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AutomationDefinitionNotFoundException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AutomationDefinitionNotFoundException) GoString() string {
+ return s.String()
+}
+
+func newErrorAutomationDefinitionNotFoundException(v protocol.ResponseMetadata) error {
+ return &AutomationDefinitionNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AutomationDefinitionNotFoundException) Code() string {
+ return "AutomationDefinitionNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *AutomationDefinitionNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AutomationDefinitionNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *AutomationDefinitionNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AutomationDefinitionNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AutomationDefinitionNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// An Automation document with the specified name and version could not be found.
+type AutomationDefinitionVersionNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AutomationDefinitionVersionNotFoundException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AutomationDefinitionVersionNotFoundException) GoString() string {
+ return s.String()
+}
+
+func newErrorAutomationDefinitionVersionNotFoundException(v protocol.ResponseMetadata) error {
+ return &AutomationDefinitionVersionNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AutomationDefinitionVersionNotFoundException) Code() string {
+ return "AutomationDefinitionVersionNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *AutomationDefinitionVersionNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AutomationDefinitionVersionNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *AutomationDefinitionVersionNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AutomationDefinitionVersionNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AutomationDefinitionVersionNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Detailed information about the current state of an individual Automation
// execution.
type AutomationExecution struct {
@@ -13427,6 +14337,63 @@ func (s *AutomationExecutionFilter) SetValues(v []*string) *AutomationExecutionF
return s
}
+// The number of simultaneously running Automation executions exceeded the allowable
+// limit.
+type AutomationExecutionLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AutomationExecutionLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AutomationExecutionLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorAutomationExecutionLimitExceededException(v protocol.ResponseMetadata) error {
+ return &AutomationExecutionLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AutomationExecutionLimitExceededException) Code() string {
+ return "AutomationExecutionLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *AutomationExecutionLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AutomationExecutionLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *AutomationExecutionLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AutomationExecutionLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AutomationExecutionLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Details about a specific Automation execution.
type AutomationExecutionMetadata struct {
_ struct{} `type:"structure"`
@@ -13434,14 +14401,13 @@ type AutomationExecutionMetadata struct {
// The execution ID.
AutomationExecutionId *string `min:"36" type:"string"`
- // The status of the execution. Valid values include: Running, Succeeded, Failed,
- // Timed out, or Cancelled.
+ // The status of the execution.
AutomationExecutionStatus *string `type:"string" enum:"AutomationExecutionStatus"`
// Use this filter with DescribeAutomationExecutions. Specify either Local or
// CrossAccount. CrossAccount is an Automation that runs in multiple AWS Regions
- // and accounts. For more information, see Executing Automations in Multiple
- // AWS Regions and Accounts (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html)
+ // and accounts. For more information, see Running Automation workflows in multiple
+ // AWS Regions and accounts (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html)
// in the AWS Systems Manager User Guide.
AutomationType *string `type:"string" enum:"AutomationType"`
@@ -13464,13 +14430,13 @@ type AutomationExecutionMetadata struct {
// still in progress.
ExecutionEndTime *time.Time `type:"timestamp"`
- // The time the execution started.>
+ // The time the execution started.
ExecutionStartTime *time.Time `type:"timestamp"`
// The list of execution outputs as defined in the Automation document.
FailureMessage *string `type:"string"`
- // An Amazon S3 bucket where execution information is stored.
+ // An S3 bucket where execution information is stored.
LogFile *string `type:"string"`
// The MaxConcurrency value specified by the user when starting the Automation.
@@ -13646,6 +14612,120 @@ func (s *AutomationExecutionMetadata) SetTargets(v []*Target) *AutomationExecuti
return s
}
+// There is no automation execution information for the requested automation
+// execution ID.
+type AutomationExecutionNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AutomationExecutionNotFoundException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AutomationExecutionNotFoundException) GoString() string {
+ return s.String()
+}
+
+func newErrorAutomationExecutionNotFoundException(v protocol.ResponseMetadata) error {
+ return &AutomationExecutionNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AutomationExecutionNotFoundException) Code() string {
+ return "AutomationExecutionNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *AutomationExecutionNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AutomationExecutionNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *AutomationExecutionNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AutomationExecutionNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AutomationExecutionNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified step name and execution ID don't exist. Verify the information
+// and try again.
+type AutomationStepNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AutomationStepNotFoundException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AutomationStepNotFoundException) GoString() string {
+ return s.String()
+}
+
+func newErrorAutomationStepNotFoundException(v protocol.ResponseMetadata) error {
+ return &AutomationStepNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AutomationStepNotFoundException) Code() string {
+ return "AutomationStepNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *AutomationStepNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AutomationStepNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *AutomationStepNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AutomationStepNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AutomationStepNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
type CancelCommandInput struct {
_ struct{} `type:"structure"`
@@ -13869,16 +14949,16 @@ type Command struct {
// The maximum number of instances that are allowed to run the command at the
// same time. You can specify a number of instances, such as 10, or a percentage
// of instances, such as 10%. The default value is 50. For more information
- // about how to use MaxConcurrency, see Running Commands Using Systems Manager
- // Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html)
+ // about how to use MaxConcurrency, see Running commands using Systems Manager
+ // Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html)
// in the AWS Systems Manager User Guide.
MaxConcurrency *string `min:"1" type:"string"`
// The maximum number of errors allowed before the system stops sending the
// command to additional targets. You can specify a number of errors, such as
// 10, or a percentage or errors, such as 10%. The default value is 0. For more
- // information about how to use MaxErrors, see Running Commands Using Systems
- // Manager Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html)
+ // information about how to use MaxErrors, see Running commands using Systems
+ // Manager Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html)
// in the AWS Systems Manager User Guide.
MaxErrors *string `min:"1" type:"string"`
@@ -13894,8 +14974,8 @@ type Command struct {
OutputS3KeyPrefix *string `type:"string"`
// (Deprecated) You can no longer specify this parameter. The system ignores
- // it. Instead, Systems Manager automatically determines the Amazon S3 bucket
- // region.
+ // it. Instead, Systems Manager automatically determines the Region of the S3
+ // bucket.
OutputS3Region *string `min:"3" type:"string"`
// The parameter values to be inserted in the document when running the command.
@@ -13914,8 +14994,8 @@ type Command struct {
// A detailed status of the command execution. StatusDetails includes more information
// than Status because it includes states resulting from error and concurrency
// control parameters. StatusDetails can show different results than Status.
- // For more information about these statuses, see Understanding Command Statuses
- // (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html)
+ // For more information about these statuses, see Understanding command statuses
+ // (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html)
// in the AWS Systems Manager User Guide. StatusDetails can be one of the following
// values:
//
@@ -13955,6 +15035,9 @@ type Command struct {
// that you specify. Targets is required if you don't provide one or more instance
// IDs in the call.
Targets []*Target `type:"list"`
+
+ // The TimeoutSeconds value specified for a command.
+ TimeoutSeconds *int64 `min:"30" type:"integer"`
}
// String returns the string representation
@@ -14105,6 +15188,12 @@ func (s *Command) SetTargets(v []*Target) *Command {
return s
}
+// SetTimeoutSeconds sets the TimeoutSeconds field's value.
+func (s *Command) SetTimeoutSeconds(v int64) *Command {
+ s.TimeoutSeconds = &v
+ return s
+}
+
// Describes a command filter.
type CommandFilter struct {
_ struct{} `type:"structure"`
@@ -14212,9 +15301,8 @@ type CommandInvocation struct {
// The instance ID in which this invocation was requested.
InstanceId *string `type:"string"`
- // The name of the invocation target. For Amazon EC2 instances this is the value
- // for the aws:Name tag. For on-premises instances, this is the name of the
- // instance.
+ // The name of the invocation target. For EC2 instances this is the value for
+ // the aws:Name tag. For on-premises instances, this is the name of the instance.
InstanceName *string `type:"string"`
// Configurations for sending notifications about command status changes on
@@ -14228,16 +15316,16 @@ type CommandInvocation struct {
// notifications about command status changes on a per instance basis.
ServiceRole *string `type:"string"`
- // The URL to the plugin's StdErr file in Amazon S3, if the Amazon S3 bucket
- // was defined for the parent command. For an invocation, StandardErrorUrl is
- // populated if there is just one plugin defined for the command, and the Amazon
- // S3 bucket was defined for the command.
+ // The URL to the plugin's StdErr file in Amazon S3, if the S3 bucket was defined
+ // for the parent command. For an invocation, StandardErrorUrl is populated
+ // if there is just one plugin defined for the command, and the S3 bucket was
+ // defined for the command.
StandardErrorUrl *string `type:"string"`
- // The URL to the plugin's StdOut file in Amazon S3, if the Amazon S3 bucket
- // was defined for the parent command. For an invocation, StandardOutputUrl
- // is populated if there is just one plugin defined for the command, and the
- // Amazon S3 bucket was defined for the command.
+ // The URL to the plugin's StdOut file in Amazon S3, if the S3 bucket was defined
+ // for the parent command. For an invocation, StandardOutputUrl is populated
+ // if there is just one plugin defined for the command, and the S3 bucket was
+ // defined for the command.
StandardOutputUrl *string `type:"string"`
// Whether or not the invocation succeeded, failed, or is pending.
@@ -14247,7 +15335,7 @@ type CommandInvocation struct {
// targeted by the command). StatusDetails includes more information than Status
// because it includes states resulting from error and concurrency control parameters.
// StatusDetails can show different results than Status. For more information
- // about these statuses, see Understanding Command Statuses (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html)
+ // about these statuses, see Understanding command statuses (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html)
// in the AWS Systems Manager User Guide. StatusDetails can be one of the following
// values:
//
@@ -14416,7 +15504,7 @@ type CommandPlugin struct {
//
// test_folder/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-1234567876543/awsrunShellScript
//
- // test_folder is the name of the Amazon S3 bucket;
+ // test_folder is the name of the S3 bucket;
//
// ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix;
//
@@ -14431,7 +15519,7 @@ type CommandPlugin struct {
//
// test_folder/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-1234567876543/awsrunShellScript
//
- // test_folder is the name of the Amazon S3 bucket;
+ // test_folder is the name of the S3 bucket;
//
// ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix;
//
@@ -14441,8 +15529,7 @@ type CommandPlugin struct {
OutputS3KeyPrefix *string `type:"string"`
// (Deprecated) You can no longer specify this parameter. The system ignores
- // it. Instead, Systems Manager automatically determines the Amazon S3 bucket
- // region.
+ // it. Instead, Systems Manager automatically determines the S3 bucket region.
OutputS3Region *string `min:"3" type:"string"`
// A numeric response code generated after running the plugin.
@@ -14460,8 +15547,7 @@ type CommandPlugin struct {
StandardErrorUrl *string `type:"string"`
// The URL for the complete text written by the plugin to stdout in Amazon S3.
- // If the Amazon S3 bucket for the command was not specified, then this string
- // is empty.
+ // If the S3 bucket for the command was not specified, then this string is empty.
StandardOutputUrl *string `type:"string"`
// The status of this plugin. You can run a document with multiple plugins.
@@ -14470,8 +15556,8 @@ type CommandPlugin struct {
// A detailed status of the plugin execution. StatusDetails includes more information
// than Status because it includes states resulting from error and concurrency
// control parameters. StatusDetails can show different results than Status.
- // For more information about these statuses, see Understanding Command Statuses
- // (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html)
+ // For more information about these statuses, see Understanding command statuses
+ // (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html)
// in the AWS Systems Manager User Guide. StatusDetails can be one of the following
// values:
//
@@ -14658,7 +15744,7 @@ func (s *ComplianceExecutionSummary) SetExecutionType(v string) *ComplianceExecu
// Information about the compliance as defined by the resource type. For example,
// for a patch resource type, Items includes information about the PatchSeverity,
-// Classification, etc.
+// Classification, and so on.
type ComplianceItem struct {
_ struct{} `type:"structure"`
@@ -14675,7 +15761,7 @@ type ComplianceItem struct {
// An ID for the compliance item. For example, if the compliance item is a Windows
// patch, the ID could be the number of the KB article; for example: KB4010320.
- Id *string `min:"1" type:"string"`
+ Id *string `type:"string"`
// An ID for the resource. For a managed instance, this is the instance ID.
ResourceId *string `min:"1" type:"string"`
@@ -14770,7 +15856,7 @@ type ComplianceItemEntry struct {
// The compliance item ID. For example, if the compliance item is a Windows
// patch, the ID could be the number of the KB article.
- Id *string `min:"1" type:"string"`
+ Id *string `type:"string"`
// The severity of the compliance status. Severity can be one of the following:
// Critical, High, Medium, Low, Informational, Unspecified.
@@ -14802,9 +15888,6 @@ func (s ComplianceItemEntry) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *ComplianceItemEntry) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ComplianceItemEntry"}
- if s.Id != nil && len(*s.Id) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Id", 1))
- }
if s.Severity == nil {
invalidParams.Add(request.NewErrParamRequired("Severity"))
}
@@ -14950,6 +16033,63 @@ func (s *ComplianceSummaryItem) SetNonCompliantSummary(v *NonCompliantSummary) *
return s
}
+// You specified too many custom compliance types. You can specify a maximum
+// of 10 different types.
+type ComplianceTypeCountLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s ComplianceTypeCountLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ComplianceTypeCountLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorComplianceTypeCountLimitExceededException(v protocol.ResponseMetadata) error {
+ return &ComplianceTypeCountLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ComplianceTypeCountLimitExceededException) Code() string {
+ return "ComplianceTypeCountLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *ComplianceTypeCountLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ComplianceTypeCountLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *ComplianceTypeCountLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ComplianceTypeCountLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ComplianceTypeCountLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// A summary of resources that are compliant. The summary is organized according
// to the resource count for each compliance type.
type CompliantSummary struct {
@@ -14987,14 +16127,15 @@ func (s *CompliantSummary) SetSeveritySummary(v *SeveritySummary) *CompliantSumm
type CreateActivationInput struct {
_ struct{} `type:"structure"`
- // The name of the registered, managed instance as it will appear in the Amazon
- // EC2 console or when you use the AWS command line tools to list EC2 resources.
+ // The name of the registered, managed instance as it will appear in the Systems
+ // Manager console or when you use the AWS command line tools to list Systems
+ // Manager resources.
//
// Do not enter personally identifiable information in this field.
DefaultInstanceName *string `type:"string"`
// A user-defined description of the resource that you want to register with
- // Amazon EC2.
+ // Systems Manager.
//
// Do not enter personally identifiable information in this field.
Description *string `type:"string"`
@@ -15004,7 +16145,10 @@ type CreateActivationInput struct {
ExpirationDate *time.Time `type:"timestamp"`
// The Amazon Identity and Access Management (IAM) role that you want to assign
- // to the managed instance.
+ // to the managed instance. This IAM role must provide AssumeRole permissions
+ // for the Systems Manager service principal ssm.amazonaws.com. For more information,
+ // see Create an IAM service role for a hybrid environment (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html)
+ // in the AWS Systems Manager User Guide.
//
// IamRole is a required field
IamRole *string `type:"string" required:"true"`
@@ -15231,6 +16375,12 @@ func (s *CreateAssociationBatchOutput) SetSuccessful(v []*AssociationDescription
type CreateAssociationBatchRequestEntry struct {
_ struct{} `type:"structure"`
+ // By default, when you create a new associations, the system runs it immediately
+ // after it is created and then according to the schedule you specified. Specify
+ // this option if you don't want an association to run immediately after you
+ // create it.
+ ApplyOnlyAtCronInterval *bool `type:"boolean"`
+
// Specify a descriptive name for the association.
AssociationName *string `type:"string"`
@@ -15295,7 +16445,7 @@ type CreateAssociationBatchRequestEntry struct {
// Name is a required field
Name *string `type:"string" required:"true"`
- // An Amazon S3 bucket where you want to store the results of this request.
+ // An S3 bucket where you want to store the results of this request.
OutputLocation *InstanceAssociationOutputLocation `type:"structure"`
// A description of the parameters for a document.
@@ -15304,6 +16454,20 @@ type CreateAssociationBatchRequestEntry struct {
// A cron expression that specifies a schedule when the association runs.
ScheduleExpression *string `min:"1" type:"string"`
+ // The mode for generating association compliance. You can specify AUTO or MANUAL.
+ // In AUTO mode, the system uses the status of the association execution to
+ // determine the compliance status. If the association execution runs successfully,
+ // then the association is COMPLIANT. If the association execution doesn't run
+ // successfully, the association is NON-COMPLIANT.
+ //
+ // In MANUAL mode, you must specify the AssociationId as a parameter for the
+ // PutComplianceItems API action. In this case, compliance data is not managed
+ // by State Manager. It is managed by your direct call to the PutComplianceItems
+ // API action.
+ //
+ // By default, all associations use AUTO mode.
+ SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"`
+
// The instances targeted by the request.
Targets []*Target `type:"list"`
}
@@ -15358,6 +16522,12 @@ func (s *CreateAssociationBatchRequestEntry) Validate() error {
return nil
}
+// SetApplyOnlyAtCronInterval sets the ApplyOnlyAtCronInterval field's value.
+func (s *CreateAssociationBatchRequestEntry) SetApplyOnlyAtCronInterval(v bool) *CreateAssociationBatchRequestEntry {
+ s.ApplyOnlyAtCronInterval = &v
+ return s
+}
+
// SetAssociationName sets the AssociationName field's value.
func (s *CreateAssociationBatchRequestEntry) SetAssociationName(v string) *CreateAssociationBatchRequestEntry {
s.AssociationName = &v
@@ -15424,6 +16594,12 @@ func (s *CreateAssociationBatchRequestEntry) SetScheduleExpression(v string) *Cr
return s
}
+// SetSyncCompliance sets the SyncCompliance field's value.
+func (s *CreateAssociationBatchRequestEntry) SetSyncCompliance(v string) *CreateAssociationBatchRequestEntry {
+ s.SyncCompliance = &v
+ return s
+}
+
// SetTargets sets the Targets field's value.
func (s *CreateAssociationBatchRequestEntry) SetTargets(v []*Target) *CreateAssociationBatchRequestEntry {
s.Targets = v
@@ -15433,6 +16609,12 @@ func (s *CreateAssociationBatchRequestEntry) SetTargets(v []*Target) *CreateAsso
type CreateAssociationInput struct {
_ struct{} `type:"structure"`
+ // By default, when you create a new associations, the system runs it immediately
+ // after it is created and then according to the schedule you specified. Specify
+ // this option if you don't want an association to run immediately after you
+ // create it.
+ ApplyOnlyAtCronInterval *bool `type:"boolean"`
+
// Specify a descriptive name for the association.
AssociationName *string `type:"string"`
@@ -15450,10 +16632,11 @@ type CreateAssociationInput struct {
// The instance ID.
//
// InstanceId has been deprecated. To specify an instance ID for an association,
- // use the Targets parameter. If you use the parameter InstanceId, you cannot
- // use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency,
- // OutputLocation, or ScheduleExpression. To use these parameters, you must
- // use the Targets parameter.
+ // use the Targets parameter. Requests that include the parameter InstanceID
+ // with SSM documents that use schema version 2.0 or later will fail. In addition,
+ // if you use the parameter InstanceId, you cannot use the parameters AssociationName,
+ // DocumentVersion, MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression.
+ // To use these parameters, you must use the Targets parameter.
InstanceId *string `type:"string"`
// The maximum number of targets allowed to run the association at the same
@@ -15504,7 +16687,7 @@ type CreateAssociationInput struct {
// Name is a required field
Name *string `type:"string" required:"true"`
- // An Amazon S3 bucket where you want to store the output details of the request.
+ // An S3 bucket where you want to store the output details of the request.
OutputLocation *InstanceAssociationOutputLocation `type:"structure"`
// The parameters for the runtime configuration of the document.
@@ -15513,8 +16696,25 @@ type CreateAssociationInput struct {
// A cron expression when the association will be applied to the target(s).
ScheduleExpression *string `min:"1" type:"string"`
- // The targets (either instances or tags) for the association. You must specify
- // a value for Targets if you don't specify a value for InstanceId.
+ // The mode for generating association compliance. You can specify AUTO or MANUAL.
+ // In AUTO mode, the system uses the status of the association execution to
+ // determine the compliance status. If the association execution runs successfully,
+ // then the association is COMPLIANT. If the association execution doesn't run
+ // successfully, the association is NON-COMPLIANT.
+ //
+ // In MANUAL mode, you must specify the AssociationId as a parameter for the
+ // PutComplianceItems API action. In this case, compliance data is not managed
+ // by State Manager. It is managed by your direct call to the PutComplianceItems
+ // API action.
+ //
+ // By default, all associations use AUTO mode.
+ SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"`
+
+ // The targets for the association. You can target instances by using tags,
+ // AWS Resource Groups, all instances in an AWS account, or individual instance
+ // IDs. For more information about choosing targets for an association, see
+ // Using targets and rate controls with State Manager associations (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html)
+ // in the AWS Systems Manager User Guide.
Targets []*Target `type:"list"`
}
@@ -15568,6 +16768,12 @@ func (s *CreateAssociationInput) Validate() error {
return nil
}
+// SetApplyOnlyAtCronInterval sets the ApplyOnlyAtCronInterval field's value.
+func (s *CreateAssociationInput) SetApplyOnlyAtCronInterval(v bool) *CreateAssociationInput {
+ s.ApplyOnlyAtCronInterval = &v
+ return s
+}
+
// SetAssociationName sets the AssociationName field's value.
func (s *CreateAssociationInput) SetAssociationName(v string) *CreateAssociationInput {
s.AssociationName = &v
@@ -15634,6 +16840,12 @@ func (s *CreateAssociationInput) SetScheduleExpression(v string) *CreateAssociat
return s
}
+// SetSyncCompliance sets the SyncCompliance field's value.
+func (s *CreateAssociationInput) SetSyncCompliance(v string) *CreateAssociationInput {
+ s.SyncCompliance = &v
+ return s
+}
+
// SetTargets sets the Targets field's value.
func (s *CreateAssociationInput) SetTargets(v []*Target) *CreateAssociationInput {
s.Targets = v
@@ -15670,25 +16882,34 @@ type CreateDocumentInput struct {
// document.
Attachments []*AttachmentsSource `type:"list"`
- // A valid JSON or YAML string.
+ // The content for the new SSM document in JSON or YAML format. We recommend
+ // storing the contents for your new document in an external JSON or YAML file
+ // and referencing the file in a command.
+ //
+ // For examples, see the following topics in the AWS Systems Manager User Guide.
+ //
+ // * Create an SSM document (AWS API) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-api.html)
+ //
+ // * Create an SSM document (AWS CLI) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-cli.html)
+ //
+ // * Create an SSM document (API) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-api.html)
//
// Content is a required field
Content *string `min:"1" type:"string" required:"true"`
- // Specify the document format for the request. The document format can be either
- // JSON or YAML. JSON is the default format.
+ // Specify the document format for the request. The document format can be JSON,
+ // YAML, or TEXT. JSON is the default format.
DocumentFormat *string `type:"string" enum:"DocumentFormat"`
- // The type of document to create. Valid document types include: Command, Policy,
- // Automation, Session, and Package.
+ // The type of document to create.
DocumentType *string `type:"string" enum:"DocumentType"`
// A name for the Systems Manager document.
//
- // Do not use the following to begin the names of documents you create. They
- // are reserved by AWS for use as document prefixes:
+ // You can't use the following strings as document name prefixes. These are
+ // reserved by AWS for use as document name prefixes:
//
- // * aws
+ // * aws-
//
// * amazon
//
@@ -15697,6 +16918,15 @@ type CreateDocumentInput struct {
// Name is a required field
Name *string `type:"string" required:"true"`
+ // A list of SSM documents required by a document. This parameter is used exclusively
+ // by AWS AppConfig. When a user creates an AppConfig configuration in an SSM
+ // document, the user must also specify a required document for validation purposes.
+ // In this case, an ApplicationConfiguration document requires an ApplicationConfigurationSchema
+ // document for validation purposes. For more information, see AWS AppConfig
+ // (https://docs.aws.amazon.com/systems-manager/latest/userguide/appconfig.html)
+ // in the AWS Systems Manager User Guide.
+ Requires []*DocumentRequires `min:"1" type:"list"`
+
// Optional metadata that you assign to a resource. Tags enable you to categorize
// a resource in different ways, such as by purpose, owner, or environment.
// For example, you might want to tag an SSM document to identify the types
@@ -15714,8 +16944,8 @@ type CreateDocumentInput struct {
// on. For example, to run a document on EC2 instances, specify the following
// value: /AWS::EC2::Instance. If you specify a value of '/' the document can
// run on all types of resources. If you don't specify a value, the document
- // can't run on any resources. For a list of valid resource types, see AWS Resource
- // Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
+ // can't run on any resources. For a list of valid resource types, see AWS resource
+ // and property types reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
// in the AWS CloudFormation User Guide.
TargetType *string `type:"string"`
@@ -15747,6 +16977,9 @@ func (s *CreateDocumentInput) Validate() error {
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
+ if s.Requires != nil && len(s.Requires) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Requires", 1))
+ }
if s.Attachments != nil {
for i, v := range s.Attachments {
if v == nil {
@@ -15757,6 +16990,16 @@ func (s *CreateDocumentInput) Validate() error {
}
}
}
+ if s.Requires != nil {
+ for i, v := range s.Requires {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Requires", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
if s.Tags != nil {
for i, v := range s.Tags {
if v == nil {
@@ -15804,6 +17047,12 @@ func (s *CreateDocumentInput) SetName(v string) *CreateDocumentInput {
return s
}
+// SetRequires sets the Requires field's value.
+func (s *CreateDocumentInput) SetRequires(v []*DocumentRequires) *CreateDocumentInput {
+ s.Requires = v
+ return s
+}
+
// SetTags sets the Tags field's value.
func (s *CreateDocumentInput) SetTags(v []*Tag) *CreateDocumentInput {
s.Tags = v
@@ -15892,6 +17141,18 @@ type CreateMaintenanceWindowInput struct {
// Schedule is a required field
Schedule *string `min:"1" type:"string" required:"true"`
+ // The number of days to wait after the date and time specified by a CRON expression
+ // before running the maintenance window.
+ //
+ // For example, the following cron expression schedules a maintenance window
+ // to run on the third Tuesday of every month at 11:30 PM.
+ //
+ // cron(0 30 23 ? * TUE#3 *)
+ //
+ // If the schedule offset is 2, the maintenance window won't run until two days
+ // later.
+ ScheduleOffset *int64 `min:"1" type:"integer"`
+
// The time zone that the scheduled maintenance window executions are based
// on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles",
// "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database
@@ -15963,6 +17224,9 @@ func (s *CreateMaintenanceWindowInput) Validate() error {
if s.Schedule != nil && len(*s.Schedule) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Schedule", 1))
}
+ if s.ScheduleOffset != nil && *s.ScheduleOffset < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("ScheduleOffset", 1))
+ }
if s.Tags != nil {
for i, v := range s.Tags {
if v == nil {
@@ -16028,6 +17292,12 @@ func (s *CreateMaintenanceWindowInput) SetSchedule(v string) *CreateMaintenanceW
return s
}
+// SetScheduleOffset sets the ScheduleOffset field's value.
+func (s *CreateMaintenanceWindowInput) SetScheduleOffset(v int64) *CreateMaintenanceWindowInput {
+ s.ScheduleOffset = &v
+ return s
+}
+
// SetScheduleTimezone sets the ScheduleTimezone field's value.
func (s *CreateMaintenanceWindowInput) SetScheduleTimezone(v string) *CreateMaintenanceWindowInput {
s.ScheduleTimezone = &v
@@ -16072,6 +17342,9 @@ func (s *CreateMaintenanceWindowOutput) SetWindowId(v string) *CreateMaintenance
type CreateOpsItemInput struct {
_ struct{} `type:"structure"`
+ // Specify a category to assign to an OpsItem.
+ Category *string `min:"1" type:"string"`
+
// Information about the OpsItem.
//
// Description is a required field
@@ -16100,7 +17373,7 @@ type CreateOpsItemInput struct {
// Use the /aws/resources key in OperationalData to specify a related resource
// in the request. Use the /aws/automations key in OperationalData to associate
// an Automation runbook with the OpsItem. To view AWS CLI example commands
- // that use these keys, see Creating OpsItems Manually (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems)
+ // that use these keys, see Creating OpsItems manually (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems)
// in the AWS Systems Manager User Guide.
OperationalData map[string]*OpsItemDataValue `type:"map"`
@@ -16112,14 +17385,19 @@ type CreateOpsItemInput struct {
// impacted resources, or statuses for the impacted resource.
RelatedOpsItems []*RelatedOpsItem `type:"list"`
- // The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager.
+ // Specify a severity to assign to an OpsItem.
+ Severity *string `min:"1" type:"string"`
+
+ // The origin of the OpsItem, such as Amazon EC2 or Systems Manager.
+ //
+ // The source name can't contain the following strings: aws, amazon, and amzn.
//
// Source is a required field
Source *string `min:"1" type:"string" required:"true"`
// Optional metadata that you assign to a resource. You can restrict access
// to OpsItems by using an inline IAM policy that specifies tags. For more information,
- // see Getting Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html#OpsCenter-getting-started-user-permissions)
+ // see Getting started with OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html#OpsCenter-getting-started-user-permissions)
// in the AWS Systems Manager User Guide.
//
// Tags use a key-value pair. For example:
@@ -16149,6 +17427,9 @@ func (s CreateOpsItemInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateOpsItemInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateOpsItemInput"}
+ if s.Category != nil && len(*s.Category) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Category", 1))
+ }
if s.Description == nil {
invalidParams.Add(request.NewErrParamRequired("Description"))
}
@@ -16158,6 +17439,9 @@ func (s *CreateOpsItemInput) Validate() error {
if s.Priority != nil && *s.Priority < 1 {
invalidParams.Add(request.NewErrParamMinValue("Priority", 1))
}
+ if s.Severity != nil && len(*s.Severity) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Severity", 1))
+ }
if s.Source == nil {
invalidParams.Add(request.NewErrParamRequired("Source"))
}
@@ -16197,6 +17481,12 @@ func (s *CreateOpsItemInput) Validate() error {
return nil
}
+// SetCategory sets the Category field's value.
+func (s *CreateOpsItemInput) SetCategory(v string) *CreateOpsItemInput {
+ s.Category = &v
+ return s
+}
+
// SetDescription sets the Description field's value.
func (s *CreateOpsItemInput) SetDescription(v string) *CreateOpsItemInput {
s.Description = &v
@@ -16227,6 +17517,12 @@ func (s *CreateOpsItemInput) SetRelatedOpsItems(v []*RelatedOpsItem) *CreateOpsI
return s
}
+// SetSeverity sets the Severity field's value.
+func (s *CreateOpsItemInput) SetSeverity(v string) *CreateOpsItemInput {
+ s.Severity = &v
+ return s
+}
+
// SetSource sets the Source field's value.
func (s *CreateOpsItemInput) SetSource(v string) *CreateOpsItemInput {
s.Source = &v
@@ -16277,8 +17573,8 @@ type CreatePatchBaselineInput struct {
// A list of explicitly approved patches for the baseline.
//
// For information about accepted formats for lists of approved patches and
- // rejected patches, see Package Name Formats for Approved and Rejected Patch
- // Lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html)
+ // rejected patches, see About package name formats for approved and rejected
+ // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html)
// in the AWS Systems Manager User Guide.
ApprovedPatches []*string `type:"list"`
@@ -16313,8 +17609,8 @@ type CreatePatchBaselineInput struct {
// A list of explicitly rejected patches for the baseline.
//
// For information about accepted formats for lists of approved patches and
- // rejected patches, see Package Name Formats for Approved and Rejected Patch
- // Lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html)
+ // rejected patches, see About package name formats for approved and rejected
+ // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html)
// in the AWS Systems Manager User Guide.
RejectedPatches []*string `type:"list"`
@@ -16517,15 +17813,27 @@ func (s *CreatePatchBaselineOutput) SetBaselineId(v string) *CreatePatchBaseline
type CreateResourceDataSyncInput struct {
_ struct{} `type:"structure"`
- // Amazon S3 configuration details for the sync.
- //
- // S3Destination is a required field
- S3Destination *ResourceDataSyncS3Destination `type:"structure" required:"true"`
+ // Amazon S3 configuration details for the sync. This parameter is required
+ // if the SyncType value is SyncToDestination.
+ S3Destination *ResourceDataSyncS3Destination `type:"structure"`
// A name for the configuration.
//
// SyncName is a required field
SyncName *string `min:"1" type:"string" required:"true"`
+
+ // Specify information about the data sources to synchronize. This parameter
+ // is required if the SyncType value is SyncFromSource.
+ SyncSource *ResourceDataSyncSource `type:"structure"`
+
+ // Specify SyncToDestination to create a resource data sync that synchronizes
+ // data to an S3 bucket for Inventory. If you specify SyncToDestination, you
+ // must provide a value for S3Destination. Specify SyncFromSource to synchronize
+ // data from a single account and multiple Regions, or multiple AWS accounts
+ // and Regions, as listed in AWS Organizations for Explorer. If you specify
+ // SyncFromSource, you must provide a value for SyncSource. The default value
+ // is SyncToDestination.
+ SyncType *string `min:"1" type:"string"`
}
// String returns the string representation
@@ -16541,20 +17849,25 @@ func (s CreateResourceDataSyncInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateResourceDataSyncInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateResourceDataSyncInput"}
- if s.S3Destination == nil {
- invalidParams.Add(request.NewErrParamRequired("S3Destination"))
- }
if s.SyncName == nil {
invalidParams.Add(request.NewErrParamRequired("SyncName"))
}
if s.SyncName != nil && len(*s.SyncName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SyncName", 1))
}
+ if s.SyncType != nil && len(*s.SyncType) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("SyncType", 1))
+ }
if s.S3Destination != nil {
if err := s.S3Destination.Validate(); err != nil {
invalidParams.AddNested("S3Destination", err.(request.ErrInvalidParams))
}
}
+ if s.SyncSource != nil {
+ if err := s.SyncSource.Validate(); err != nil {
+ invalidParams.AddNested("SyncSource", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -16574,6 +17887,18 @@ func (s *CreateResourceDataSyncInput) SetSyncName(v string) *CreateResourceDataS
return s
}
+// SetSyncSource sets the SyncSource field's value.
+func (s *CreateResourceDataSyncInput) SetSyncSource(v *ResourceDataSyncSource) *CreateResourceDataSyncInput {
+ s.SyncSource = v
+ return s
+}
+
+// SetSyncType sets the SyncType field's value.
+func (s *CreateResourceDataSyncInput) SetSyncType(v string) *CreateResourceDataSyncInput {
+ s.SyncType = &v
+ return s
+}
+
type CreateResourceDataSyncOutput struct {
_ struct{} `type:"structure"`
}
@@ -16588,6 +17913,63 @@ func (s CreateResourceDataSyncOutput) GoString() string {
return s.String()
}
+// You have exceeded the limit for custom schemas. Delete one or more custom
+// schemas and try again.
+type CustomSchemaCountLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s CustomSchemaCountLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CustomSchemaCountLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorCustomSchemaCountLimitExceededException(v protocol.ResponseMetadata) error {
+ return &CustomSchemaCountLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *CustomSchemaCountLimitExceededException) Code() string {
+ return "CustomSchemaCountLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *CustomSchemaCountLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *CustomSchemaCountLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *CustomSchemaCountLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *CustomSchemaCountLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *CustomSchemaCountLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
type DeleteActivationInput struct {
_ struct{} `type:"structure"`
@@ -16702,6 +18084,12 @@ type DeleteDocumentInput struct {
// versions of the document are deleted.
DocumentVersion *string `type:"string"`
+ // Some SSM document types require that you specify a Force flag before you
+ // can delete the document. For example, you must specify a Force flag to delete
+ // a document of type ApplicationConfigurationSchema. You can restrict access
+ // to the Force flag in an AWS Identity and Access Management (IAM) policy.
+ Force *bool `type:"boolean"`
+
// The name of the document.
//
// Name is a required field
@@ -16741,6 +18129,12 @@ func (s *DeleteDocumentInput) SetDocumentVersion(v string) *DeleteDocumentInput
return s
}
+// SetForce sets the Force field's value.
+func (s *DeleteDocumentInput) SetForce(v bool) *DeleteDocumentInput {
+ s.Force = &v
+ return s
+}
+
// SetName sets the Name field's value.
func (s *DeleteDocumentInput) SetName(v string) *DeleteDocumentInput {
s.Name = &v
@@ -16864,7 +18258,7 @@ type DeleteInventoryOutput struct {
DeletionId *string `type:"string"`
// A summary of the delete operation. For more information about this summary,
- // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-delete.html#sysman-inventory-delete-summary)
+ // see Deleting custom inventory (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete-summary)
// in the AWS Systems Manager User Guide.
DeletionSummary *InventoryDeletionSummary `type:"structure"`
@@ -17164,6 +18558,9 @@ type DeleteResourceDataSyncInput struct {
//
// SyncName is a required field
SyncName *string `min:"1" type:"string" required:"true"`
+
+ // Specify the type of resource data sync to delete.
+ SyncType *string `min:"1" type:"string"`
}
// String returns the string representation
@@ -17185,6 +18582,9 @@ func (s *DeleteResourceDataSyncInput) Validate() error {
if s.SyncName != nil && len(*s.SyncName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SyncName", 1))
}
+ if s.SyncType != nil && len(*s.SyncType) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("SyncType", 1))
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -17198,6 +18598,12 @@ func (s *DeleteResourceDataSyncInput) SetSyncName(v string) *DeleteResourceDataS
return s
}
+// SetSyncType sets the SyncType field's value.
+func (s *DeleteResourceDataSyncInput) SetSyncType(v string) *DeleteResourceDataSyncInput {
+ s.SyncType = &v
+ return s
+}
+
type DeleteResourceDataSyncOutput struct {
_ struct{} `type:"structure"`
}
@@ -18476,6 +19882,10 @@ 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 `type:"list"`
+
+ // A list of AWS accounts where the current document is shared and the version
+ // shared with each account.
+ AccountSharingInfoList []*AccountSharingInfo `type:"list"`
}
// String returns the string representation
@@ -18494,6 +19904,12 @@ func (s *DescribeDocumentPermissionOutput) SetAccountIds(v []*string) *DescribeD
return s
}
+// SetAccountSharingInfoList sets the AccountSharingInfoList field's value.
+func (s *DescribeDocumentPermissionOutput) SetAccountSharingInfoList(v []*AccountSharingInfo) *DescribeDocumentPermissionOutput {
+ s.AccountSharingInfoList = v
+ return s
+}
+
type DescribeEffectiveInstanceAssociationsInput struct {
_ struct{} `type:"structure"`
@@ -18784,17 +20200,16 @@ type DescribeInstanceInformationInput struct {
_ struct{} `type:"structure"`
// One or more filters. Use a filter to return a more specific list of instances.
- // You can filter on Amazon EC2 tag. Specify tags by using a key-value mapping.
+ // You can filter based on tags applied to EC2 instances. Use this Filters data
+ // type instead of InstanceInformationFilterList, which is deprecated.
Filters []*InstanceInformationStringFilter `type:"list"`
// This is a legacy method. We recommend that you don't use this method. Instead,
- // use the InstanceInformationFilter action. The InstanceInformationFilter action
- // enables you to return instance information by using tags that are specified
- // as a key-value mapping.
+ // use the Filters data type. Filters enables you to return instance information
+ // by filtering based on tags applied to managed instances.
//
- // If you do use this method, then you can't use the InstanceInformationFilter
- // action. Using this method and the InstanceInformationFilter action causes
- // an exception error.
+ // Attempting to use InstanceInformationFilterList and Filters leads to an exception
+ // error.
InstanceInformationFilterList []*InstanceInformationFilter `type:"list"`
// The maximum number of items to return for this call. The call also returns
@@ -20334,7 +21749,7 @@ type DescribeOpsItemsInput struct {
// A token to start the list. Use this token to get the next set of results.
NextToken *string `type:"string"`
- // One or more filters to limit the reponse.
+ // One or more filters to limit the response.
//
// * Key: CreatedTime Operations: GreaterThan, LessThan
//
@@ -20454,7 +21869,7 @@ func (s *DescribeOpsItemsOutput) SetOpsItemSummaries(v []*OpsItemSummary) *Descr
type DescribeParametersInput struct {
_ struct{} `type:"structure"`
- // One or more filters. Use a filter to return a more specific list of results.
+ // This data type is deprecated. Instead, use ParameterFilters.
Filters []*ParametersFilter `type:"list"`
// The maximum number of items to return for this call. The call also returns
@@ -20540,8 +21955,7 @@ func (s *DescribeParametersInput) SetParameterFilters(v []*ParameterStringFilter
type DescribeParametersOutput struct {
_ struct{} `type:"structure"`
- // The token to use when requesting the next set of items. If there are no additional
- // items to return, the string is empty.
+ // The token to use when requesting the next set of items.
NextToken *string `type:"string"`
// Parameters returned by the request.
@@ -20730,6 +22144,11 @@ type DescribePatchGroupStateOutput struct {
// The number of instances with installed patches.
InstancesWithInstalledPatches *int64 `type:"integer"`
+ // The number of instances with patches installed by Patch Manager that have
+ // not been rebooted after the patch installation. The status of these instances
+ // is NON_COMPLIANT.
+ InstancesWithInstalledPendingRebootPatches *int64 `type:"integer"`
+
// The number of instances with patches installed that are specified in a RejectedPatches
// list. Patches with a status of INSTALLED_REJECTED were typically installed
// before they were added to a RejectedPatches list.
@@ -20783,6 +22202,12 @@ func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledPatches(v int64
return s
}
+// SetInstancesWithInstalledPendingRebootPatches sets the InstancesWithInstalledPendingRebootPatches field's value.
+func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledPendingRebootPatches(v int64) *DescribePatchGroupStateOutput {
+ s.InstancesWithInstalledPendingRebootPatches = &v
+ return s
+}
+
// SetInstancesWithInstalledRejectedPatches sets the InstancesWithInstalledRejectedPatches field's value.
func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledRejectedPatches(v int64) *DescribePatchGroupStateOutput {
s.InstancesWithInstalledRejectedPatches = &v
@@ -21145,6 +22570,62 @@ func (s *DescribeSessionsOutput) SetSessions(v []*Session) *DescribeSessionsOutp
return s
}
+// The specified document already exists.
+type DocumentAlreadyExists struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s DocumentAlreadyExists) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DocumentAlreadyExists) GoString() string {
+ return s.String()
+}
+
+func newErrorDocumentAlreadyExists(v protocol.ResponseMetadata) error {
+ return &DocumentAlreadyExists{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *DocumentAlreadyExists) Code() string {
+ return "DocumentAlreadyExists"
+}
+
+// Message returns the exception's message.
+func (s *DocumentAlreadyExists) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *DocumentAlreadyExists) OrigErr() error {
+ return nil
+}
+
+func (s *DocumentAlreadyExists) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *DocumentAlreadyExists) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *DocumentAlreadyExists) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// A default version of a document.
type DocumentDefaultVersionDescription struct {
_ struct{} `type:"structure"`
@@ -21192,7 +22673,7 @@ type DocumentDescription struct {
_ struct{} `type:"structure"`
// Details about the document attachments, including names, locations, sizes,
- // etc.
+ // and so on.
AttachmentsInformation []*AttachmentInformation `type:"list"`
// The date when the document was created.
@@ -21238,6 +22719,10 @@ type DocumentDescription struct {
// The list of OS platforms compatible with this Systems Manager document.
PlatformTypes []*string `type:"list"`
+ // A list of SSM documents required by a document. For example, an ApplicationConfiguration
+ // document requires an ApplicationConfigurationSchema document.
+ Requires []*DocumentRequires `min:"1" type:"list"`
+
// The schema version.
SchemaVersion *string `type:"string"`
@@ -21258,7 +22743,7 @@ type DocumentDescription struct {
// The target type which defines the kinds of resources the document can run
// on. For example, /AWS::EC2::Instance. For a list of valid resource types,
- // see AWS Resource Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
+ // see AWS resource and property types reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
// in the AWS CloudFormation User Guide.
TargetType *string `type:"string"`
@@ -21360,6 +22845,12 @@ func (s *DocumentDescription) SetPlatformTypes(v []*string) *DocumentDescription
return s
}
+// SetRequires sets the Requires field's value.
+func (s *DocumentDescription) SetRequires(v []*DocumentRequires) *DocumentDescription {
+ s.Requires = v
+ return s
+}
+
// SetSchemaVersion sets the SchemaVersion field's value.
func (s *DocumentDescription) SetSchemaVersion(v string) *DocumentDescription {
s.SchemaVersion = &v
@@ -21402,7 +22893,7 @@ func (s *DocumentDescription) SetVersionName(v string) *DocumentDescription {
return s
}
-// Describes a filter.
+// This data type is deprecated. Instead, use DocumentKeyValuesFilter.
type DocumentFilter struct {
_ struct{} `type:"structure"`
@@ -21480,6 +22971,10 @@ type DocumentIdentifier struct {
// The operating system platform.
PlatformTypes []*string `type:"list"`
+ // A list of SSM documents required by a document. For example, an ApplicationConfiguration
+ // document requires an ApplicationConfigurationSchema document.
+ Requires []*DocumentRequires `min:"1" type:"list"`
+
// The schema version.
SchemaVersion *string `type:"string"`
@@ -21488,7 +22983,7 @@ type DocumentIdentifier struct {
// The target type which defines the kinds of resources the document can run
// on. For example, /AWS::EC2::Instance. For a list of valid resource types,
- // see AWS Resource Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
+ // see AWS resource and property types reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
// in the AWS CloudFormation User Guide.
TargetType *string `type:"string"`
@@ -21544,6 +23039,12 @@ func (s *DocumentIdentifier) SetPlatformTypes(v []*string) *DocumentIdentifier {
return s
}
+// SetRequires sets the Requires field's value.
+func (s *DocumentIdentifier) SetRequires(v []*DocumentRequires) *DocumentIdentifier {
+ s.Requires = v
+ return s
+}
+
// SetSchemaVersion sets the SchemaVersion field's value.
func (s *DocumentIdentifier) SetSchemaVersion(v string) *DocumentIdentifier {
s.SchemaVersion = &v
@@ -21572,7 +23073,8 @@ func (s *DocumentIdentifier) SetVersionName(v string) *DocumentIdentifier {
//
// 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.
+// Other valid values include Owner, Name, PlatformTypes, DocumentType, and
+// TargetType.
//
// Note that only one Owner can be specified in a request. For example: Key=Owner,Values=Self.
//
@@ -21587,7 +23089,7 @@ func (s *DocumentIdentifier) SetVersionName(v string) *DocumentIdentifier {
// 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].
+// 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:
@@ -21638,6 +23140,62 @@ func (s *DocumentKeyValuesFilter) SetValues(v []*string) *DocumentKeyValuesFilte
return s
}
+// You can have at most 500 active Systems Manager documents.
+type DocumentLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s DocumentLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DocumentLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorDocumentLimitExceeded(v protocol.ResponseMetadata) error {
+ return &DocumentLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *DocumentLimitExceeded) Code() string {
+ return "DocumentLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *DocumentLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *DocumentLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *DocumentLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *DocumentLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *DocumentLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Parameters specified in a System Manager document that run on the server
// when the command is run.
type DocumentParameter struct {
@@ -21692,6 +23250,113 @@ func (s *DocumentParameter) SetType(v string) *DocumentParameter {
return s
}
+// The document cannot be shared with more AWS user accounts. You can share
+// a document with a maximum of 20 accounts. You can publicly share up to five
+// documents. If you need to increase this limit, contact AWS Support.
+type DocumentPermissionLimit struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s DocumentPermissionLimit) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DocumentPermissionLimit) GoString() string {
+ return s.String()
+}
+
+func newErrorDocumentPermissionLimit(v protocol.ResponseMetadata) error {
+ return &DocumentPermissionLimit{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *DocumentPermissionLimit) Code() string {
+ return "DocumentPermissionLimit"
+}
+
+// Message returns the exception's message.
+func (s *DocumentPermissionLimit) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *DocumentPermissionLimit) OrigErr() error {
+ return nil
+}
+
+func (s *DocumentPermissionLimit) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *DocumentPermissionLimit) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *DocumentPermissionLimit) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// An SSM document required by the current document.
+type DocumentRequires struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the required SSM document. The name can be an Amazon Resource
+ // Name (ARN).
+ //
+ // Name is a required field
+ Name *string `type:"string" required:"true"`
+
+ // The document version required by the current document.
+ Version *string `type:"string"`
+}
+
+// String returns the string representation
+func (s DocumentRequires) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DocumentRequires) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DocumentRequires) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DocumentRequires"}
+ 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 *DocumentRequires) SetName(v string) *DocumentRequires {
+ s.Name = &v
+ return s
+}
+
+// SetVersion sets the Version field's value.
+func (s *DocumentRequires) SetVersion(v string) *DocumentRequires {
+ s.Version = &v
+ return s
+}
+
// Version information about the document.
type DocumentVersionInfo struct {
_ struct{} `type:"structure"`
@@ -21785,6 +23450,294 @@ func (s *DocumentVersionInfo) SetVersionName(v string) *DocumentVersionInfo {
return s
}
+// The document has too many versions. Delete one or more document versions
+// and try again.
+type DocumentVersionLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s DocumentVersionLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DocumentVersionLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorDocumentVersionLimitExceeded(v protocol.ResponseMetadata) error {
+ return &DocumentVersionLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *DocumentVersionLimitExceeded) Code() string {
+ return "DocumentVersionLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *DocumentVersionLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *DocumentVersionLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *DocumentVersionLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *DocumentVersionLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *DocumentVersionLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Error returned when the ID specified for a resource, such as a maintenance
+// window or Patch baseline, doesn't exist.
+//
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
+type DoesNotExistException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s DoesNotExistException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DoesNotExistException) GoString() string {
+ return s.String()
+}
+
+func newErrorDoesNotExistException(v protocol.ResponseMetadata) error {
+ return &DoesNotExistException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *DoesNotExistException) Code() string {
+ return "DoesNotExistException"
+}
+
+// Message returns the exception's message.
+func (s *DoesNotExistException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *DoesNotExistException) OrigErr() error {
+ return nil
+}
+
+func (s *DoesNotExistException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *DoesNotExistException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *DoesNotExistException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The content of the association document matches another document. Change
+// the content of the document and try again.
+type DuplicateDocumentContent struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s DuplicateDocumentContent) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DuplicateDocumentContent) GoString() string {
+ return s.String()
+}
+
+func newErrorDuplicateDocumentContent(v protocol.ResponseMetadata) error {
+ return &DuplicateDocumentContent{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *DuplicateDocumentContent) Code() string {
+ return "DuplicateDocumentContent"
+}
+
+// Message returns the exception's message.
+func (s *DuplicateDocumentContent) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *DuplicateDocumentContent) OrigErr() error {
+ return nil
+}
+
+func (s *DuplicateDocumentContent) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *DuplicateDocumentContent) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *DuplicateDocumentContent) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The version name has already been used in this document. Specify a different
+// version name, and then try again.
+type DuplicateDocumentVersionName struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s DuplicateDocumentVersionName) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DuplicateDocumentVersionName) GoString() string {
+ return s.String()
+}
+
+func newErrorDuplicateDocumentVersionName(v protocol.ResponseMetadata) error {
+ return &DuplicateDocumentVersionName{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *DuplicateDocumentVersionName) Code() string {
+ return "DuplicateDocumentVersionName"
+}
+
+// Message returns the exception's message.
+func (s *DuplicateDocumentVersionName) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *DuplicateDocumentVersionName) OrigErr() error {
+ return nil
+}
+
+func (s *DuplicateDocumentVersionName) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *DuplicateDocumentVersionName) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *DuplicateDocumentVersionName) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// You cannot specify an instance ID in more than one association.
+type DuplicateInstanceId struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s DuplicateInstanceId) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DuplicateInstanceId) GoString() string {
+ return s.String()
+}
+
+func newErrorDuplicateInstanceId(v protocol.ResponseMetadata) error {
+ return &DuplicateInstanceId{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *DuplicateInstanceId) Code() string {
+ return "DuplicateInstanceId"
+}
+
+// Message returns the exception's message.
+func (s *DuplicateInstanceId) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *DuplicateInstanceId) OrigErr() error {
+ return nil
+}
+
+func (s *DuplicateInstanceId) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *DuplicateInstanceId) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *DuplicateInstanceId) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// The EffectivePatch structure defines metadata about a patch along with the
// approval state of the patch in a particular patch baseline. The approval
// state includes information about whether the patch is currently approved,
@@ -21912,6 +23865,63 @@ func (s *FailureDetails) SetFailureType(v string) *FailureDetails {
return s
}
+// You attempted to register a LAMBDA or STEP_FUNCTIONS task in a region where
+// the corresponding service is not available.
+type FeatureNotAvailableException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s FeatureNotAvailableException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FeatureNotAvailableException) GoString() string {
+ return s.String()
+}
+
+func newErrorFeatureNotAvailableException(v protocol.ResponseMetadata) error {
+ return &FeatureNotAvailableException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *FeatureNotAvailableException) Code() string {
+ return "FeatureNotAvailableException"
+}
+
+// Message returns the exception's message.
+func (s *FeatureNotAvailableException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *FeatureNotAvailableException) OrigErr() error {
+ return nil
+}
+
+func (s *FeatureNotAvailableException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *FeatureNotAvailableException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *FeatureNotAvailableException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
type GetAutomationExecutionInput struct {
_ struct{} `type:"structure"`
@@ -21978,6 +23988,104 @@ func (s *GetAutomationExecutionOutput) SetAutomationExecution(v *AutomationExecu
return s
}
+type GetCalendarStateInput struct {
+ _ struct{} `type:"structure"`
+
+ // (Optional) The specific time for which you want to get calendar state information,
+ // in ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) format. If you do not
+ // add AtTime, the current time is assumed.
+ AtTime *string `type:"string"`
+
+ // The names or Amazon Resource Names (ARNs) of the Systems Manager documents
+ // that represent the calendar entries for which you want to get the state.
+ //
+ // CalendarNames is a required field
+ CalendarNames []*string `type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s GetCalendarStateInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetCalendarStateInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *GetCalendarStateInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "GetCalendarStateInput"}
+ if s.CalendarNames == nil {
+ invalidParams.Add(request.NewErrParamRequired("CalendarNames"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAtTime sets the AtTime field's value.
+func (s *GetCalendarStateInput) SetAtTime(v string) *GetCalendarStateInput {
+ s.AtTime = &v
+ return s
+}
+
+// SetCalendarNames sets the CalendarNames field's value.
+func (s *GetCalendarStateInput) SetCalendarNames(v []*string) *GetCalendarStateInput {
+ s.CalendarNames = v
+ return s
+}
+
+type GetCalendarStateOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The time, as an ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) string,
+ // that you specified in your command. If you did not specify a time, GetCalendarState
+ // uses the current time.
+ AtTime *string `type:"string"`
+
+ // The time, as an ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) string,
+ // that the calendar state will change. If the current calendar state is OPEN,
+ // NextTransitionTime indicates when the calendar state changes to CLOSED, and
+ // vice-versa.
+ NextTransitionTime *string `type:"string"`
+
+ // The state of the calendar. An OPEN calendar indicates that actions are allowed
+ // to proceed, and a CLOSED calendar indicates that actions are not allowed
+ // to proceed.
+ State *string `type:"string" enum:"CalendarState"`
+}
+
+// String returns the string representation
+func (s GetCalendarStateOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetCalendarStateOutput) GoString() string {
+ return s.String()
+}
+
+// SetAtTime sets the AtTime field's value.
+func (s *GetCalendarStateOutput) SetAtTime(v string) *GetCalendarStateOutput {
+ s.AtTime = &v
+ return s
+}
+
+// SetNextTransitionTime sets the NextTransitionTime field's value.
+func (s *GetCalendarStateOutput) SetNextTransitionTime(v string) *GetCalendarStateOutput {
+ s.NextTransitionTime = &v
+ return s
+}
+
+// SetState sets the State field's value.
+func (s *GetCalendarStateOutput) SetState(v string) *GetCalendarStateOutput {
+ s.State = &v
+ return s
+}
+
type GetCommandInvocationInput struct {
_ struct{} `type:"structure"`
@@ -21987,7 +24095,7 @@ type GetCommandInvocationInput struct {
CommandId *string `min:"36" type:"string" required:"true"`
// (Required) The ID of the managed instance targeted by the command. A managed
- // instance can be an Amazon EC2 instance or an instance in your hybrid environment
+ // instance can be an EC2 instance or an instance in your hybrid environment
// that is configured for Systems Manager.
//
// InstanceId is a required field
@@ -22089,8 +24197,8 @@ type GetCommandInvocationOutput struct {
ExecutionStartDateTime *string `type:"string"`
// The ID of the managed instance targeted by the command. A managed instance
- // can be an Amazon EC2 instance or an instance in your hybrid environment that
- // is configured for Systems Manager.
+ // can be an EC2 instance or an instance in your hybrid environment that is
+ // configured for Systems Manager.
InstanceId *string `type:"string"`
// The name of the plugin for which you want detailed results. For example,
@@ -22116,7 +24224,7 @@ type GetCommandInvocationOutput struct {
StandardOutputContent *string `type:"string"`
// The URL for the complete text written by the plugin to stdout in Amazon S3.
- // If an Amazon S3 bucket was not specified, then this string is empty.
+ // If an S3 bucket was not specified, then this string is empty.
StandardOutputUrl *string `type:"string"`
// The status of this invocation plugin. This status can be different than StatusDetails.
@@ -22126,7 +24234,7 @@ type GetCommandInvocationOutput struct {
// includes more information than Status because it includes states resulting
// from error and concurrency control parameters. StatusDetails can show different
// results than Status. For more information about these statuses, see Understanding
- // Command Statuses (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html)
+ // command statuses (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html)
// in the AWS Systems Manager User Guide. StatusDetails can be one of the following
// values:
//
@@ -22137,10 +24245,10 @@ type GetCommandInvocationOutput struct {
//
// * Delayed: The system attempted to send the command to the target, but
// the target was not available. The instance might not be available because
- // of network issues, the instance was stopped, etc. The system will try
- // to deliver the command again.
+ // of network issues, because the instance was stopped, or for similar reasons.
+ // The system will try to send the command again.
//
- // * Success: The command or plugin was run successfully. This is a terminal
+ // * Success: The command or plugin ran successfully. This is a terminal
// state.
//
// * Delivery Timed Out: The command was not delivered to the instance before
@@ -22538,7 +24646,7 @@ type GetDocumentInput struct {
// An optional field specifying the version of the artifact associated with
// the document. For example, "Release 12, Update 6". This value is unique across
- // all versions of a document, and cannot be changed.
+ // all versions of a document and can't be changed.
VersionName *string `type:"string"`
}
@@ -22593,7 +24701,7 @@ type GetDocumentOutput struct {
_ struct{} `type:"structure"`
// A description of the document attachments, including names, locations, sizes,
- // etc.
+ // and so on.
AttachmentsContent []*AttachmentContent `type:"list"`
// The contents of the Systems Manager document.
@@ -22611,6 +24719,10 @@ type GetDocumentOutput struct {
// The name of the Systems Manager document.
Name *string `type:"string"`
+ // A list of SSM documents required by a document. For example, an ApplicationConfiguration
+ // document requires an ApplicationConfigurationSchema document.
+ Requires []*DocumentRequires `min:"1" type:"list"`
+
// The status of the Systems Manager document, such as Creating, Active, Updating,
// Failed, and Deleting.
Status *string `type:"string" enum:"DocumentStatus"`
@@ -22673,6 +24785,12 @@ func (s *GetDocumentOutput) SetName(v string) *GetDocumentOutput {
return s
}
+// SetRequires sets the Requires field's value.
+func (s *GetDocumentOutput) SetRequires(v []*DocumentRequires) *GetDocumentOutput {
+ s.Requires = v
+ return s
+}
+
// SetStatus sets the Status field's value.
func (s *GetDocumentOutput) SetStatus(v string) *GetDocumentOutput {
s.Status = &v
@@ -23546,6 +25664,10 @@ type GetMaintenanceWindowOutput struct {
// The schedule of the maintenance window in the form of a cron or rate expression.
Schedule *string `min:"1" type:"string"`
+ // The number of days to wait to run a maintenance window after the scheduled
+ // CRON expression date and time.
+ ScheduleOffset *int64 `min:"1" type:"integer"`
+
// The time zone that the scheduled maintenance window executions are based
// on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles",
// "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database
@@ -23637,6 +25759,12 @@ func (s *GetMaintenanceWindowOutput) SetSchedule(v string) *GetMaintenanceWindow
return s
}
+// SetScheduleOffset sets the ScheduleOffset field's value.
+func (s *GetMaintenanceWindowOutput) SetScheduleOffset(v int64) *GetMaintenanceWindowOutput {
+ s.ScheduleOffset = &v
+ return s
+}
+
// SetScheduleTimezone sets the ScheduleTimezone field's value.
func (s *GetMaintenanceWindowOutput) SetScheduleTimezone(v string) *GetMaintenanceWindowOutput {
s.ScheduleTimezone = &v
@@ -23934,9 +26062,7 @@ type GetOpsSummaryInput struct {
// Optional aggregators that return counts of OpsItems based on one or more
// expressions.
- //
- // Aggregators is a required field
- Aggregators []*OpsAggregator `min:"1" type:"list" required:"true"`
+ Aggregators []*OpsAggregator `min:"1" type:"list"`
// Optional filters used to scope down the returned OpsItems.
Filters []*OpsFilter `min:"1" type:"list"`
@@ -23948,6 +26074,12 @@ type GetOpsSummaryInput struct {
// A token to start the list. Use this token to get the next set of results.
NextToken *string `type:"string"`
+
+ // The OpsItem data type to return.
+ ResultAttributes []*OpsResultAttribute `min:"1" type:"list"`
+
+ // Specify the name of a resource data sync to get.
+ SyncName *string `min:"1" type:"string"`
}
// String returns the string representation
@@ -23963,9 +26095,6 @@ func (s GetOpsSummaryInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetOpsSummaryInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetOpsSummaryInput"}
- if s.Aggregators == nil {
- invalidParams.Add(request.NewErrParamRequired("Aggregators"))
- }
if s.Aggregators != nil && len(s.Aggregators) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1))
}
@@ -23975,6 +26104,12 @@ func (s *GetOpsSummaryInput) Validate() error {
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
+ if s.ResultAttributes != nil && len(s.ResultAttributes) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ResultAttributes", 1))
+ }
+ if s.SyncName != nil && len(*s.SyncName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("SyncName", 1))
+ }
if s.Aggregators != nil {
for i, v := range s.Aggregators {
if v == nil {
@@ -23995,6 +26130,16 @@ func (s *GetOpsSummaryInput) Validate() error {
}
}
}
+ if s.ResultAttributes != nil {
+ for i, v := range s.ResultAttributes {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResultAttributes", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -24026,6 +26171,18 @@ func (s *GetOpsSummaryInput) SetNextToken(v string) *GetOpsSummaryInput {
return s
}
+// SetResultAttributes sets the ResultAttributes field's value.
+func (s *GetOpsSummaryInput) SetResultAttributes(v []*OpsResultAttribute) *GetOpsSummaryInput {
+ s.ResultAttributes = v
+ return s
+}
+
+// SetSyncName sets the SyncName field's value.
+func (s *GetOpsSummaryInput) SetSyncName(v string) *GetOpsSummaryInput {
+ s.SyncName = &v
+ return s
+}
+
type GetOpsSummaryOutput struct {
_ struct{} `type:"structure"`
@@ -24253,8 +26410,6 @@ type GetParametersByPathInput struct {
NextToken *string `type:"string"`
// Filters to limit the request results.
- //
- // You can't filter using the parameter name.
ParameterFilters []*ParameterStringFilter `type:"list"`
// The hierarchy for the parameter. Hierarchies start with a forward slash (/)
@@ -24762,7 +26917,8 @@ func (s *GetPatchBaselineOutput) SetSources(v []*PatchSource) *GetPatchBaselineO
type GetServiceSettingInput struct {
_ struct{} `type:"structure"`
- // The ID of the service setting to get.
+ // The ID of the service setting to get. The setting ID can be /ssm/parameter-store/default-parameter-tier,
+ // /ssm/parameter-store/high-throughput-enabled, or /ssm/managed-instance/activation-tier.
//
// SettingId is a required field
SettingId *string `min:"1" type:"string" required:"true"`
@@ -24824,6 +26980,243 @@ func (s *GetServiceSettingOutput) SetServiceSetting(v *ServiceSetting) *GetServi
return s
}
+// A hierarchy can have a maximum of 15 levels. For more information, see Requirements
+// and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html)
+// in the AWS Systems Manager User Guide.
+type HierarchyLevelLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // A hierarchy can have a maximum of 15 levels. For more information, see Requirements
+ // and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html)
+ // in the AWS Systems Manager User Guide.
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s HierarchyLevelLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s HierarchyLevelLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorHierarchyLevelLimitExceededException(v protocol.ResponseMetadata) error {
+ return &HierarchyLevelLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *HierarchyLevelLimitExceededException) Code() string {
+ return "HierarchyLevelLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *HierarchyLevelLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *HierarchyLevelLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *HierarchyLevelLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *HierarchyLevelLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *HierarchyLevelLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Parameter Store does not support changing a parameter type in a hierarchy.
+// For example, you can't change a parameter from a String type to a SecureString
+// type. You must create a new, unique parameter.
+type HierarchyTypeMismatchException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // Parameter Store does not support changing a parameter type in a hierarchy.
+ // For example, you can't change a parameter from a String type to a SecureString
+ // type. You must create a new, unique parameter.
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s HierarchyTypeMismatchException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s HierarchyTypeMismatchException) GoString() string {
+ return s.String()
+}
+
+func newErrorHierarchyTypeMismatchException(v protocol.ResponseMetadata) error {
+ return &HierarchyTypeMismatchException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *HierarchyTypeMismatchException) Code() string {
+ return "HierarchyTypeMismatchException"
+}
+
+// Message returns the exception's message.
+func (s *HierarchyTypeMismatchException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *HierarchyTypeMismatchException) OrigErr() error {
+ return nil
+}
+
+func (s *HierarchyTypeMismatchException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *HierarchyTypeMismatchException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *HierarchyTypeMismatchException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// 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.
+type IdempotentParameterMismatch struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s IdempotentParameterMismatch) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IdempotentParameterMismatch) GoString() string {
+ return s.String()
+}
+
+func newErrorIdempotentParameterMismatch(v protocol.ResponseMetadata) error {
+ return &IdempotentParameterMismatch{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *IdempotentParameterMismatch) Code() string {
+ return "IdempotentParameterMismatch"
+}
+
+// Message returns the exception's message.
+func (s *IdempotentParameterMismatch) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *IdempotentParameterMismatch) OrigErr() error {
+ return nil
+}
+
+func (s *IdempotentParameterMismatch) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *IdempotentParameterMismatch) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *IdempotentParameterMismatch) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// There is a conflict in the policies specified for this parameter. You can't,
+// for example, specify two Expiration policies for a parameter. Review your
+// policies, and try again.
+type IncompatiblePolicyException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s IncompatiblePolicyException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IncompatiblePolicyException) GoString() string {
+ return s.String()
+}
+
+func newErrorIncompatiblePolicyException(v protocol.ResponseMetadata) error {
+ return &IncompatiblePolicyException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *IncompatiblePolicyException) Code() string {
+ return "IncompatiblePolicyException"
+}
+
+// Message returns the exception's message.
+func (s *IncompatiblePolicyException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *IncompatiblePolicyException) OrigErr() error {
+ return nil
+}
+
+func (s *IncompatiblePolicyException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *IncompatiblePolicyException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *IncompatiblePolicyException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Status information about the aggregated associations.
type InstanceAggregatedAssociationOverview struct {
_ struct{} `type:"structure"`
@@ -24908,11 +27301,11 @@ func (s *InstanceAssociation) SetInstanceId(v string) *InstanceAssociation {
return s
}
-// An Amazon S3 bucket where you want to store the results of this request.
+// An S3 bucket where you want to store the results of this request.
type InstanceAssociationOutputLocation struct {
_ struct{} `type:"structure"`
- // An Amazon S3 bucket where you want to store the results of this request.
+ // An S3 bucket where you want to store the results of this request.
S3Location *S3OutputLocation `type:"structure"`
}
@@ -24947,11 +27340,11 @@ func (s *InstanceAssociationOutputLocation) SetS3Location(v *S3OutputLocation) *
return s
}
-// The URL of Amazon S3 bucket where you want to store the results of this request.
+// The URL of S3 bucket where you want to store the results of this request.
type InstanceAssociationOutputUrl struct {
_ struct{} `type:"structure"`
- // The URL of Amazon S3 bucket where you want to store the results of this request.
+ // The URL of S3 bucket where you want to store the results of this request.
S3OutputUrl *S3OutputUrl `type:"structure"`
}
@@ -25005,8 +27398,7 @@ type InstanceAssociationStatusInfo struct {
// The name of the association.
Name *string `type:"string"`
- // A URL for an Amazon S3 bucket where you want to store the results of this
- // request.
+ // A URL for an S3 bucket where you want to store the results of this request.
OutputUrl *InstanceAssociationOutputUrl `type:"structure"`
// Status information about the instance association.
@@ -25119,7 +27511,7 @@ type InstanceInformation struct {
// The Amazon Identity and Access Management (IAM) role assigned to the on-premises
// Systems Manager managed instances. This call does not return the IAM role
- // for Amazon EC2 instances.
+ // for EC2 instances.
IamRole *string `type:"string"`
// The instance ID.
@@ -25426,12 +27818,12 @@ type InstancePatchState struct {
FailedCount *int64 `type:"integer"`
// An https URL or an Amazon S3 path-style URL to a list of patches to be installed.
- // This patch installation list, which you maintain in an Amazon S3 bucket in
- // YAML format and specify in the SSM document AWS-RunPatchBaseline, overrides
- // the patches specified by the default patch baseline.
+ // This patch installation list, which you maintain in an S3 bucket in YAML
+ // format and specify in the SSM document AWS-RunPatchBaseline, overrides the
+ // patches specified by the default patch baseline.
//
// For more information about the InstallOverrideList parameter, see About the
- // SSM Document AWS-RunPatchBaseline (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html)
+ // SSM document AWS-RunPatchBaseline (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html)
// in the AWS Systems Manager User Guide.
InstallOverrideList *string `min:"1" type:"string"`
@@ -25442,6 +27834,10 @@ type InstancePatchState struct {
// on the instance.
InstalledOtherCount *int64 `type:"integer"`
+ // The number of patches installed by Patch Manager since the last time the
+ // instance was rebooted.
+ InstalledPendingRebootCount *int64 `type:"integer"`
+
// The number of instances with patches installed that are specified in a RejectedPatches
// list. Patches with a status of InstalledRejected were typically installed
// before they were added to a RejectedPatches list.
@@ -25456,6 +27852,10 @@ type InstancePatchState struct {
// InstanceId is a required field
InstanceId *string `type:"string" required:"true"`
+ // The time of the last attempt to patch the instance with NoReboot specified
+ // as the reboot option.
+ LastNoRebootInstallOperationTime *time.Time `type:"timestamp"`
+
// The number of patches from the patch baseline that are applicable for the
// instance but aren't currently installed.
MissingCount *int64 `type:"integer"`
@@ -25491,6 +27891,20 @@ type InstancePatchState struct {
// PatchGroup is a required field
PatchGroup *string `min:"1" type:"string" required:"true"`
+ // Indicates the reboot option specified in the patch baseline.
+ //
+ // Reboot options apply to Install operations only. Reboots are not attempted
+ // for Patch Manager Scan operations.
+ //
+ // * RebootIfNeeded: Patch Manager tries to reboot the instance if it installed
+ // any patches, or if any patches are detected with a status of InstalledPendingReboot.
+ //
+ // * NoReboot: Patch Manager attempts to install missing packages without
+ // trying to reboot the system. Patches installed with this option are assigned
+ // a status of InstalledPendingReboot. These patches might not be in effect
+ // until a reboot is performed.
+ RebootOption *string `type:"string" enum:"RebootOption"`
+
// The ID of the patch baseline snapshot used during the patching operation
// when this compliance data was collected.
SnapshotId *string `min:"36" type:"string"`
@@ -25540,6 +27954,12 @@ func (s *InstancePatchState) SetInstalledOtherCount(v int64) *InstancePatchState
return s
}
+// SetInstalledPendingRebootCount sets the InstalledPendingRebootCount field's value.
+func (s *InstancePatchState) SetInstalledPendingRebootCount(v int64) *InstancePatchState {
+ s.InstalledPendingRebootCount = &v
+ return s
+}
+
// SetInstalledRejectedCount sets the InstalledRejectedCount field's value.
func (s *InstancePatchState) SetInstalledRejectedCount(v int64) *InstancePatchState {
s.InstalledRejectedCount = &v
@@ -25552,6 +27972,12 @@ func (s *InstancePatchState) SetInstanceId(v string) *InstancePatchState {
return s
}
+// SetLastNoRebootInstallOperationTime sets the LastNoRebootInstallOperationTime field's value.
+func (s *InstancePatchState) SetLastNoRebootInstallOperationTime(v time.Time) *InstancePatchState {
+ s.LastNoRebootInstallOperationTime = &v
+ return s
+}
+
// SetMissingCount sets the MissingCount field's value.
func (s *InstancePatchState) SetMissingCount(v int64) *InstancePatchState {
s.MissingCount = &v
@@ -25594,6 +28020,12 @@ func (s *InstancePatchState) SetPatchGroup(v string) *InstancePatchState {
return s
}
+// SetRebootOption sets the RebootOption field's value.
+func (s *InstancePatchState) SetRebootOption(v string) *InstancePatchState {
+ s.RebootOption = &v
+ return s
+}
+
// SetSnapshotId sets the SnapshotId field's value.
func (s *InstancePatchState) SetSnapshotId(v string) *InstancePatchState {
s.SnapshotId = &v
@@ -25682,502 +28114,3239 @@ func (s *InstancePatchStateFilter) SetValues(v []*string) *InstancePatchStateFil
return s
}
-// Specifies the inventory type and attribute for the aggregation execution.
-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"`
+// An error occurred on the server side.
+type InternalServerError struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
- // A user-defined set of one or more filters on which to aggregate inventory
- // data. Groups return a count of resources that match and don't match the specified
- // criteria.
- Groups []*InventoryGroup `min:"1" type:"list"`
+ Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
-func (s InventoryAggregator) String() string {
+func (s InternalServerError) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s InventoryAggregator) GoString() string {
+func (s InternalServerError) 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.Groups != nil && len(s.Groups) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Groups", 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.Groups != nil {
- for i, v := range s.Groups {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Groups", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
+func newErrorInternalServerError(v protocol.ResponseMetadata) error {
+ return &InternalServerError{
+ RespMetadata: v,
}
- return nil
}
-// SetAggregators sets the Aggregators field's value.
-func (s *InventoryAggregator) SetAggregators(v []*InventoryAggregator) *InventoryAggregator {
- s.Aggregators = v
- return s
+// Code returns the exception type name.
+func (s *InternalServerError) Code() string {
+ return "InternalServerError"
}
-// SetExpression sets the Expression field's value.
-func (s *InventoryAggregator) SetExpression(v string) *InventoryAggregator {
- s.Expression = &v
- return s
+// Message returns the exception's message.
+func (s *InternalServerError) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
}
-// SetGroups sets the Groups field's value.
-func (s *InventoryAggregator) SetGroups(v []*InventoryGroup) *InventoryAggregator {
- s.Groups = v
- return s
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InternalServerError) OrigErr() error {
+ return nil
}
-// Status information returned by the DeleteInventory action.
-type InventoryDeletionStatusItem struct {
- _ struct{} `type:"structure"`
-
- // The deletion ID returned by the DeleteInventory action.
- DeletionId *string `type:"string"`
-
- // The UTC timestamp when the delete operation started.
- DeletionStartTime *time.Time `type:"timestamp"`
-
- // Information about the delete operation. For more information about this summary,
- // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete)
- // in the AWS Systems Manager User Guide.
- DeletionSummary *InventoryDeletionSummary `type:"structure"`
+func (s *InternalServerError) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
- // The status of the operation. Possible values are InProgress and Complete.
- LastStatus *string `type:"string" enum:"InventoryDeletionStatus"`
+// Status code returns the HTTP status code for the request's response error.
+func (s *InternalServerError) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
- // Information about the status.
- LastStatusMessage *string `type:"string"`
+// RequestID returns the service's response RequestID for request.
+func (s *InternalServerError) RequestID() string {
+ return s.RespMetadata.RequestID
+}
- // The UTC timestamp of when the last status report.
- LastStatusUpdateTime *time.Time `type:"timestamp"`
+// The activation is not valid. The activation might have been deleted, or the
+// ActivationId and the ActivationCode do not match.
+type InvalidActivation struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
- // The name of the inventory data type.
- TypeName *string `min:"1" type:"string"`
+ Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
-func (s InventoryDeletionStatusItem) String() string {
+func (s InvalidActivation) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s InventoryDeletionStatusItem) GoString() string {
+func (s InvalidActivation) GoString() string {
return s.String()
}
-// SetDeletionId sets the DeletionId field's value.
-func (s *InventoryDeletionStatusItem) SetDeletionId(v string) *InventoryDeletionStatusItem {
- s.DeletionId = &v
- return s
+func newErrorInvalidActivation(v protocol.ResponseMetadata) error {
+ return &InvalidActivation{
+ RespMetadata: v,
+ }
}
-// SetDeletionStartTime sets the DeletionStartTime field's value.
-func (s *InventoryDeletionStatusItem) SetDeletionStartTime(v time.Time) *InventoryDeletionStatusItem {
- s.DeletionStartTime = &v
- return s
+// Code returns the exception type name.
+func (s *InvalidActivation) Code() string {
+ return "InvalidActivation"
}
-// SetDeletionSummary sets the DeletionSummary field's value.
-func (s *InventoryDeletionStatusItem) SetDeletionSummary(v *InventoryDeletionSummary) *InventoryDeletionStatusItem {
- s.DeletionSummary = v
- return s
+// Message returns the exception's message.
+func (s *InvalidActivation) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
}
-// SetLastStatus sets the LastStatus field's value.
-func (s *InventoryDeletionStatusItem) SetLastStatus(v string) *InventoryDeletionStatusItem {
- s.LastStatus = &v
- return s
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidActivation) OrigErr() error {
+ return nil
}
-// SetLastStatusMessage sets the LastStatusMessage field's value.
-func (s *InventoryDeletionStatusItem) SetLastStatusMessage(v string) *InventoryDeletionStatusItem {
- s.LastStatusMessage = &v
- return s
+func (s *InvalidActivation) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
-// SetLastStatusUpdateTime sets the LastStatusUpdateTime field's value.
-func (s *InventoryDeletionStatusItem) SetLastStatusUpdateTime(v time.Time) *InventoryDeletionStatusItem {
- s.LastStatusUpdateTime = &v
- return s
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidActivation) StatusCode() int {
+ return s.RespMetadata.StatusCode
}
-// SetTypeName sets the TypeName field's value.
-func (s *InventoryDeletionStatusItem) SetTypeName(v string) *InventoryDeletionStatusItem {
- s.TypeName = &v
- return s
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidActivation) RequestID() string {
+ return s.RespMetadata.RequestID
}
-// Information about the delete operation.
-type InventoryDeletionSummary struct {
- _ struct{} `type:"structure"`
-
- // Remaining number of items to delete.
- RemainingCount *int64 `type:"integer"`
-
- // A list of counts and versions for deleted items.
- SummaryItems []*InventoryDeletionSummaryItem `type:"list"`
+// The activation ID is not valid. Verify the you entered the correct ActivationId
+// or ActivationCode and try again.
+type InvalidActivationId struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
- // The total number of items to delete. This count does not change during the
- // delete operation.
- TotalCount *int64 `type:"integer"`
+ Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
-func (s InventoryDeletionSummary) String() string {
+func (s InvalidActivationId) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s InventoryDeletionSummary) GoString() string {
+func (s InvalidActivationId) GoString() string {
return s.String()
}
-// SetRemainingCount sets the RemainingCount field's value.
-func (s *InventoryDeletionSummary) SetRemainingCount(v int64) *InventoryDeletionSummary {
- s.RemainingCount = &v
- return s
+func newErrorInvalidActivationId(v protocol.ResponseMetadata) error {
+ return &InvalidActivationId{
+ RespMetadata: v,
+ }
}
-// SetSummaryItems sets the SummaryItems field's value.
-func (s *InventoryDeletionSummary) SetSummaryItems(v []*InventoryDeletionSummaryItem) *InventoryDeletionSummary {
- s.SummaryItems = v
- return s
+// Code returns the exception type name.
+func (s *InvalidActivationId) Code() string {
+ return "InvalidActivationId"
}
-// SetTotalCount sets the TotalCount field's value.
-func (s *InventoryDeletionSummary) SetTotalCount(v int64) *InventoryDeletionSummary {
- s.TotalCount = &v
- return s
+// Message returns the exception's message.
+func (s *InvalidActivationId) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
}
-// Either a count, remaining count, or a version number in a delete inventory
-// summary.
-type InventoryDeletionSummaryItem struct {
- _ struct{} `type:"structure"`
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidActivationId) OrigErr() error {
+ return nil
+}
- // A count of the number of deleted items.
- Count *int64 `type:"integer"`
+func (s *InvalidActivationId) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
- // The remaining number of items to delete.
- RemainingCount *int64 `type:"integer"`
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidActivationId) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
- // The inventory type version.
- Version *string `type:"string"`
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidActivationId) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified aggregator is not valid for inventory groups. Verify that the
+// aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation.
+type InvalidAggregatorException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
-func (s InventoryDeletionSummaryItem) String() string {
+func (s InvalidAggregatorException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s InventoryDeletionSummaryItem) GoString() string {
+func (s InvalidAggregatorException) GoString() string {
return s.String()
}
-// SetCount sets the Count field's value.
-func (s *InventoryDeletionSummaryItem) SetCount(v int64) *InventoryDeletionSummaryItem {
- s.Count = &v
- return s
+func newErrorInvalidAggregatorException(v protocol.ResponseMetadata) error {
+ return &InvalidAggregatorException{
+ RespMetadata: v,
+ }
}
-// SetRemainingCount sets the RemainingCount field's value.
-func (s *InventoryDeletionSummaryItem) SetRemainingCount(v int64) *InventoryDeletionSummaryItem {
- s.RemainingCount = &v
- return s
+// Code returns the exception type name.
+func (s *InvalidAggregatorException) Code() string {
+ return "InvalidAggregatorException"
}
-// SetVersion sets the Version field's value.
-func (s *InventoryDeletionSummaryItem) SetVersion(v string) *InventoryDeletionSummaryItem {
- s.Version = &v
- return s
+// Message returns the exception's message.
+func (s *InvalidAggregatorException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
}
-// One or more filters. Use a filter to return a more specific list of results.
-type InventoryFilter struct {
- _ struct{} `type:"structure"`
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidAggregatorException) OrigErr() error {
+ return nil
+}
- // The name of the filter key.
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
+func (s *InvalidAggregatorException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
- // The type of filter. Valid values include the following: "Equal"|"NotEqual"|"BeginWith"|"LessThan"|"GreaterThan"
- Type *string `type:"string" enum:"InventoryQueryOperatorType"`
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidAggregatorException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
- // Inventory filter values. Example: inventory filter where instance IDs are
- // specified as values Key=AWS:InstanceInformation.InstanceId,Values= i-a12b3c4d5e6g,
- // i-1a2b3c4d5e6,Type=Equal
- //
- // Values is a required field
- Values []*string `min:"1" type:"list" required:"true"`
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidAggregatorException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The request does not meet the regular expression requirement.
+type InvalidAllowedPatternException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // The request does not meet the regular expression requirement.
+ Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
-func (s InventoryFilter) String() string {
+func (s InvalidAllowedPatternException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s InventoryFilter) GoString() string {
+func (s InvalidAllowedPatternException) GoString() string {
return s.String()
}
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
- 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.Values == nil {
- invalidParams.Add(request.NewErrParamRequired("Values"))
- }
- if s.Values != nil && len(s.Values) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Values", 1))
+func newErrorInvalidAllowedPatternException(v protocol.ResponseMetadata) error {
+ return &InvalidAllowedPatternException{
+ RespMetadata: v,
}
+}
- if invalidParams.Len() > 0 {
- return invalidParams
+// Code returns the exception type name.
+func (s *InvalidAllowedPatternException) Code() string {
+ return "InvalidAllowedPatternException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidAllowedPatternException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
}
- return nil
+ return ""
}
-// SetKey sets the Key field's value.
-func (s *InventoryFilter) SetKey(v string) *InventoryFilter {
- s.Key = &v
- return s
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidAllowedPatternException) OrigErr() error {
+ return nil
}
-// SetType sets the Type field's value.
-func (s *InventoryFilter) SetType(v string) *InventoryFilter {
- s.Type = &v
- return s
+func (s *InvalidAllowedPatternException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
-// SetValues sets the Values field's value.
-func (s *InventoryFilter) SetValues(v []*string) *InventoryFilter {
- s.Values = v
- return s
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidAllowedPatternException) StatusCode() int {
+ return s.RespMetadata.StatusCode
}
-// A user-defined set of one or more filters on which to aggregate inventory
-// data. Groups return a count of resources that match and don't match the specified
-// criteria.
-type InventoryGroup struct {
- _ struct{} `type:"structure"`
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidAllowedPatternException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
- // Filters define the criteria for the group. The matchingCount field displays
- // the number of resources that match the criteria. The notMatchingCount field
- // displays the number of resources that don't match the criteria.
- //
- // Filters is a required field
- Filters []*InventoryFilter `min:"1" type:"list" required:"true"`
+// The association is not valid or does not exist.
+type InvalidAssociation struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
- // The name of the group.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
+ Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
-func (s InventoryGroup) String() string {
+func (s InvalidAssociation) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s InventoryGroup) GoString() string {
+func (s InvalidAssociation) GoString() string {
return s.String()
}
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryGroup) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryGroup"}
- if s.Filters == nil {
- invalidParams.Add(request.NewErrParamRequired("Filters"))
- }
- if s.Filters != nil && len(s.Filters) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Filters", 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.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
+func newErrorInvalidAssociation(v protocol.ResponseMetadata) error {
+ return &InvalidAssociation{
+ RespMetadata: v,
}
- return nil
}
-// SetFilters sets the Filters field's value.
-func (s *InventoryGroup) SetFilters(v []*InventoryFilter) *InventoryGroup {
- s.Filters = v
- return s
+// Code returns the exception type name.
+func (s *InvalidAssociation) Code() string {
+ return "InvalidAssociation"
}
-// SetName sets the Name field's value.
-func (s *InventoryGroup) SetName(v string) *InventoryGroup {
- s.Name = &v
- return s
+// Message returns the exception's message.
+func (s *InvalidAssociation) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
}
-// Information collected from managed instances based on your inventory policy
-// document
-type InventoryItem struct {
- _ struct{} `type:"structure"`
-
- // The time the inventory information was collected.
- //
- // CaptureTime is a required field
- CaptureTime *string `type:"string" required:"true"`
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidAssociation) OrigErr() error {
+ return nil
+}
- // The inventory data of the inventory type.
- Content []map[string]*string `type:"list"`
+func (s *InvalidAssociation) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
- // MD5 hash of the inventory item type contents. The content hash is used to
- // determine whether to update inventory information. The PutInventory API does
- // not update the inventory item type contents if the MD5 hash has not changed
- // since last update.
- ContentHash *string `type:"string"`
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidAssociation) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
- // A map of associated properties for a specified inventory type. For example,
- // with this attribute, you can specify the ExecutionId, ExecutionType, ComplianceType
- // properties of the AWS:ComplianceItem type.
- Context map[string]*string `type:"map"`
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidAssociation) RequestID() string {
+ return s.RespMetadata.RequestID
+}
- // The schema version for the inventory item.
- //
- // SchemaVersion is a required field
- SchemaVersion *string `type:"string" required:"true"`
+// The version you specified is not valid. Use ListAssociationVersions to view
+// all versions of an association according to the association ID. Or, use the
+// $LATEST parameter to view the latest version of the association.
+type InvalidAssociationVersion struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
- // The name of the inventory type. Default inventory item type names start with
- // AWS. Custom inventory type names will start with Custom. Default inventory
- // item types include the following: AWS:AWSComponent, AWS:Application, AWS:InstanceInformation,
- // AWS:Network, and AWS:WindowsUpdate.
- //
- // TypeName is a required field
- TypeName *string `min:"1" type:"string" required:"true"`
+ Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
-func (s InventoryItem) String() string {
+func (s InvalidAssociationVersion) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
-func (s InventoryItem) GoString() string {
+func (s InvalidAssociationVersion) GoString() string {
return s.String()
}
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryItem) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryItem"}
- if s.CaptureTime == nil {
- invalidParams.Add(request.NewErrParamRequired("CaptureTime"))
- }
- if s.SchemaVersion == nil {
- invalidParams.Add(request.NewErrParamRequired("SchemaVersion"))
- }
- if s.TypeName == nil {
- invalidParams.Add(request.NewErrParamRequired("TypeName"))
- }
- if s.TypeName != nil && len(*s.TypeName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
+func newErrorInvalidAssociationVersion(v protocol.ResponseMetadata) error {
+ return &InvalidAssociationVersion{
+ RespMetadata: v,
}
+}
- if invalidParams.Len() > 0 {
- return invalidParams
+// Code returns the exception type name.
+func (s *InvalidAssociationVersion) Code() string {
+ return "InvalidAssociationVersion"
+}
+
+// Message returns the exception's message.
+func (s *InvalidAssociationVersion) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
}
- return nil
+ return ""
}
-// SetCaptureTime sets the CaptureTime field's value.
-func (s *InventoryItem) SetCaptureTime(v string) *InventoryItem {
- s.CaptureTime = &v
- return s
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidAssociationVersion) OrigErr() error {
+ return nil
}
-// SetContent sets the Content field's value.
-func (s *InventoryItem) SetContent(v []map[string]*string) *InventoryItem {
- s.Content = v
- return s
+func (s *InvalidAssociationVersion) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
-// SetContentHash sets the ContentHash field's value.
-func (s *InventoryItem) SetContentHash(v string) *InventoryItem {
- s.ContentHash = &v
- return s
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidAssociationVersion) StatusCode() int {
+ return s.RespMetadata.StatusCode
}
-// SetContext sets the Context field's value.
-func (s *InventoryItem) SetContext(v map[string]*string) *InventoryItem {
- s.Context = v
- return s
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidAssociationVersion) RequestID() string {
+ return s.RespMetadata.RequestID
}
-// SetSchemaVersion sets the SchemaVersion field's value.
-func (s *InventoryItem) SetSchemaVersion(v string) *InventoryItem {
- s.SchemaVersion = &v
- return s
+// The supplied parameters for invoking the specified Automation document are
+// incorrect. For example, they may not match the set of parameters permitted
+// for the specified Automation document.
+type InvalidAutomationExecutionParametersException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
}
-// SetTypeName sets the TypeName field's value.
-func (s *InventoryItem) SetTypeName(v string) *InventoryItem {
- s.TypeName = &v
- return s
+// String returns the string representation
+func (s InvalidAutomationExecutionParametersException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidAutomationExecutionParametersException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidAutomationExecutionParametersException(v protocol.ResponseMetadata) error {
+ return &InvalidAutomationExecutionParametersException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidAutomationExecutionParametersException) Code() string {
+ return "InvalidAutomationExecutionParametersException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidAutomationExecutionParametersException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidAutomationExecutionParametersException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidAutomationExecutionParametersException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidAutomationExecutionParametersException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidAutomationExecutionParametersException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The signal is not valid for the current Automation execution.
+type InvalidAutomationSignalException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidAutomationSignalException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidAutomationSignalException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidAutomationSignalException(v protocol.ResponseMetadata) error {
+ return &InvalidAutomationSignalException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidAutomationSignalException) Code() string {
+ return "InvalidAutomationSignalException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidAutomationSignalException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidAutomationSignalException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidAutomationSignalException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidAutomationSignalException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidAutomationSignalException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified update status operation is not valid.
+type InvalidAutomationStatusUpdateException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidAutomationStatusUpdateException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidAutomationStatusUpdateException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidAutomationStatusUpdateException(v protocol.ResponseMetadata) error {
+ return &InvalidAutomationStatusUpdateException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidAutomationStatusUpdateException) Code() string {
+ return "InvalidAutomationStatusUpdateException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidAutomationStatusUpdateException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidAutomationStatusUpdateException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidAutomationStatusUpdateException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidAutomationStatusUpdateException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidAutomationStatusUpdateException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+type InvalidCommandId struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidCommandId) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidCommandId) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidCommandId(v protocol.ResponseMetadata) error {
+ return &InvalidCommandId{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidCommandId) Code() string {
+ return "InvalidCommandId"
+}
+
+// Message returns the exception's message.
+func (s *InvalidCommandId) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidCommandId) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidCommandId) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidCommandId) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidCommandId) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// One or more of the parameters specified for the delete operation is not valid.
+// Verify all parameters and try again.
+type InvalidDeleteInventoryParametersException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidDeleteInventoryParametersException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidDeleteInventoryParametersException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidDeleteInventoryParametersException(v protocol.ResponseMetadata) error {
+ return &InvalidDeleteInventoryParametersException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidDeleteInventoryParametersException) Code() string {
+ return "InvalidDeleteInventoryParametersException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidDeleteInventoryParametersException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidDeleteInventoryParametersException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidDeleteInventoryParametersException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidDeleteInventoryParametersException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidDeleteInventoryParametersException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The ID specified for the delete operation does not exist or is not valid.
+// Verify the ID and try again.
+type InvalidDeletionIdException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidDeletionIdException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidDeletionIdException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidDeletionIdException(v protocol.ResponseMetadata) error {
+ return &InvalidDeletionIdException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidDeletionIdException) Code() string {
+ return "InvalidDeletionIdException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidDeletionIdException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidDeletionIdException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidDeletionIdException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidDeletionIdException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidDeletionIdException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified document does not exist.
+type InvalidDocument struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // The document does not exist or the document is not available to the user.
+ // This exception can be issued by CreateAssociation, CreateAssociationBatch,
+ // DeleteAssociation, DeleteDocument, DescribeAssociation, DescribeDocument,
+ // GetDocument, SendCommand, or UpdateAssociationStatus.
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidDocument) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidDocument) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidDocument(v protocol.ResponseMetadata) error {
+ return &InvalidDocument{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidDocument) Code() string {
+ return "InvalidDocument"
+}
+
+// Message returns the exception's message.
+func (s *InvalidDocument) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidDocument) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidDocument) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidDocument) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidDocument) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The content for the document is not valid.
+type InvalidDocumentContent struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // A description of the validation error.
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidDocumentContent) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidDocumentContent) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidDocumentContent(v protocol.ResponseMetadata) error {
+ return &InvalidDocumentContent{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidDocumentContent) Code() string {
+ return "InvalidDocumentContent"
+}
+
+// Message returns the exception's message.
+func (s *InvalidDocumentContent) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidDocumentContent) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidDocumentContent) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidDocumentContent) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidDocumentContent) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// You attempted to delete a document while it is still shared. You must stop
+// sharing the document before you can delete it.
+type InvalidDocumentOperation struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidDocumentOperation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidDocumentOperation) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidDocumentOperation(v protocol.ResponseMetadata) error {
+ return &InvalidDocumentOperation{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidDocumentOperation) Code() string {
+ return "InvalidDocumentOperation"
+}
+
+// Message returns the exception's message.
+func (s *InvalidDocumentOperation) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidDocumentOperation) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidDocumentOperation) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidDocumentOperation) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidDocumentOperation) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The version of the document schema is not supported.
+type InvalidDocumentSchemaVersion struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidDocumentSchemaVersion) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidDocumentSchemaVersion) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidDocumentSchemaVersion(v protocol.ResponseMetadata) error {
+ return &InvalidDocumentSchemaVersion{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidDocumentSchemaVersion) Code() string {
+ return "InvalidDocumentSchemaVersion"
+}
+
+// Message returns the exception's message.
+func (s *InvalidDocumentSchemaVersion) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidDocumentSchemaVersion) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidDocumentSchemaVersion) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidDocumentSchemaVersion) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidDocumentSchemaVersion) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The document type is not valid. Valid document types are described in the
+// DocumentType property.
+type InvalidDocumentType struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidDocumentType) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidDocumentType) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidDocumentType(v protocol.ResponseMetadata) error {
+ return &InvalidDocumentType{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidDocumentType) Code() string {
+ return "InvalidDocumentType"
+}
+
+// Message returns the exception's message.
+func (s *InvalidDocumentType) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidDocumentType) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidDocumentType) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidDocumentType) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidDocumentType) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The document version is not valid or does not exist.
+type InvalidDocumentVersion struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidDocumentVersion) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidDocumentVersion) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidDocumentVersion(v protocol.ResponseMetadata) error {
+ return &InvalidDocumentVersion{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidDocumentVersion) Code() string {
+ return "InvalidDocumentVersion"
+}
+
+// Message returns the exception's message.
+func (s *InvalidDocumentVersion) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidDocumentVersion) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidDocumentVersion) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidDocumentVersion) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidDocumentVersion) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The filter name is not valid. Verify the you entered the correct name and
+// try again.
+type InvalidFilter struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidFilter) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidFilter) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidFilter(v protocol.ResponseMetadata) error {
+ return &InvalidFilter{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidFilter) Code() string {
+ return "InvalidFilter"
+}
+
+// Message returns the exception's message.
+func (s *InvalidFilter) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidFilter) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidFilter) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidFilter) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidFilter) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified key is not valid.
+type InvalidFilterKey struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidFilterKey) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidFilterKey) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidFilterKey(v protocol.ResponseMetadata) error {
+ return &InvalidFilterKey{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidFilterKey) Code() string {
+ return "InvalidFilterKey"
+}
+
+// Message returns the exception's message.
+func (s *InvalidFilterKey) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidFilterKey) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidFilterKey) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidFilterKey) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidFilterKey) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified filter option is not valid. Valid options are Equals and BeginsWith.
+// For Path filter, valid options are Recursive and OneLevel.
+type InvalidFilterOption struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // The specified filter option is not valid. Valid options are Equals and BeginsWith.
+ // For Path filter, valid options are Recursive and OneLevel.
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidFilterOption) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidFilterOption) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidFilterOption(v protocol.ResponseMetadata) error {
+ return &InvalidFilterOption{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidFilterOption) Code() string {
+ return "InvalidFilterOption"
+}
+
+// Message returns the exception's message.
+func (s *InvalidFilterOption) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidFilterOption) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidFilterOption) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidFilterOption) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidFilterOption) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The filter value is not valid. Verify the value and try again.
+type InvalidFilterValue struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidFilterValue) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidFilterValue) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidFilterValue(v protocol.ResponseMetadata) error {
+ return &InvalidFilterValue{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidFilterValue) Code() string {
+ return "InvalidFilterValue"
+}
+
+// Message returns the exception's message.
+func (s *InvalidFilterValue) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidFilterValue) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidFilterValue) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidFilterValue) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidFilterValue) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The following problems can cause this exception:
+//
+// You do not have permission to access the instance.
+//
+// SSM Agent is not running. Verify that SSM Agent is running.
+//
+// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent.
+//
+// The instance is not in valid state. Valid states are: Running, Pending, Stopped,
+// Stopping. Invalid states are: Shutting-down and Terminated.
+type InvalidInstanceId struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidInstanceId) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidInstanceId) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidInstanceId(v protocol.ResponseMetadata) error {
+ return &InvalidInstanceId{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidInstanceId) Code() string {
+ return "InvalidInstanceId"
+}
+
+// Message returns the exception's message.
+func (s *InvalidInstanceId) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidInstanceId) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidInstanceId) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidInstanceId) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidInstanceId) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified filter value is not valid.
+type InvalidInstanceInformationFilterValue struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidInstanceInformationFilterValue) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidInstanceInformationFilterValue) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidInstanceInformationFilterValue(v protocol.ResponseMetadata) error {
+ return &InvalidInstanceInformationFilterValue{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidInstanceInformationFilterValue) Code() string {
+ return "InvalidInstanceInformationFilterValue"
+}
+
+// Message returns the exception's message.
+func (s *InvalidInstanceInformationFilterValue) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidInstanceInformationFilterValue) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidInstanceInformationFilterValue) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidInstanceInformationFilterValue) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidInstanceInformationFilterValue) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified inventory group is not valid.
+type InvalidInventoryGroupException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidInventoryGroupException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidInventoryGroupException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidInventoryGroupException(v protocol.ResponseMetadata) error {
+ return &InvalidInventoryGroupException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidInventoryGroupException) Code() string {
+ return "InvalidInventoryGroupException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidInventoryGroupException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidInventoryGroupException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidInventoryGroupException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidInventoryGroupException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidInventoryGroupException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// You specified invalid keys or values in the Context attribute for InventoryItem.
+// Verify the keys and values, and try again.
+type InvalidInventoryItemContextException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidInventoryItemContextException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidInventoryItemContextException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidInventoryItemContextException(v protocol.ResponseMetadata) error {
+ return &InvalidInventoryItemContextException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidInventoryItemContextException) Code() string {
+ return "InvalidInventoryItemContextException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidInventoryItemContextException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidInventoryItemContextException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidInventoryItemContextException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidInventoryItemContextException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidInventoryItemContextException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The request is not valid.
+type InvalidInventoryRequestException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidInventoryRequestException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidInventoryRequestException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidInventoryRequestException(v protocol.ResponseMetadata) error {
+ return &InvalidInventoryRequestException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidInventoryRequestException) Code() string {
+ return "InvalidInventoryRequestException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidInventoryRequestException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidInventoryRequestException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidInventoryRequestException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidInventoryRequestException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidInventoryRequestException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// One or more content items is not valid.
+type InvalidItemContentException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+
+ TypeName *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidItemContentException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidItemContentException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidItemContentException(v protocol.ResponseMetadata) error {
+ return &InvalidItemContentException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidItemContentException) Code() string {
+ return "InvalidItemContentException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidItemContentException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidItemContentException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidItemContentException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidItemContentException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidItemContentException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The query key ID is not valid.
+type InvalidKeyId struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidKeyId) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidKeyId) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidKeyId(v protocol.ResponseMetadata) error {
+ return &InvalidKeyId{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidKeyId) Code() string {
+ return "InvalidKeyId"
+}
+
+// Message returns the exception's message.
+func (s *InvalidKeyId) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidKeyId) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidKeyId) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidKeyId) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidKeyId) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified token is not valid.
+type InvalidNextToken struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidNextToken) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidNextToken) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidNextToken(v protocol.ResponseMetadata) error {
+ return &InvalidNextToken{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidNextToken) Code() string {
+ return "InvalidNextToken"
+}
+
+// Message returns the exception's message.
+func (s *InvalidNextToken) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidNextToken) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidNextToken) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidNextToken) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidNextToken) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// One or more configuration items is not valid. Verify that a valid Amazon
+// Resource Name (ARN) was provided for an Amazon SNS topic.
+type InvalidNotificationConfig struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidNotificationConfig) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidNotificationConfig) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidNotificationConfig(v protocol.ResponseMetadata) error {
+ return &InvalidNotificationConfig{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidNotificationConfig) Code() string {
+ return "InvalidNotificationConfig"
+}
+
+// Message returns the exception's message.
+func (s *InvalidNotificationConfig) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidNotificationConfig) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidNotificationConfig) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidNotificationConfig) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidNotificationConfig) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The delete inventory option specified is not valid. Verify the option and
+// try again.
+type InvalidOptionException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidOptionException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidOptionException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidOptionException(v protocol.ResponseMetadata) error {
+ return &InvalidOptionException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidOptionException) Code() string {
+ return "InvalidOptionException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidOptionException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidOptionException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidOptionException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidOptionException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidOptionException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The S3 bucket does not exist.
+type InvalidOutputFolder struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidOutputFolder) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidOutputFolder) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidOutputFolder(v protocol.ResponseMetadata) error {
+ return &InvalidOutputFolder{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidOutputFolder) Code() string {
+ return "InvalidOutputFolder"
+}
+
+// Message returns the exception's message.
+func (s *InvalidOutputFolder) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidOutputFolder) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidOutputFolder) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidOutputFolder) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidOutputFolder) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The output location is not valid or does not exist.
+type InvalidOutputLocation struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidOutputLocation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidOutputLocation) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidOutputLocation(v protocol.ResponseMetadata) error {
+ return &InvalidOutputLocation{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidOutputLocation) Code() string {
+ return "InvalidOutputLocation"
+}
+
+// Message returns the exception's message.
+func (s *InvalidOutputLocation) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidOutputLocation) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidOutputLocation) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidOutputLocation) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidOutputLocation) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// 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.
+type InvalidParameters struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidParameters) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidParameters) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidParameters(v protocol.ResponseMetadata) error {
+ return &InvalidParameters{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidParameters) Code() string {
+ return "InvalidParameters"
+}
+
+// Message returns the exception's message.
+func (s *InvalidParameters) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidParameters) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidParameters) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidParameters) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidParameters) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The permission type is not supported. Share is the only supported permission
+// type.
+type InvalidPermissionType struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidPermissionType) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidPermissionType) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidPermissionType(v protocol.ResponseMetadata) error {
+ return &InvalidPermissionType{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidPermissionType) Code() string {
+ return "InvalidPermissionType"
+}
+
+// Message returns the exception's message.
+func (s *InvalidPermissionType) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidPermissionType) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidPermissionType) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidPermissionType) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidPermissionType) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The plugin name is not valid.
+type InvalidPluginName struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidPluginName) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidPluginName) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidPluginName(v protocol.ResponseMetadata) error {
+ return &InvalidPluginName{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidPluginName) Code() string {
+ return "InvalidPluginName"
+}
+
+// Message returns the exception's message.
+func (s *InvalidPluginName) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidPluginName) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidPluginName) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidPluginName) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidPluginName) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// A policy attribute or its value is invalid.
+type InvalidPolicyAttributeException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidPolicyAttributeException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidPolicyAttributeException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidPolicyAttributeException(v protocol.ResponseMetadata) error {
+ return &InvalidPolicyAttributeException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidPolicyAttributeException) Code() string {
+ return "InvalidPolicyAttributeException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidPolicyAttributeException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidPolicyAttributeException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidPolicyAttributeException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidPolicyAttributeException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidPolicyAttributeException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The policy type is not supported. Parameter Store supports the following
+// policy types: Expiration, ExpirationNotification, and NoChangeNotification.
+type InvalidPolicyTypeException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidPolicyTypeException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidPolicyTypeException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidPolicyTypeException(v protocol.ResponseMetadata) error {
+ return &InvalidPolicyTypeException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidPolicyTypeException) Code() string {
+ return "InvalidPolicyTypeException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidPolicyTypeException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidPolicyTypeException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidPolicyTypeException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidPolicyTypeException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidPolicyTypeException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The resource ID is not valid. Verify that you entered the correct ID and
+// try again.
+type InvalidResourceId struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidResourceId) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidResourceId) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidResourceId(v protocol.ResponseMetadata) error {
+ return &InvalidResourceId{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidResourceId) Code() string {
+ return "InvalidResourceId"
+}
+
+// Message returns the exception's message.
+func (s *InvalidResourceId) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidResourceId) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidResourceId) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidResourceId) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidResourceId) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The resource type is not valid. For example, if you are attempting to tag
+// an instance, the instance must be a registered, managed instance.
+type InvalidResourceType struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidResourceType) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidResourceType) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidResourceType(v protocol.ResponseMetadata) error {
+ return &InvalidResourceType{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidResourceType) Code() string {
+ return "InvalidResourceType"
+}
+
+// Message returns the exception's message.
+func (s *InvalidResourceType) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidResourceType) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidResourceType) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidResourceType) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidResourceType) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified inventory item result attribute is not valid.
+type InvalidResultAttributeException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidResultAttributeException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidResultAttributeException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidResultAttributeException(v protocol.ResponseMetadata) error {
+ return &InvalidResultAttributeException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidResultAttributeException) Code() string {
+ return "InvalidResultAttributeException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidResultAttributeException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidResultAttributeException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidResultAttributeException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidResultAttributeException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidResultAttributeException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The role name can't contain invalid characters. Also verify that you specified
+// an IAM role for notifications that includes the required trust policy. For
+// information about configuring the IAM role for Run Command notifications,
+// see Configuring Amazon SNS Notifications for Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html)
+// in the AWS Systems Manager User Guide.
+type InvalidRole struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidRole) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidRole) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidRole(v protocol.ResponseMetadata) error {
+ return &InvalidRole{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidRole) Code() string {
+ return "InvalidRole"
+}
+
+// Message returns the exception's message.
+func (s *InvalidRole) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidRole) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidRole) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidRole) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidRole) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The schedule is invalid. Verify your cron or rate expression and try again.
+type InvalidSchedule struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidSchedule) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidSchedule) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidSchedule(v protocol.ResponseMetadata) error {
+ return &InvalidSchedule{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidSchedule) Code() string {
+ return "InvalidSchedule"
+}
+
+// Message returns the exception's message.
+func (s *InvalidSchedule) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidSchedule) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidSchedule) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidSchedule) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidSchedule) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The target is not valid or does not exist. It might not be configured for
+// Systems Manager or you might not have permission to perform the operation.
+type InvalidTarget struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidTarget) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidTarget) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidTarget(v protocol.ResponseMetadata) error {
+ return &InvalidTarget{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidTarget) Code() string {
+ return "InvalidTarget"
+}
+
+// Message returns the exception's message.
+func (s *InvalidTarget) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidTarget) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidTarget) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidTarget) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidTarget) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The parameter type name is not valid.
+type InvalidTypeNameException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidTypeNameException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidTypeNameException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidTypeNameException(v protocol.ResponseMetadata) error {
+ return &InvalidTypeNameException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidTypeNameException) Code() string {
+ return "InvalidTypeNameException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidTypeNameException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidTypeNameException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidTypeNameException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidTypeNameException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidTypeNameException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The update is not valid.
+type InvalidUpdate struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidUpdate) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidUpdate) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidUpdate(v protocol.ResponseMetadata) error {
+ return &InvalidUpdate{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidUpdate) Code() string {
+ return "InvalidUpdate"
+}
+
+// Message returns the exception's message.
+func (s *InvalidUpdate) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidUpdate) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidUpdate) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidUpdate) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidUpdate) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Specifies the inventory type and attribute for the aggregation execution.
+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"`
+
+ // A user-defined set of one or more filters on which to aggregate inventory
+ // data. Groups return a count of resources that match and don't match the specified
+ // criteria.
+ Groups []*InventoryGroup `min:"1" type:"list"`
+}
+
+// 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.Groups != nil && len(s.Groups) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Groups", 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.Groups != nil {
+ for i, v := range s.Groups {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Groups", 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
+}
+
+// SetGroups sets the Groups field's value.
+func (s *InventoryAggregator) SetGroups(v []*InventoryGroup) *InventoryAggregator {
+ s.Groups = v
+ return s
+}
+
+// Status information returned by the DeleteInventory action.
+type InventoryDeletionStatusItem struct {
+ _ struct{} `type:"structure"`
+
+ // The deletion ID returned by the DeleteInventory action.
+ DeletionId *string `type:"string"`
+
+ // The UTC timestamp when the delete operation started.
+ DeletionStartTime *time.Time `type:"timestamp"`
+
+ // Information about the delete operation. For more information about this summary,
+ // see Understanding the delete inventory summary (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete)
+ // in the AWS Systems Manager User Guide.
+ DeletionSummary *InventoryDeletionSummary `type:"structure"`
+
+ // The status of the operation. Possible values are InProgress and Complete.
+ LastStatus *string `type:"string" enum:"InventoryDeletionStatus"`
+
+ // Information about the status.
+ LastStatusMessage *string `type:"string"`
+
+ // The UTC timestamp of when the last status report.
+ LastStatusUpdateTime *time.Time `type:"timestamp"`
+
+ // The name of the inventory data type.
+ TypeName *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s InventoryDeletionStatusItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InventoryDeletionStatusItem) GoString() string {
+ return s.String()
+}
+
+// SetDeletionId sets the DeletionId field's value.
+func (s *InventoryDeletionStatusItem) SetDeletionId(v string) *InventoryDeletionStatusItem {
+ s.DeletionId = &v
+ return s
+}
+
+// SetDeletionStartTime sets the DeletionStartTime field's value.
+func (s *InventoryDeletionStatusItem) SetDeletionStartTime(v time.Time) *InventoryDeletionStatusItem {
+ s.DeletionStartTime = &v
+ return s
+}
+
+// SetDeletionSummary sets the DeletionSummary field's value.
+func (s *InventoryDeletionStatusItem) SetDeletionSummary(v *InventoryDeletionSummary) *InventoryDeletionStatusItem {
+ s.DeletionSummary = v
+ return s
+}
+
+// SetLastStatus sets the LastStatus field's value.
+func (s *InventoryDeletionStatusItem) SetLastStatus(v string) *InventoryDeletionStatusItem {
+ s.LastStatus = &v
+ return s
+}
+
+// SetLastStatusMessage sets the LastStatusMessage field's value.
+func (s *InventoryDeletionStatusItem) SetLastStatusMessage(v string) *InventoryDeletionStatusItem {
+ s.LastStatusMessage = &v
+ return s
+}
+
+// SetLastStatusUpdateTime sets the LastStatusUpdateTime field's value.
+func (s *InventoryDeletionStatusItem) SetLastStatusUpdateTime(v time.Time) *InventoryDeletionStatusItem {
+ s.LastStatusUpdateTime = &v
+ return s
+}
+
+// SetTypeName sets the TypeName field's value.
+func (s *InventoryDeletionStatusItem) SetTypeName(v string) *InventoryDeletionStatusItem {
+ s.TypeName = &v
+ return s
+}
+
+// Information about the delete operation.
+type InventoryDeletionSummary struct {
+ _ struct{} `type:"structure"`
+
+ // Remaining number of items to delete.
+ RemainingCount *int64 `type:"integer"`
+
+ // A list of counts and versions for deleted items.
+ SummaryItems []*InventoryDeletionSummaryItem `type:"list"`
+
+ // The total number of items to delete. This count does not change during the
+ // delete operation.
+ TotalCount *int64 `type:"integer"`
+}
+
+// String returns the string representation
+func (s InventoryDeletionSummary) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InventoryDeletionSummary) GoString() string {
+ return s.String()
+}
+
+// SetRemainingCount sets the RemainingCount field's value.
+func (s *InventoryDeletionSummary) SetRemainingCount(v int64) *InventoryDeletionSummary {
+ s.RemainingCount = &v
+ return s
+}
+
+// SetSummaryItems sets the SummaryItems field's value.
+func (s *InventoryDeletionSummary) SetSummaryItems(v []*InventoryDeletionSummaryItem) *InventoryDeletionSummary {
+ s.SummaryItems = v
+ return s
+}
+
+// SetTotalCount sets the TotalCount field's value.
+func (s *InventoryDeletionSummary) SetTotalCount(v int64) *InventoryDeletionSummary {
+ s.TotalCount = &v
+ return s
+}
+
+// Either a count, remaining count, or a version number in a delete inventory
+// summary.
+type InventoryDeletionSummaryItem struct {
+ _ struct{} `type:"structure"`
+
+ // A count of the number of deleted items.
+ Count *int64 `type:"integer"`
+
+ // The remaining number of items to delete.
+ RemainingCount *int64 `type:"integer"`
+
+ // The inventory type version.
+ Version *string `type:"string"`
+}
+
+// String returns the string representation
+func (s InventoryDeletionSummaryItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InventoryDeletionSummaryItem) GoString() string {
+ return s.String()
+}
+
+// SetCount sets the Count field's value.
+func (s *InventoryDeletionSummaryItem) SetCount(v int64) *InventoryDeletionSummaryItem {
+ s.Count = &v
+ return s
+}
+
+// SetRemainingCount sets the RemainingCount field's value.
+func (s *InventoryDeletionSummaryItem) SetRemainingCount(v int64) *InventoryDeletionSummaryItem {
+ s.RemainingCount = &v
+ return s
+}
+
+// SetVersion sets the Version field's value.
+func (s *InventoryDeletionSummaryItem) SetVersion(v string) *InventoryDeletionSummaryItem {
+ s.Version = &v
+ return s
+}
+
+// One or more filters. Use a filter to return a more specific list of results.
+type InventoryFilter struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the filter key.
+ //
+ // Key is a required field
+ Key *string `min:"1" type:"string" required:"true"`
+
+ // The type of filter.
+ //
+ // The Exists filter must be used with aggregators. For more information, see
+ // Aggregating inventory data (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-aggregate.html)
+ // in the AWS Systems Manager User Guide.
+ Type *string `type:"string" enum:"InventoryQueryOperatorType"`
+
+ // Inventory filter values. Example: inventory filter where instance IDs are
+ // specified as values Key=AWS:InstanceInformation.InstanceId,Values= i-a12b3c4d5e6g,
+ // i-1a2b3c4d5e6,Type=Equal
+ //
+ // Values is a required field
+ Values []*string `min:"1" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s InventoryFilter) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InventoryFilter) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *InventoryFilter) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
+ 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.Values == nil {
+ invalidParams.Add(request.NewErrParamRequired("Values"))
+ }
+ if s.Values != nil && len(s.Values) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Values", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetKey sets the Key field's value.
+func (s *InventoryFilter) SetKey(v string) *InventoryFilter {
+ s.Key = &v
+ return s
+}
+
+// SetType sets the Type field's value.
+func (s *InventoryFilter) SetType(v string) *InventoryFilter {
+ s.Type = &v
+ return s
+}
+
+// SetValues sets the Values field's value.
+func (s *InventoryFilter) SetValues(v []*string) *InventoryFilter {
+ s.Values = v
+ return s
+}
+
+// A user-defined set of one or more filters on which to aggregate inventory
+// data. Groups return a count of resources that match and don't match the specified
+// criteria.
+type InventoryGroup struct {
+ _ struct{} `type:"structure"`
+
+ // Filters define the criteria for the group. The matchingCount field displays
+ // the number of resources that match the criteria. The notMatchingCount field
+ // displays the number of resources that don't match the criteria.
+ //
+ // Filters is a required field
+ Filters []*InventoryFilter `min:"1" type:"list" required:"true"`
+
+ // The name of the group.
+ //
+ // Name is a required field
+ Name *string `min:"1" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s InventoryGroup) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InventoryGroup) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *InventoryGroup) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "InventoryGroup"}
+ if s.Filters == nil {
+ invalidParams.Add(request.NewErrParamRequired("Filters"))
+ }
+ if s.Filters != nil && len(s.Filters) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Filters", 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.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
+ }
+ return nil
+}
+
+// SetFilters sets the Filters field's value.
+func (s *InventoryGroup) SetFilters(v []*InventoryFilter) *InventoryGroup {
+ s.Filters = v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *InventoryGroup) SetName(v string) *InventoryGroup {
+ s.Name = &v
+ return s
+}
+
+// Information collected from managed instances based on your inventory policy
+// document
+type InventoryItem struct {
+ _ struct{} `type:"structure"`
+
+ // The time the inventory information was collected.
+ //
+ // CaptureTime is a required field
+ CaptureTime *string `type:"string" required:"true"`
+
+ // The inventory data of the inventory type.
+ Content []map[string]*string `type:"list"`
+
+ // MD5 hash of the inventory item type contents. The content hash is used to
+ // determine whether to update inventory information. The PutInventory API does
+ // not update the inventory item type contents if the MD5 hash has not changed
+ // since last update.
+ ContentHash *string `type:"string"`
+
+ // A map of associated properties for a specified inventory type. For example,
+ // with this attribute, you can specify the ExecutionId, ExecutionType, ComplianceType
+ // properties of the AWS:ComplianceItem type.
+ Context map[string]*string `type:"map"`
+
+ // The schema version for the inventory item.
+ //
+ // SchemaVersion is a required field
+ SchemaVersion *string `type:"string" required:"true"`
+
+ // The name of the inventory type. Default inventory item type names start with
+ // AWS. Custom inventory type names will start with Custom. Default inventory
+ // item types include the following: AWS:AWSComponent, AWS:Application, AWS:InstanceInformation,
+ // AWS:Network, and AWS:WindowsUpdate.
+ //
+ // TypeName is a required field
+ TypeName *string `min:"1" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s InventoryItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InventoryItem) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *InventoryItem) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "InventoryItem"}
+ if s.CaptureTime == nil {
+ invalidParams.Add(request.NewErrParamRequired("CaptureTime"))
+ }
+ if s.SchemaVersion == nil {
+ invalidParams.Add(request.NewErrParamRequired("SchemaVersion"))
+ }
+ if s.TypeName == nil {
+ invalidParams.Add(request.NewErrParamRequired("TypeName"))
+ }
+ if s.TypeName != nil && len(*s.TypeName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetCaptureTime sets the CaptureTime field's value.
+func (s *InventoryItem) SetCaptureTime(v string) *InventoryItem {
+ s.CaptureTime = &v
+ return s
+}
+
+// SetContent sets the Content field's value.
+func (s *InventoryItem) SetContent(v []map[string]*string) *InventoryItem {
+ s.Content = v
+ return s
+}
+
+// SetContentHash sets the ContentHash field's value.
+func (s *InventoryItem) SetContentHash(v string) *InventoryItem {
+ s.ContentHash = &v
+ return s
+}
+
+// SetContext sets the Context field's value.
+func (s *InventoryItem) SetContext(v map[string]*string) *InventoryItem {
+ s.Context = v
+ return s
+}
+
+// SetSchemaVersion sets the SchemaVersion field's value.
+func (s *InventoryItem) SetSchemaVersion(v string) *InventoryItem {
+ s.SchemaVersion = &v
+ return s
+}
+
+// SetTypeName sets the TypeName field's value.
+func (s *InventoryItem) SetTypeName(v string) *InventoryItem {
+ s.TypeName = &v
+ return s
}
// Attributes are the entries within the inventory item content. It contains
@@ -26384,6 +31553,179 @@ func (s *InventoryResultItem) SetTypeName(v string) *InventoryResultItem {
return s
}
+// The command ID and instance ID you specified did not match any invocations.
+// Verify the command ID and the instance ID and try again.
+type InvocationDoesNotExist struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvocationDoesNotExist) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvocationDoesNotExist) GoString() string {
+ return s.String()
+}
+
+func newErrorInvocationDoesNotExist(v protocol.ResponseMetadata) error {
+ return &InvocationDoesNotExist{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvocationDoesNotExist) Code() string {
+ return "InvocationDoesNotExist"
+}
+
+// Message returns the exception's message.
+func (s *InvocationDoesNotExist) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvocationDoesNotExist) OrigErr() error {
+ return nil
+}
+
+func (s *InvocationDoesNotExist) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvocationDoesNotExist) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvocationDoesNotExist) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The inventory item has invalid content.
+type ItemContentMismatchException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+
+ TypeName *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s ItemContentMismatchException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ItemContentMismatchException) GoString() string {
+ return s.String()
+}
+
+func newErrorItemContentMismatchException(v protocol.ResponseMetadata) error {
+ return &ItemContentMismatchException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ItemContentMismatchException) Code() string {
+ return "ItemContentMismatchException"
+}
+
+// Message returns the exception's message.
+func (s *ItemContentMismatchException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ItemContentMismatchException) OrigErr() error {
+ return nil
+}
+
+func (s *ItemContentMismatchException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ItemContentMismatchException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ItemContentMismatchException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The inventory item size has exceeded the size limit.
+type ItemSizeLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+
+ TypeName *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s ItemSizeLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ItemSizeLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorItemSizeLimitExceededException(v protocol.ResponseMetadata) error {
+ return &ItemSizeLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ItemSizeLimitExceededException) Code() string {
+ return "ItemSizeLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *ItemSizeLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ItemSizeLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *ItemSizeLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ItemSizeLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ItemSizeLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
type LabelParameterVersionInput struct {
_ struct{} `type:"structure"`
@@ -26457,7 +31799,7 @@ type LabelParameterVersionOutput struct {
_ struct{} `type:"structure"`
// The label does not meet the requirements. For information about parameter
- // label requirements, see Labeling Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html)
+ // label requirements, see Labeling parameters (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html)
// in the AWS Systems Manager User Guide.
InvalidLabels []*string `min:"1" type:"list"`
@@ -27181,7 +32523,7 @@ type ListDocumentVersionsInput struct {
// results.
MaxResults *int64 `min:"1" type:"integer"`
- // The name of the document about which you want version information.
+ // The name of the document. You can specify an Amazon Resource Name (ARN).
//
// Name is a required field
Name *string `type:"string" required:"true"`
@@ -27271,10 +32613,15 @@ func (s *ListDocumentVersionsOutput) SetNextToken(v string) *ListDocumentVersion
type ListDocumentsInput struct {
_ struct{} `type:"structure"`
- // One or more filters. Use a filter to return a more specific list of results.
+ // This data type is deprecated. Instead, use Filters.
DocumentFilterList []*DocumentFilter `min:"1" type:"list"`
- // One or more filters. Use a filter to return a more specific list of results.
+ // One or more DocumentKeyValuesFilter objects. Use a filter to return a more
+ // specific list of results. For keys, you can specify one or more key-value
+ // pair tags that have been applied to a document. Other valid keys include
+ // Owner, Name, PlatformTypes, DocumentType, and TargetType. For example, to
+ // return documents you own use Key=Owner,Values=Self. To specify a custom key-value
+ // pair, use the format Key=tag:tagName,Values=valueName.
Filters []*DocumentKeyValuesFilter `type:"list"`
// The maximum number of items to return for this call. The call also returns
@@ -27671,6 +33018,12 @@ type ListResourceDataSyncInput struct {
// A token to start the list. Use this token to get the next set of results.
NextToken *string `type:"string"`
+
+ // View a list of resource data syncs according to the sync type. Specify SyncToDestination
+ // to view resource data syncs that synchronize data to an Amazon S3 buckets.
+ // Specify SyncFromSource to view resource data syncs from AWS Organizations
+ // or from multiple AWS Regions.
+ SyncType *string `min:"1" type:"string"`
}
// String returns the string representation
@@ -27689,6 +33042,9 @@ func (s *ListResourceDataSyncInput) Validate() error {
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
+ if s.SyncType != nil && len(*s.SyncType) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("SyncType", 1))
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -27708,6 +33064,12 @@ func (s *ListResourceDataSyncInput) SetNextToken(v string) *ListResourceDataSync
return s
}
+// SetSyncType sets the SyncType field's value.
+func (s *ListResourceDataSyncInput) SetSyncType(v string) *ListResourceDataSyncInput {
+ s.SyncType = &v
+ return s
+}
+
type ListResourceDataSyncOutput struct {
_ struct{} `type:"structure"`
@@ -27816,7 +33178,7 @@ func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOut
return s
}
-// Information about an Amazon S3 bucket to write instance-level logs to.
+// Information about an S3 bucket to write instance-level logs to.
//
// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs,
// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters
@@ -27825,15 +33187,15 @@ func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOut
type LoggingInfo struct {
_ struct{} `type:"structure"`
- // The name of an Amazon S3 bucket where execution logs are stored .
+ // The name of an S3 bucket where execution logs are stored .
//
// S3BucketName is a required field
S3BucketName *string `min:"3" type:"string" required:"true"`
- // (Optional) The Amazon S3 bucket subfolder.
+ // (Optional) The S3 bucket subfolder.
S3KeyPrefix *string `type:"string"`
- // The region where the Amazon S3 bucket is located.
+ // The Region where the S3 bucket is located.
//
// S3Region is a required field
S3Region *string `min:"3" type:"string" required:"true"`
@@ -28315,6 +33677,10 @@ type MaintenanceWindowIdentity struct {
// The schedule of the maintenance window in the form of a cron or rate expression.
Schedule *string `min:"1" type:"string"`
+ // The number of days to wait to run a maintenance window after the scheduled
+ // CRON expression date and time.
+ ScheduleOffset *int64 `min:"1" type:"integer"`
+
// The time zone that the scheduled maintenance window executions are based
// on, in Internet Assigned Numbers Authority (IANA) format.
ScheduleTimezone *string `type:"string"`
@@ -28385,6 +33751,12 @@ func (s *MaintenanceWindowIdentity) SetSchedule(v string) *MaintenanceWindowIden
return s
}
+// SetScheduleOffset sets the ScheduleOffset field's value.
+func (s *MaintenanceWindowIdentity) SetScheduleOffset(v int64) *MaintenanceWindowIdentity {
+ s.ScheduleOffset = &v
+ return s
+}
+
// SetScheduleTimezone sets the ScheduleTimezone field's value.
func (s *MaintenanceWindowIdentity) SetScheduleTimezone(v string) *MaintenanceWindowIdentity {
s.ScheduleTimezone = &v
@@ -28537,6 +33909,9 @@ func (s *MaintenanceWindowLambdaParameters) SetQualifier(v string) *MaintenanceW
type MaintenanceWindowRunCommandParameters struct {
_ struct{} `type:"structure"`
+ // Configuration options for sending command output to CloudWatch Logs.
+ CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"`
+
// Information about the commands to run.
Comment *string `type:"string"`
@@ -28547,14 +33922,27 @@ type MaintenanceWindowRunCommandParameters struct {
// SHA-256 or SHA-1. SHA-1 hashes have been deprecated.
DocumentHashType *string `type:"string" enum:"DocumentHashType"`
+ // The SSM document version to use in the request. You can specify $DEFAULT,
+ // $LATEST, or a specific version number. If you run commands by using the AWS
+ // CLI, then you must escape the first two options by using a backslash. If
+ // you specify a version number, then you don't need to use the backslash. For
+ // example:
+ //
+ // --document-version "\$DEFAULT"
+ //
+ // --document-version "\$LATEST"
+ //
+ // --document-version "3"
+ DocumentVersion *string `type:"string"`
+
// Configurations for sending notifications about command status changes on
// a per-instance basis.
NotificationConfig *NotificationConfig `type:"structure"`
- // The name of the Amazon S3 bucket.
+ // The name of the S3 bucket.
OutputS3BucketName *string `min:"3" type:"string"`
- // The Amazon S3 bucket subfolder.
+ // The S3 bucket subfolder.
OutputS3KeyPrefix *string `type:"string"`
// The parameters for the RUN_COMMAND task execution.
@@ -28588,6 +33976,11 @@ func (s *MaintenanceWindowRunCommandParameters) Validate() error {
if s.TimeoutSeconds != nil && *s.TimeoutSeconds < 30 {
invalidParams.Add(request.NewErrParamMinValue("TimeoutSeconds", 30))
}
+ if s.CloudWatchOutputConfig != nil {
+ if err := s.CloudWatchOutputConfig.Validate(); err != nil {
+ invalidParams.AddNested("CloudWatchOutputConfig", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -28595,6 +33988,12 @@ func (s *MaintenanceWindowRunCommandParameters) Validate() error {
return nil
}
+// SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value.
+func (s *MaintenanceWindowRunCommandParameters) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *MaintenanceWindowRunCommandParameters {
+ s.CloudWatchOutputConfig = v
+ return s
+}
+
// SetComment sets the Comment field's value.
func (s *MaintenanceWindowRunCommandParameters) SetComment(v string) *MaintenanceWindowRunCommandParameters {
s.Comment = &v
@@ -28613,6 +34012,12 @@ func (s *MaintenanceWindowRunCommandParameters) SetDocumentHashType(v string) *M
return s
}
+// SetDocumentVersion sets the DocumentVersion field's value.
+func (s *MaintenanceWindowRunCommandParameters) SetDocumentVersion(v string) *MaintenanceWindowRunCommandParameters {
+ s.DocumentVersion = &v
+ return s
+}
+
// SetNotificationConfig sets the NotificationConfig field's value.
func (s *MaintenanceWindowRunCommandParameters) SetNotificationConfig(v *NotificationConfig) *MaintenanceWindowRunCommandParameters {
s.NotificationConfig = v
@@ -28805,7 +34210,7 @@ type MaintenanceWindowTask struct {
// A description of the task.
Description *string `min:"1" type:"string" sensitive:"true"`
- // Information about an Amazon S3 bucket to write task-level logs to.
+ // Information about an S3 bucket to write task-level logs to.
//
// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs,
// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters
@@ -29054,6 +34459,62 @@ func (s *MaintenanceWindowTaskParameterValueExpression) SetValues(v []*string) *
return s
}
+// The size limit of a document is 64 KB.
+type MaxDocumentSizeExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s MaxDocumentSizeExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MaxDocumentSizeExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorMaxDocumentSizeExceeded(v protocol.ResponseMetadata) error {
+ return &MaxDocumentSizeExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *MaxDocumentSizeExceeded) Code() string {
+ return "MaxDocumentSizeExceeded"
+}
+
+// Message returns the exception's message.
+func (s *MaxDocumentSizeExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *MaxDocumentSizeExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *MaxDocumentSizeExceeded) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *MaxDocumentSizeExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *MaxDocumentSizeExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
type ModifyDocumentPermissionInput struct {
_ struct{} `type:"structure"`
@@ -29076,6 +34537,10 @@ type ModifyDocumentPermissionInput struct {
//
// PermissionType is a required field
PermissionType *string `type:"string" required:"true" enum:"DocumentPermissionType"`
+
+ // (Optional) The version of the document to share. If it's not specified, the
+ // system choose the Default version to share.
+ SharedDocumentVersion *string `type:"string"`
}
// String returns the string representation
@@ -29128,6 +34593,12 @@ func (s *ModifyDocumentPermissionInput) SetPermissionType(v string) *ModifyDocum
return s
}
+// SetSharedDocumentVersion sets the SharedDocumentVersion field's value.
+func (s *ModifyDocumentPermissionInput) SetSharedDocumentVersion(v string) *ModifyDocumentPermissionInput {
+ s.SharedDocumentVersion = &v
+ return s
+}
+
type ModifyDocumentPermissionOutput struct {
_ struct{} `type:"structure"`
}
@@ -29187,8 +34658,8 @@ type NotificationConfig struct {
// The different events for which you can receive notifications. These events
// include the following: All (events), InProgress, Success, TimedOut, Cancelled,
- // Failed. To learn more about these events, see Configuring Amazon SNS Notifications
- // for AWS Systems Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html)
+ // Failed. To learn more about these events, see Monitoring Systems Manager
+ // status changes using Amazon SNS notifications (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html)
// in the AWS Systems Manager User Guide.
NotificationEvents []*string `type:"list"`
@@ -29375,6 +34846,9 @@ func (s *OpsEntity) SetId(v string) *OpsEntity {
type OpsEntityItem struct {
_ struct{} `type:"structure"`
+ // The time OpsItem data was captured.
+ CaptureTime *string `type:"string"`
+
// The detailed data content for an OpsItem summaries result item.
Content []map[string]*string `type:"list"`
}
@@ -29389,6 +34863,12 @@ func (s OpsEntityItem) GoString() string {
return s.String()
}
+// SetCaptureTime sets the CaptureTime field's value.
+func (s *OpsEntityItem) SetCaptureTime(v string) *OpsEntityItem {
+ s.CaptureTime = &v
+ return s
+}
+
// SetContent sets the Content field's value.
func (s *OpsEntityItem) SetContent(v []map[string]*string) *OpsEntityItem {
s.Content = v
@@ -29466,11 +34946,15 @@ func (s *OpsFilter) SetValues(v []*string) *OpsFilter {
// Operations engineers and IT professionals use OpsCenter to view, investigate,
// and remediate operational issues impacting the performance and health of
// their AWS resources. For more information, see AWS Systems Manager OpsCenter
-// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
+// (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
// in the AWS Systems Manager User Guide.
type OpsItem struct {
_ struct{} `type:"structure"`
+ // An OpsItem category. Category options include: Availability, Cost, Performance,
+ // Recovery, Security.
+ Category *string `min:"1" type:"string"`
+
// The ARN of the AWS account that created the OpsItem.
CreatedBy *string `type:"string"`
@@ -29509,7 +34993,7 @@ type OpsItem struct {
// Use the /aws/resources key in OperationalData to specify a related resource
// in the request. Use the /aws/automations key in OperationalData to associate
// an Automation runbook with the OpsItem. To view AWS CLI example commands
- // that use these keys, see Creating OpsItems Manually (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems)
+ // that use these keys, see Creating OpsItems manually (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems)
// in the AWS Systems Manager User Guide.
OperationalData map[string]*OpsItemDataValue `type:"map"`
@@ -29524,12 +35008,15 @@ type OpsItem struct {
// impacted resources, or statuses for the impacted resource.
RelatedOpsItems []*RelatedOpsItem `type:"list"`
- // The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager. The
- // impacted resource is a subset of source.
+ // The severity of the OpsItem. Severity options range from 1 to 4.
+ Severity *string `min:"1" type:"string"`
+
+ // The origin of the OpsItem, such as Amazon EC2 or Systems Manager. The impacted
+ // resource is a subset of source.
Source *string `min:"1" type:"string"`
// The OpsItem status. Status can be Open, In Progress, or Resolved. For more
- // information, see Editing OpsItem Details (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html)
+ // information, see Editing OpsItem details (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html)
// in the AWS Systems Manager User Guide.
Status *string `type:"string" enum:"OpsItemStatus"`
@@ -29552,6 +35039,12 @@ func (s OpsItem) GoString() string {
return s.String()
}
+// SetCategory sets the Category field's value.
+func (s *OpsItem) SetCategory(v string) *OpsItem {
+ s.Category = &v
+ return s
+}
+
// SetCreatedBy sets the CreatedBy field's value.
func (s *OpsItem) SetCreatedBy(v string) *OpsItem {
s.CreatedBy = &v
@@ -29612,6 +35105,12 @@ func (s *OpsItem) SetRelatedOpsItems(v []*RelatedOpsItem) *OpsItem {
return s
}
+// SetSeverity sets the Severity field's value.
+func (s *OpsItem) SetSeverity(v string) *OpsItem {
+ s.Severity = &v
+ return s
+}
+
// SetSource sets the Source field's value.
func (s *OpsItem) SetSource(v string) *OpsItem {
s.Source = &v
@@ -29636,6 +35135,64 @@ func (s *OpsItem) SetVersion(v string) *OpsItem {
return s
}
+// The OpsItem already exists.
+type OpsItemAlreadyExistsException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+
+ OpsItemId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s OpsItemAlreadyExistsException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s OpsItemAlreadyExistsException) GoString() string {
+ return s.String()
+}
+
+func newErrorOpsItemAlreadyExistsException(v protocol.ResponseMetadata) error {
+ return &OpsItemAlreadyExistsException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *OpsItemAlreadyExistsException) Code() string {
+ return "OpsItemAlreadyExistsException"
+}
+
+// Message returns the exception's message.
+func (s *OpsItemAlreadyExistsException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *OpsItemAlreadyExistsException) OrigErr() error {
+ return nil
+}
+
+func (s *OpsItemAlreadyExistsException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *OpsItemAlreadyExistsException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *OpsItemAlreadyExistsException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// An object that defines the value of the key and its type in the OperationalData
// map.
type OpsItemDataValue struct {
@@ -29737,6 +35294,184 @@ func (s *OpsItemFilter) SetValues(v []*string) *OpsItemFilter {
return s
}
+// A specified parameter argument isn't valid. Verify the available arguments
+// and try again.
+type OpsItemInvalidParameterException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+
+ ParameterNames []*string `type:"list"`
+}
+
+// String returns the string representation
+func (s OpsItemInvalidParameterException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s OpsItemInvalidParameterException) GoString() string {
+ return s.String()
+}
+
+func newErrorOpsItemInvalidParameterException(v protocol.ResponseMetadata) error {
+ return &OpsItemInvalidParameterException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *OpsItemInvalidParameterException) Code() string {
+ return "OpsItemInvalidParameterException"
+}
+
+// Message returns the exception's message.
+func (s *OpsItemInvalidParameterException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *OpsItemInvalidParameterException) OrigErr() error {
+ return nil
+}
+
+func (s *OpsItemInvalidParameterException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *OpsItemInvalidParameterException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *OpsItemInvalidParameterException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The request caused OpsItems to exceed one or more quotas. For information
+// about OpsItem quotas, see What are the resource limits for OpsCenter? (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits).
+type OpsItemLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Limit *int64 `type:"integer"`
+
+ LimitType *string `type:"string"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+
+ ResourceTypes []*string `type:"list"`
+}
+
+// String returns the string representation
+func (s OpsItemLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s OpsItemLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorOpsItemLimitExceededException(v protocol.ResponseMetadata) error {
+ return &OpsItemLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *OpsItemLimitExceededException) Code() string {
+ return "OpsItemLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *OpsItemLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *OpsItemLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *OpsItemLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *OpsItemLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *OpsItemLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified OpsItem ID doesn't exist. Verify the ID and try again.
+type OpsItemNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s OpsItemNotFoundException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s OpsItemNotFoundException) GoString() string {
+ return s.String()
+}
+
+func newErrorOpsItemNotFoundException(v protocol.ResponseMetadata) error {
+ return &OpsItemNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *OpsItemNotFoundException) Code() string {
+ return "OpsItemNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *OpsItemNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *OpsItemNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *OpsItemNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *OpsItemNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *OpsItemNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// A notification about the OpsItem.
type OpsItemNotification struct {
_ struct{} `type:"structure"`
@@ -29766,6 +35501,9 @@ func (s *OpsItemNotification) SetArn(v string) *OpsItemNotification {
type OpsItemSummary struct {
_ struct{} `type:"structure"`
+ // A list of OpsItems by category.
+ Category *string `min:"1" type:"string"`
+
// The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem.
CreatedBy *string `type:"string"`
@@ -29788,6 +35526,9 @@ type OpsItemSummary struct {
// The importance of this OpsItem in relation to other OpsItems in the system.
Priority *int64 `min:"1" type:"integer"`
+ // A list of OpsItems by severity.
+ Severity *string `min:"1" type:"string"`
+
// The impacted AWS resource.
Source *string `min:"1" type:"string"`
@@ -29809,6 +35550,12 @@ func (s OpsItemSummary) GoString() string {
return s.String()
}
+// SetCategory sets the Category field's value.
+func (s *OpsItemSummary) SetCategory(v string) *OpsItemSummary {
+ s.Category = &v
+ return s
+}
+
// SetCreatedBy sets the CreatedBy field's value.
func (s *OpsItemSummary) SetCreatedBy(v string) *OpsItemSummary {
s.CreatedBy = &v
@@ -29851,6 +35598,12 @@ func (s *OpsItemSummary) SetPriority(v int64) *OpsItemSummary {
return s
}
+// SetSeverity sets the Severity field's value.
+func (s *OpsItemSummary) SetSeverity(v string) *OpsItemSummary {
+ s.Severity = &v
+ return s
+}
+
// SetSource sets the Source field's value.
func (s *OpsItemSummary) SetSource(v string) *OpsItemSummary {
s.Source = &v
@@ -29869,12 +35622,55 @@ func (s *OpsItemSummary) SetTitle(v string) *OpsItemSummary {
return s
}
+// The OpsItem data type to return.
+type OpsResultAttribute struct {
+ _ struct{} `type:"structure"`
+
+ // Name of the data type. Valid value: AWS:OpsItem, AWS:EC2InstanceInformation,
+ // AWS:OpsItemTrendline, or AWS:ComplianceSummary.
+ //
+ // TypeName is a required field
+ TypeName *string `min:"1" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s OpsResultAttribute) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s OpsResultAttribute) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *OpsResultAttribute) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "OpsResultAttribute"}
+ if s.TypeName == nil {
+ invalidParams.Add(request.NewErrParamRequired("TypeName"))
+ }
+ if s.TypeName != nil && len(*s.TypeName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetTypeName sets the TypeName field's value.
+func (s *OpsResultAttribute) SetTypeName(v string) *OpsResultAttribute {
+ s.TypeName = &v
+ return s
+}
+
// Information about the source where the association execution details are
// stored.
type OutputSource struct {
_ struct{} `type:"structure"`
- // The ID of the output source, for example the URL of an Amazon S3 bucket.
+ // The ID of the output source, for example the URL of an S3 bucket.
OutputSourceId *string `min:"36" type:"string"`
// The type of source where the association execution details are stored, for
@@ -29904,13 +35700,17 @@ func (s *OutputSource) SetOutputSourceType(v string) *OutputSource {
return s
}
-// An Amazon EC2 Systems Manager parameter in Parameter Store.
+// An Systems Manager parameter in Parameter Store.
type Parameter struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the parameter.
ARN *string `type:"string"`
+ // The data type of the parameter, such as text or aws:ec2:image. The default
+ // is text.
+ DataType *string `type:"string"`
+
// Date the parameter was last changed or updated and the parameter version
// was created.
LastModifiedDate *time.Time `type:"timestamp"`
@@ -29930,8 +35730,8 @@ type Parameter struct {
// is the raw result or response from the source.
SourceResult *string `type:"string"`
- // The type of parameter. Valid values include the following: String, String
- // list, Secure string.
+ // The type of parameter. Valid values include the following: String, StringList,
+ // and SecureString.
Type *string `type:"string" enum:"ParameterType"`
// The parameter value.
@@ -29957,6 +35757,12 @@ func (s *Parameter) SetARN(v string) *Parameter {
return s
}
+// SetDataType sets the DataType field's value.
+func (s *Parameter) SetDataType(v string) *Parameter {
+ s.DataType = &v
+ return s
+}
+
// SetLastModifiedDate sets the LastModifiedDate field's value.
func (s *Parameter) SetLastModifiedDate(v time.Time) *Parameter {
s.LastModifiedDate = &v
@@ -29999,6 +35805,62 @@ func (s *Parameter) SetVersion(v int64) *Parameter {
return s
}
+// The parameter already exists. You can't create duplicate parameters.
+type ParameterAlreadyExists struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ParameterAlreadyExists) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ParameterAlreadyExists) GoString() string {
+ return s.String()
+}
+
+func newErrorParameterAlreadyExists(v protocol.ResponseMetadata) error {
+ return &ParameterAlreadyExists{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ParameterAlreadyExists) Code() string {
+ return "ParameterAlreadyExists"
+}
+
+// Message returns the exception's message.
+func (s *ParameterAlreadyExists) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ParameterAlreadyExists) OrigErr() error {
+ return nil
+}
+
+func (s *ParameterAlreadyExists) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ParameterAlreadyExists) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ParameterAlreadyExists) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Information about parameter usage.
type ParameterHistory struct {
_ struct{} `type:"structure"`
@@ -30008,6 +35870,10 @@ type ParameterHistory struct {
// a-zA-Z0-9_.-
AllowedPattern *string `type:"string"`
+ // The data type of the parameter, such as text or aws:ec2:image. The default
+ // is text.
+ DataType *string `type:"string"`
+
// Information about the parameter.
Description *string `type:"string"`
@@ -30028,7 +35894,7 @@ type ParameterHistory struct {
// Information about the policies assigned to a parameter.
//
- // Working with Parameter Policies (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html)
+ // Assigning parameter policies (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html)
// in the AWS Systems Manager User Guide.
Policies []*ParameterInlinePolicy `type:"list"`
@@ -30061,6 +35927,12 @@ func (s *ParameterHistory) SetAllowedPattern(v string) *ParameterHistory {
return s
}
+// SetDataType sets the DataType field's value.
+func (s *ParameterHistory) SetDataType(v string) *ParameterHistory {
+ s.DataType = &v
+ return s
+}
+
// SetDescription sets the Description field's value.
func (s *ParameterHistory) SetDescription(v string) *ParameterHistory {
s.Description = &v
@@ -30173,6 +36045,119 @@ func (s *ParameterInlinePolicy) SetPolicyType(v string) *ParameterInlinePolicy {
return s
}
+// You have exceeded the number of parameters for this AWS account. Delete one
+// or more parameters and try again.
+type ParameterLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ParameterLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ParameterLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorParameterLimitExceeded(v protocol.ResponseMetadata) error {
+ return &ParameterLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ParameterLimitExceeded) Code() string {
+ return "ParameterLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *ParameterLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ParameterLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *ParameterLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ParameterLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ParameterLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The parameter exceeded the maximum number of allowed versions.
+type ParameterMaxVersionLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ParameterMaxVersionLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ParameterMaxVersionLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorParameterMaxVersionLimitExceeded(v protocol.ResponseMetadata) error {
+ return &ParameterMaxVersionLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ParameterMaxVersionLimitExceeded) Code() string {
+ return "ParameterMaxVersionLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *ParameterMaxVersionLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ParameterMaxVersionLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *ParameterMaxVersionLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ParameterMaxVersionLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ParameterMaxVersionLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Metadata includes information like the ARN of the last user and the date/time
// the parameter was last used.
type ParameterMetadata struct {
@@ -30183,6 +36168,10 @@ type ParameterMetadata struct {
// a-zA-Z0-9_.-
AllowedPattern *string `type:"string"`
+ // The data type of the parameter, such as text or aws:ec2:image. The default
+ // is text.
+ DataType *string `type:"string"`
+
// Description of the parameter actions.
Description *string `type:"string"`
@@ -30205,7 +36194,7 @@ type ParameterMetadata struct {
Tier *string `type:"string" enum:"ParameterTier"`
// The type of parameter. Valid parameter types include the following: String,
- // String list, Secure string.
+ // StringList, and SecureString.
Type *string `type:"string" enum:"ParameterType"`
// The parameter version.
@@ -30228,6 +36217,12 @@ func (s *ParameterMetadata) SetAllowedPattern(v string) *ParameterMetadata {
return s
}
+// SetDataType sets the DataType field's value.
+func (s *ParameterMetadata) SetDataType(v string) *ParameterMetadata {
+ s.DataType = &v
+ return s
+}
+
// SetDescription sets the Description field's value.
func (s *ParameterMetadata) SetDescription(v string) *ParameterMetadata {
s.Description = &v
@@ -30282,11 +36277,134 @@ func (s *ParameterMetadata) SetVersion(v int64) *ParameterMetadata {
return s
}
+// The parameter could not be found. Verify the name and try again.
+type ParameterNotFound struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ParameterNotFound) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ParameterNotFound) GoString() string {
+ return s.String()
+}
+
+func newErrorParameterNotFound(v protocol.ResponseMetadata) error {
+ return &ParameterNotFound{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ParameterNotFound) Code() string {
+ return "ParameterNotFound"
+}
+
+// Message returns the exception's message.
+func (s *ParameterNotFound) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ParameterNotFound) OrigErr() error {
+ return nil
+}
+
+func (s *ParameterNotFound) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ParameterNotFound) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ParameterNotFound) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The parameter name is not valid.
+type ParameterPatternMismatchException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // The parameter name is not valid.
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ParameterPatternMismatchException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ParameterPatternMismatchException) GoString() string {
+ return s.String()
+}
+
+func newErrorParameterPatternMismatchException(v protocol.ResponseMetadata) error {
+ return &ParameterPatternMismatchException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ParameterPatternMismatchException) Code() string {
+ return "ParameterPatternMismatchException"
+}
+
+// Message returns the exception's message.
+func (s *ParameterPatternMismatchException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ParameterPatternMismatchException) OrigErr() error {
+ return nil
+}
+
+func (s *ParameterPatternMismatchException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ParameterPatternMismatchException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ParameterPatternMismatchException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// One or more filters. Use a filter to return a more specific list of results.
//
-// The Name and Tier filter keys can't be used with the GetParametersByPath
-// API action. Also, the Label filter key can't be used with the DescribeParameters
-// API action.
+// The ParameterStringFilter object is used by the DescribeParameters and GetParametersByPath
+// API actions. However, not all of the pattern values listed for Key can be
+// used with both actions.
+//
+// For DescribeActions, all of the listed patterns are valid, with the exception
+// of Label.
+//
+// For GetParametersByPath, the following patterns listed for Key are not valid:
+// Name, Path, and Tier.
+//
+// For examples of CLI commands demonstrating valid parameter filter constructions,
+// see Searching for Systems Manager parameters (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-search.html)
+// in the AWS Systems Manager User Guide.
type ParameterStringFilter struct {
_ struct{} `type:"structure"`
@@ -30295,8 +36413,14 @@ type ParameterStringFilter struct {
// Key is a required field
Key *string `min:"1" type:"string" required:"true"`
- // Valid options are Equals and BeginsWith. For Path filter, valid options are
- // Recursive and OneLevel.
+ // For all filters used with DescribeParameters, valid options include Equals
+ // and BeginsWith. The Name filter additionally supports the Contains option.
+ // (Exception: For filters using the key Path, valid options include Recursive
+ // and OneLevel.)
+ //
+ // For filters used with GetParametersByPath, valid options include Equals and
+ // BeginsWith. (Exception: For filters using the key Label, the only valid option
+ // is Equals.)
Option *string `min:"1" type:"string"`
// The value you want to search for.
@@ -30353,6 +36477,119 @@ func (s *ParameterStringFilter) SetValues(v []*string) *ParameterStringFilter {
return s
}
+// A parameter version can have a maximum of ten labels.
+type ParameterVersionLabelLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ParameterVersionLabelLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ParameterVersionLabelLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorParameterVersionLabelLimitExceeded(v protocol.ResponseMetadata) error {
+ return &ParameterVersionLabelLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ParameterVersionLabelLimitExceeded) Code() string {
+ return "ParameterVersionLabelLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *ParameterVersionLabelLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ParameterVersionLabelLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *ParameterVersionLabelLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ParameterVersionLabelLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ParameterVersionLabelLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The specified parameter version was not found. Verify the parameter name
+// and version, and try again.
+type ParameterVersionNotFound struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ParameterVersionNotFound) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ParameterVersionNotFound) GoString() string {
+ return s.String()
+}
+
+func newErrorParameterVersionNotFound(v protocol.ResponseMetadata) error {
+ return &ParameterVersionNotFound{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ParameterVersionNotFound) Code() string {
+ return "ParameterVersionNotFound"
+}
+
+// Message returns the exception's message.
+func (s *ParameterVersionNotFound) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ParameterVersionNotFound) OrigErr() error {
+ return nil
+}
+
+func (s *ParameterVersionNotFound) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ParameterVersionNotFound) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ParameterVersionNotFound) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// This data type is deprecated. Instead, use ParameterStringFilter.
type ParametersFilter struct {
_ struct{} `type:"structure"`
@@ -30633,7 +36870,7 @@ type PatchComplianceData struct {
// The state of the patch on the instance, such as INSTALLED or FAILED.
//
- // For descriptions of each patch state, see About Patch Compliance (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch)
+ // For descriptions of each patch state, see About patch compliance (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch)
// in the AWS Systems Manager User Guide.
//
// State is a required field
@@ -30903,13 +37140,17 @@ type PatchRule struct {
// The number of days after the release date of each patch matched by the rule
// that the patch is marked as approved in the patch baseline. For example,
// a value of 7 means that patches are approved seven days after they are released.
+ // Not supported on Ubuntu Server.
+ ApproveAfterDays *int64 `type:"integer"`
+
+ // The cutoff date for auto approval of released patches. Any patches released
+ // on or before this date are installed automatically. Not supported on Ubuntu
+ // Server.
//
- // ApproveAfterDays is a required field
- ApproveAfterDays *int64 `type:"integer" required:"true"`
+ // Enter dates in the format YYYY-MM-DD. For example, 2020-12-31.
+ ApproveUntilDate *string `min:"1" type:"string"`
// A compliance severity level for all approved patches in a patch baseline.
- // Valid compliance severity levels include the following: Unspecified, Critical,
- // High, Medium, Low, and Informational.
ComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"`
// For instances identified by the approval rule filters, enables a patch baseline
@@ -30936,8 +37177,8 @@ func (s PatchRule) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *PatchRule) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "PatchRule"}
- if s.ApproveAfterDays == nil {
- invalidParams.Add(request.NewErrParamRequired("ApproveAfterDays"))
+ if s.ApproveUntilDate != nil && len(*s.ApproveUntilDate) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ApproveUntilDate", 1))
}
if s.PatchFilterGroup == nil {
invalidParams.Add(request.NewErrParamRequired("PatchFilterGroup"))
@@ -30960,6 +37201,12 @@ func (s *PatchRule) SetApproveAfterDays(v int64) *PatchRule {
return s
}
+// SetApproveUntilDate sets the ApproveUntilDate field's value.
+func (s *PatchRule) SetApproveUntilDate(v string) *PatchRule {
+ s.ApproveUntilDate = &v
+ return s
+}
+
// SetComplianceLevel sets the ComplianceLevel field's value.
func (s *PatchRule) SetComplianceLevel(v string) *PatchRule {
s.ComplianceLevel = &v
@@ -31154,6 +37401,63 @@ func (s *PatchStatus) SetDeploymentStatus(v string) *PatchStatus {
return s
}
+// You specified more than the maximum number of allowed policies for the parameter.
+// The maximum is 10.
+type PoliciesLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s PoliciesLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PoliciesLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorPoliciesLimitExceededException(v protocol.ResponseMetadata) error {
+ return &PoliciesLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *PoliciesLimitExceededException) Code() string {
+ return "PoliciesLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *PoliciesLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *PoliciesLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *PoliciesLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *PoliciesLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *PoliciesLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// An aggregate of step execution statuses displayed in the AWS Console for
// a multi-Region and multi-account Automation execution.
type ProgressCounters struct {
@@ -31243,7 +37547,7 @@ type PutComplianceItemsInput struct {
// Information about the compliance as defined by the resource type. For example,
// for a patch compliance type, Items includes information about the PatchSeverity,
- // Classification, etc.
+ // Classification, and so on.
//
// Items is a required field
Items []*ComplianceItemEntry `type:"list" required:"true"`
@@ -31259,6 +37563,18 @@ type PutComplianceItemsInput struct {
//
// ResourceType is a required field
ResourceType *string `min:"1" type:"string" required:"true"`
+
+ // The mode for uploading compliance items. You can specify COMPLETE or PARTIAL.
+ // In COMPLETE mode, the system overwrites all existing compliance information
+ // for the resource. You must provide a full list of compliance items each time
+ // you send the request.
+ //
+ // In PARTIAL mode, the system overwrites compliance information for a specific
+ // association. The association must be configured with SyncCompliance set to
+ // MANUAL. By default, all requests use COMPLETE mode.
+ //
+ // This attribute is only valid for association compliance.
+ UploadType *string `type:"string" enum:"ComplianceUploadType"`
}
// String returns the string representation
@@ -31356,6 +37672,12 @@ func (s *PutComplianceItemsInput) SetResourceType(v string) *PutComplianceItemsI
return s
}
+// SetUploadType sets the UploadType field's value.
+func (s *PutComplianceItemsInput) SetUploadType(v string) *PutComplianceItemsInput {
+ s.UploadType = &v
+ return s
+}
+
type PutComplianceItemsOutput struct {
_ struct{} `type:"structure"`
}
@@ -31373,7 +37695,7 @@ func (s PutComplianceItemsOutput) GoString() string {
type PutInventoryInput struct {
_ struct{} `type:"structure"`
- // One or more instance IDs where you want to add or update inventory items.
+ // An instance ID where you want to add or update inventory items.
//
// InstanceId is a required field
InstanceId *string `type:"string" required:"true"`
@@ -31466,6 +37788,22 @@ type PutParameterInput struct {
// AllowedPattern=^\d+$
AllowedPattern *string `type:"string"`
+ // The data type for a String parameter. Supported data types include plain
+ // text and Amazon Machine Image IDs.
+ //
+ // The following data type values are supported.
+ //
+ // * text
+ //
+ // * aws:ec2:image
+ //
+ // When you create a String parameter and specify aws:ec2:image, Systems Manager
+ // validates the parameter value is in the required format, such as ami-12345abcdeEXAMPLE,
+ // and that the specified AMI is available in your AWS account. For more information,
+ // see Native parameter support for Amazon Machine Image IDs (http://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html)
+ // in the AWS Systems Manager User Guide.
+ DataType *string `type:"string"`
+
// Information about the parameter that you want to add to the system. Optional
// but recommended.
//
@@ -31490,7 +37828,9 @@ type PutParameterInput struct {
// 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
+ // path and name. For parameters in a hierarchy, you must include a leading
+ // forward slash character (/) when you create or reference a parameter. For
+ // example: /Dev/DBServer/MySQL/db-string13
//
// Naming Constraints:
//
@@ -31507,13 +37847,17 @@ type PutParameterInput struct {
//
// * Parameter hierarchies are limited to a maximum depth of fifteen levels.
//
- // For additional information about valid values for parameter names, see Requirements
- // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html)
+ // For additional information about valid values for parameter names, see About
+ // requirements and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html)
// in the AWS Systems Manager User Guide.
//
// 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.
+ // system attributes that are not part of the name. The maximum length for a
+ // parameter name, including the full length of the parameter ARN, is 1011 characters.
+ // For example, the length of the following parameter name is 65 characters,
+ // not 20 characters:
+ //
+ // arn:aws:ssm:us-east-2:111122223333:parameter/ExampleParameterName
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true"`
@@ -31541,8 +37885,8 @@ type PutParameterInput struct {
// time, but it has not been changed.
//
// All existing policies are preserved until you send new policies or an empty
- // policy. For more information about parameter policies, see Working with Parameter
- // Policies (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-policies.html).
+ // policy. For more information about parameter policies, see Assigning parameter
+ // policies (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html).
Policies *string `min:"1" type:"string"`
// Optional metadata that you assign to a resource. Tags enable you to categorize
@@ -31573,7 +37917,7 @@ type PutParameterInput struct {
// Advanced parameters have a content size limit of 8 KB and can be configured
// to use parameter policies. You can create a maximum of 100,000 advanced parameters
// for each Region in an AWS account. Advanced parameters incur a charge. For
- // more information, see About Advanced Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html)
+ // more information, see Standard and advanced parameter tiers (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html)
// in the AWS Systems Manager User Guide.
//
// You can change a standard parameter to an advanced parameter any time. But
@@ -31621,21 +37965,22 @@ type PutParameterInput struct {
// current Region.
//
// For more information about configuring the default tier option, see Specifying
- // a Default Parameter Tier (http://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html)
+ // a default parameter tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html)
// in the AWS Systems Manager User Guide.
Tier *string `type:"string" enum:"ParameterTier"`
// The type of parameter that you want to add to the system.
//
+ // SecureString is not currently supported for AWS CloudFormation templates
+ // or in the China Regions.
+ //
// Items in a StringList must be separated by a comma (,). You can't use other
// punctuation or special character to escape items in the list. If you have
// a parameter value that requires a comma, then use the String data type.
//
- // SecureString is not currently supported for AWS CloudFormation templates
- // or in the China Regions.
- //
- // Type is a required field
- Type *string `type:"string" required:"true" enum:"ParameterType"`
+ // Specifying a parameter type is not required when updating a parameter. You
+ // must specify a parameter type when creating a parameter.
+ Type *string `type:"string" enum:"ParameterType"`
// The parameter value that you want to add to the system. Standard parameters
// have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB.
@@ -31669,9 +38014,6 @@ func (s *PutParameterInput) Validate() error {
if s.Policies != nil && len(*s.Policies) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Policies", 1))
}
- if s.Type == nil {
- invalidParams.Add(request.NewErrParamRequired("Type"))
- }
if s.Value == nil {
invalidParams.Add(request.NewErrParamRequired("Value"))
}
@@ -31698,6 +38040,12 @@ func (s *PutParameterInput) SetAllowedPattern(v string) *PutParameterInput {
return s
}
+// SetDataType sets the DataType field's value.
+func (s *PutParameterInput) SetDataType(v string) *PutParameterInput {
+ s.DataType = &v
+ return s
+}
+
// SetDescription sets the Description field's value.
func (s *PutParameterInput) SetDescription(v string) *PutParameterInput {
s.Description = &v
@@ -31996,7 +38344,7 @@ type RegisterTargetWithMaintenanceWindowInput struct {
// Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC
//
// For more information about these examples formats, including the best use
- // case for each one, see Examples: Register Targets with a Maintenance Window
+ // case for each one, see Examples: Register targets with a maintenance window
// (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
// in the AWS Systems Manager User Guide.
//
@@ -32137,7 +38485,7 @@ type RegisterTaskWithMaintenanceWindowInput struct {
// An optional description for the task.
Description *string `min:"1" type:"string" sensitive:"true"`
- // A structure containing information about an Amazon S3 bucket to write instance-level
+ // A structure containing information about an S3 bucket to write instance-level
// logs to.
//
// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs,
@@ -32172,10 +38520,10 @@ type RegisterTaskWithMaintenanceWindowInput struct {
// For more information, see the following topics in the in the AWS Systems
// Manager User Guide:
//
- // * Service-Linked Role Permissions for Systems Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions)
+ // * Using service-linked roles for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions)
//
- // * Should I Use a Service-Linked Role or a Custom Service Role to Run Maintenance
- // Window Tasks? (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role)
+ // * Should I use a service-linked role or a custom service role to run maintenance
+ // window tasks? (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role)
ServiceRoleArn *string `type:"string"`
// The targets (either instances or maintenance window targets).
@@ -32546,7 +38894,9 @@ func (s RemoveTagsFromResourceOutput) GoString() string {
type ResetServiceSettingInput struct {
_ struct{} `type:"structure"`
- // The ID of the service setting to reset.
+ // The Amazon Resource Name (ARN) of the service setting to reset. The setting
+ // ID can be /ssm/parameter-store/default-parameter-tier, /ssm/parameter-store/high-throughput-enabled,
+ // or /ssm/managed-instance/activation-tier. For example, arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled.
//
// SettingId is a required field
SettingId *string `min:"1" type:"string" required:"true"`
@@ -32731,6 +39081,342 @@ func (s *ResourceComplianceSummaryItem) SetStatus(v string) *ResourceComplianceS
return s
}
+// A sync configuration with the same name already exists.
+type ResourceDataSyncAlreadyExistsException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+
+ SyncName *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceDataSyncAlreadyExistsException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceDataSyncAlreadyExistsException) GoString() string {
+ return s.String()
+}
+
+func newErrorResourceDataSyncAlreadyExistsException(v protocol.ResponseMetadata) error {
+ return &ResourceDataSyncAlreadyExistsException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ResourceDataSyncAlreadyExistsException) Code() string {
+ return "ResourceDataSyncAlreadyExistsException"
+}
+
+// Message returns the exception's message.
+func (s *ResourceDataSyncAlreadyExistsException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ResourceDataSyncAlreadyExistsException) OrigErr() error {
+ return nil
+}
+
+func (s *ResourceDataSyncAlreadyExistsException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ResourceDataSyncAlreadyExistsException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ResourceDataSyncAlreadyExistsException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Information about the AwsOrganizationsSource resource data sync source. A
+// sync source of this type can synchronize data from AWS Organizations or,
+// if an AWS Organization is not present, from multiple AWS Regions.
+type ResourceDataSyncAwsOrganizationsSource struct {
+ _ struct{} `type:"structure"`
+
+ // If an AWS Organization is present, this is either OrganizationalUnits or
+ // EntireOrganization. For OrganizationalUnits, the data is aggregated from
+ // a set of organization units. For EntireOrganization, the data is aggregated
+ // from the entire AWS Organization.
+ //
+ // OrganizationSourceType is a required field
+ OrganizationSourceType *string `min:"1" type:"string" required:"true"`
+
+ // The AWS Organizations organization units included in the sync.
+ OrganizationalUnits []*ResourceDataSyncOrganizationalUnit `min:"1" type:"list"`
+}
+
+// String returns the string representation
+func (s ResourceDataSyncAwsOrganizationsSource) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceDataSyncAwsOrganizationsSource) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ResourceDataSyncAwsOrganizationsSource) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncAwsOrganizationsSource"}
+ if s.OrganizationSourceType == nil {
+ invalidParams.Add(request.NewErrParamRequired("OrganizationSourceType"))
+ }
+ if s.OrganizationSourceType != nil && len(*s.OrganizationSourceType) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("OrganizationSourceType", 1))
+ }
+ if s.OrganizationalUnits != nil && len(s.OrganizationalUnits) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("OrganizationalUnits", 1))
+ }
+ if s.OrganizationalUnits != nil {
+ for i, v := range s.OrganizationalUnits {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OrganizationalUnits", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetOrganizationSourceType sets the OrganizationSourceType field's value.
+func (s *ResourceDataSyncAwsOrganizationsSource) SetOrganizationSourceType(v string) *ResourceDataSyncAwsOrganizationsSource {
+ s.OrganizationSourceType = &v
+ return s
+}
+
+// SetOrganizationalUnits sets the OrganizationalUnits field's value.
+func (s *ResourceDataSyncAwsOrganizationsSource) SetOrganizationalUnits(v []*ResourceDataSyncOrganizationalUnit) *ResourceDataSyncAwsOrganizationsSource {
+ s.OrganizationalUnits = v
+ return s
+}
+
+// Another UpdateResourceDataSync request is being processed. Wait a few minutes
+// and try again.
+type ResourceDataSyncConflictException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceDataSyncConflictException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceDataSyncConflictException) GoString() string {
+ return s.String()
+}
+
+func newErrorResourceDataSyncConflictException(v protocol.ResponseMetadata) error {
+ return &ResourceDataSyncConflictException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ResourceDataSyncConflictException) Code() string {
+ return "ResourceDataSyncConflictException"
+}
+
+// Message returns the exception's message.
+func (s *ResourceDataSyncConflictException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ResourceDataSyncConflictException) OrigErr() error {
+ return nil
+}
+
+func (s *ResourceDataSyncConflictException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ResourceDataSyncConflictException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ResourceDataSyncConflictException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// You have exceeded the allowed maximum sync configurations.
+type ResourceDataSyncCountExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceDataSyncCountExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceDataSyncCountExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorResourceDataSyncCountExceededException(v protocol.ResponseMetadata) error {
+ return &ResourceDataSyncCountExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ResourceDataSyncCountExceededException) Code() string {
+ return "ResourceDataSyncCountExceededException"
+}
+
+// Message returns the exception's message.
+func (s *ResourceDataSyncCountExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ResourceDataSyncCountExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *ResourceDataSyncCountExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ResourceDataSyncCountExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ResourceDataSyncCountExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Synchronize Systems Manager Inventory data from multiple AWS accounts defined
+// in AWS Organizations to a centralized S3 bucket. Data is synchronized to
+// individual key prefixes in the central bucket. Each key prefix represents
+// a different AWS account ID.
+type ResourceDataSyncDestinationDataSharing struct {
+ _ struct{} `type:"structure"`
+
+ // The sharing data type. Only Organization is supported.
+ DestinationDataSharingType *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceDataSyncDestinationDataSharing) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceDataSyncDestinationDataSharing) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ResourceDataSyncDestinationDataSharing) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncDestinationDataSharing"}
+ if s.DestinationDataSharingType != nil && len(*s.DestinationDataSharingType) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("DestinationDataSharingType", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDestinationDataSharingType sets the DestinationDataSharingType field's value.
+func (s *ResourceDataSyncDestinationDataSharing) SetDestinationDataSharingType(v string) *ResourceDataSyncDestinationDataSharing {
+ s.DestinationDataSharingType = &v
+ return s
+}
+
+// The specified sync configuration is invalid.
+type ResourceDataSyncInvalidConfigurationException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceDataSyncInvalidConfigurationException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceDataSyncInvalidConfigurationException) GoString() string {
+ return s.String()
+}
+
+func newErrorResourceDataSyncInvalidConfigurationException(v protocol.ResponseMetadata) error {
+ return &ResourceDataSyncInvalidConfigurationException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ResourceDataSyncInvalidConfigurationException) Code() string {
+ return "ResourceDataSyncInvalidConfigurationException"
+}
+
+// Message returns the exception's message.
+func (s *ResourceDataSyncInvalidConfigurationException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ResourceDataSyncInvalidConfigurationException) OrigErr() error {
+ return nil
+}
+
+func (s *ResourceDataSyncInvalidConfigurationException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ResourceDataSyncInvalidConfigurationException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ResourceDataSyncInvalidConfigurationException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Information about a Resource Data Sync configuration, including its current
// status and last successful sync.
type ResourceDataSyncItem struct {
@@ -32748,14 +39434,26 @@ type ResourceDataSyncItem struct {
// The last time the configuration attempted to sync (UTC).
LastSyncTime *time.Time `type:"timestamp"`
- // Configuration information for the target Amazon S3 bucket.
+ // Configuration information for the target S3 bucket.
S3Destination *ResourceDataSyncS3Destination `type:"structure"`
// The date and time the configuration was created (UTC).
SyncCreatedTime *time.Time `type:"timestamp"`
+ // The date and time the resource data sync was changed.
+ SyncLastModifiedTime *time.Time `type:"timestamp"`
+
// The name of the Resource Data Sync.
SyncName *string `min:"1" type:"string"`
+
+ // Information about the source where the data was synchronized.
+ SyncSource *ResourceDataSyncSourceWithState `type:"structure"`
+
+ // The type of resource data sync. If SyncType is SyncToDestination, then the
+ // resource data sync synchronizes data to an S3 bucket. If the SyncType is
+ // SyncFromSource then the resource data sync synchronizes data from AWS Organizations
+ // or from multiple AWS Regions.
+ SyncType *string `min:"1" type:"string"`
}
// String returns the string representation
@@ -32804,29 +39502,147 @@ func (s *ResourceDataSyncItem) SetSyncCreatedTime(v time.Time) *ResourceDataSync
return s
}
+// SetSyncLastModifiedTime sets the SyncLastModifiedTime field's value.
+func (s *ResourceDataSyncItem) SetSyncLastModifiedTime(v time.Time) *ResourceDataSyncItem {
+ s.SyncLastModifiedTime = &v
+ return s
+}
+
// SetSyncName sets the SyncName field's value.
func (s *ResourceDataSyncItem) SetSyncName(v string) *ResourceDataSyncItem {
s.SyncName = &v
return s
}
-// Information about the target Amazon S3 bucket for the Resource Data Sync.
+// SetSyncSource sets the SyncSource field's value.
+func (s *ResourceDataSyncItem) SetSyncSource(v *ResourceDataSyncSourceWithState) *ResourceDataSyncItem {
+ s.SyncSource = v
+ return s
+}
+
+// SetSyncType sets the SyncType field's value.
+func (s *ResourceDataSyncItem) SetSyncType(v string) *ResourceDataSyncItem {
+ s.SyncType = &v
+ return s
+}
+
+// The specified sync name was not found.
+type ResourceDataSyncNotFoundException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+
+ SyncName *string `min:"1" type:"string"`
+
+ SyncType *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceDataSyncNotFoundException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceDataSyncNotFoundException) GoString() string {
+ return s.String()
+}
+
+func newErrorResourceDataSyncNotFoundException(v protocol.ResponseMetadata) error {
+ return &ResourceDataSyncNotFoundException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ResourceDataSyncNotFoundException) Code() string {
+ return "ResourceDataSyncNotFoundException"
+}
+
+// Message returns the exception's message.
+func (s *ResourceDataSyncNotFoundException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ResourceDataSyncNotFoundException) OrigErr() error {
+ return nil
+}
+
+func (s *ResourceDataSyncNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ResourceDataSyncNotFoundException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ResourceDataSyncNotFoundException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The AWS Organizations organizational unit data source for the sync.
+type ResourceDataSyncOrganizationalUnit struct {
+ _ struct{} `type:"structure"`
+
+ // The AWS Organization unit ID data source for the sync.
+ OrganizationalUnitId *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceDataSyncOrganizationalUnit) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceDataSyncOrganizationalUnit) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ResourceDataSyncOrganizationalUnit) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncOrganizationalUnit"}
+ if s.OrganizationalUnitId != nil && len(*s.OrganizationalUnitId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("OrganizationalUnitId", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetOrganizationalUnitId sets the OrganizationalUnitId field's value.
+func (s *ResourceDataSyncOrganizationalUnit) SetOrganizationalUnitId(v string) *ResourceDataSyncOrganizationalUnit {
+ s.OrganizationalUnitId = &v
+ return s
+}
+
+// Information about the target S3 bucket for the Resource Data Sync.
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.
+ // to the same Region as the destination S3 bucket.
AWSKMSKeyARN *string `min:"1" type:"string"`
- // The name of the Amazon S3 bucket where the aggregated data is stored.
+ // The name of the S3 bucket where the aggregated data is stored.
//
// BucketName is a required field
BucketName *string `min:"1" type:"string" required:"true"`
+ // Enables destination data sharing. By default, this field is null.
+ DestinationDataSharing *ResourceDataSyncDestinationDataSharing `type:"structure"`
+
// An Amazon S3 prefix for the bucket.
Prefix *string `min:"1" type:"string"`
- // The AWS Region with the Amazon S3 bucket targeted by the Resource Data Sync.
+ // The AWS Region with the S3 bucket targeted by the Resource Data Sync.
//
// Region is a required field
Region *string `min:"1" type:"string" required:"true"`
@@ -32871,6 +39687,11 @@ func (s *ResourceDataSyncS3Destination) Validate() error {
if s.SyncFormat == nil {
invalidParams.Add(request.NewErrParamRequired("SyncFormat"))
}
+ if s.DestinationDataSharing != nil {
+ if err := s.DestinationDataSharing.Validate(); err != nil {
+ invalidParams.AddNested("DestinationDataSharing", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -32890,6 +39711,12 @@ func (s *ResourceDataSyncS3Destination) SetBucketName(v string) *ResourceDataSyn
return s
}
+// SetDestinationDataSharing sets the DestinationDataSharing field's value.
+func (s *ResourceDataSyncS3Destination) SetDestinationDataSharing(v *ResourceDataSyncDestinationDataSharing) *ResourceDataSyncS3Destination {
+ s.DestinationDataSharing = v
+ return s
+}
+
// SetPrefix sets the Prefix field's value.
func (s *ResourceDataSyncS3Destination) SetPrefix(v string) *ResourceDataSyncS3Destination {
s.Prefix = &v
@@ -32908,6 +39735,295 @@ func (s *ResourceDataSyncS3Destination) SetSyncFormat(v string) *ResourceDataSyn
return s
}
+// Information about the source of the data included in the resource data sync.
+type ResourceDataSyncSource struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the AwsOrganizationsSource resource data sync source. A
+ // sync source of this type can synchronize data from AWS Organizations.
+ AwsOrganizationsSource *ResourceDataSyncAwsOrganizationsSource `type:"structure"`
+
+ // Whether to automatically synchronize and aggregate data from new AWS Regions
+ // when those Regions come online.
+ IncludeFutureRegions *bool `type:"boolean"`
+
+ // The SyncSource AWS Regions included in the resource data sync.
+ //
+ // SourceRegions is a required field
+ SourceRegions []*string `type:"list" required:"true"`
+
+ // The type of data source for the resource data sync. SourceType is either
+ // AwsOrganizations (if an organization is present in AWS Organizations) or
+ // singleAccountMultiRegions.
+ //
+ // SourceType is a required field
+ SourceType *string `min:"1" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ResourceDataSyncSource) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceDataSyncSource) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ResourceDataSyncSource) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncSource"}
+ if s.SourceRegions == nil {
+ invalidParams.Add(request.NewErrParamRequired("SourceRegions"))
+ }
+ if s.SourceType == nil {
+ invalidParams.Add(request.NewErrParamRequired("SourceType"))
+ }
+ if s.SourceType != nil && len(*s.SourceType) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("SourceType", 1))
+ }
+ if s.AwsOrganizationsSource != nil {
+ if err := s.AwsOrganizationsSource.Validate(); err != nil {
+ invalidParams.AddNested("AwsOrganizationsSource", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAwsOrganizationsSource sets the AwsOrganizationsSource field's value.
+func (s *ResourceDataSyncSource) SetAwsOrganizationsSource(v *ResourceDataSyncAwsOrganizationsSource) *ResourceDataSyncSource {
+ s.AwsOrganizationsSource = v
+ return s
+}
+
+// SetIncludeFutureRegions sets the IncludeFutureRegions field's value.
+func (s *ResourceDataSyncSource) SetIncludeFutureRegions(v bool) *ResourceDataSyncSource {
+ s.IncludeFutureRegions = &v
+ return s
+}
+
+// SetSourceRegions sets the SourceRegions field's value.
+func (s *ResourceDataSyncSource) SetSourceRegions(v []*string) *ResourceDataSyncSource {
+ s.SourceRegions = v
+ return s
+}
+
+// SetSourceType sets the SourceType field's value.
+func (s *ResourceDataSyncSource) SetSourceType(v string) *ResourceDataSyncSource {
+ s.SourceType = &v
+ return s
+}
+
+// The data type name for including resource data sync state. There are four
+// sync states:
+//
+// OrganizationNotExists (Your organization doesn't exist)
+//
+// NoPermissions (The system can't locate the service-linked role. This role
+// is automatically created when a user creates a resource data sync in Explorer.)
+//
+// InvalidOrganizationalUnit (You specified or selected an invalid unit in the
+// resource data sync configuration.)
+//
+// TrustedAccessDisabled (You disabled Systems Manager access in the organization
+// in AWS Organizations.)
+type ResourceDataSyncSourceWithState struct {
+ _ struct{} `type:"structure"`
+
+ // The field name in SyncSource for the ResourceDataSyncAwsOrganizationsSource
+ // type.
+ AwsOrganizationsSource *ResourceDataSyncAwsOrganizationsSource `type:"structure"`
+
+ // Whether to automatically synchronize and aggregate data from new AWS Regions
+ // when those Regions come online.
+ IncludeFutureRegions *bool `type:"boolean"`
+
+ // The SyncSource AWS Regions included in the resource data sync.
+ SourceRegions []*string `type:"list"`
+
+ // The type of data source for the resource data sync. SourceType is either
+ // AwsOrganizations (if an organization is present in AWS Organizations) or
+ // singleAccountMultiRegions.
+ SourceType *string `min:"1" type:"string"`
+
+ // The data type name for including resource data sync state. There are four
+ // sync states:
+ //
+ // OrganizationNotExists: Your organization doesn't exist.
+ //
+ // NoPermissions: The system can't locate the service-linked role. This role
+ // is automatically created when a user creates a resource data sync in Explorer.
+ //
+ // InvalidOrganizationalUnit: You specified or selected an invalid unit in the
+ // resource data sync configuration.
+ //
+ // TrustedAccessDisabled: You disabled Systems Manager access in the organization
+ // in AWS Organizations.
+ State *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceDataSyncSourceWithState) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceDataSyncSourceWithState) GoString() string {
+ return s.String()
+}
+
+// SetAwsOrganizationsSource sets the AwsOrganizationsSource field's value.
+func (s *ResourceDataSyncSourceWithState) SetAwsOrganizationsSource(v *ResourceDataSyncAwsOrganizationsSource) *ResourceDataSyncSourceWithState {
+ s.AwsOrganizationsSource = v
+ return s
+}
+
+// SetIncludeFutureRegions sets the IncludeFutureRegions field's value.
+func (s *ResourceDataSyncSourceWithState) SetIncludeFutureRegions(v bool) *ResourceDataSyncSourceWithState {
+ s.IncludeFutureRegions = &v
+ return s
+}
+
+// SetSourceRegions sets the SourceRegions field's value.
+func (s *ResourceDataSyncSourceWithState) SetSourceRegions(v []*string) *ResourceDataSyncSourceWithState {
+ s.SourceRegions = v
+ return s
+}
+
+// SetSourceType sets the SourceType field's value.
+func (s *ResourceDataSyncSourceWithState) SetSourceType(v string) *ResourceDataSyncSourceWithState {
+ s.SourceType = &v
+ return s
+}
+
+// SetState sets the State field's value.
+func (s *ResourceDataSyncSourceWithState) SetState(v string) *ResourceDataSyncSourceWithState {
+ s.State = &v
+ return s
+}
+
+// Error returned if an attempt is made to delete a patch baseline that is registered
+// for a patch group.
+type ResourceInUseException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceInUseException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceInUseException) GoString() string {
+ return s.String()
+}
+
+func newErrorResourceInUseException(v protocol.ResponseMetadata) error {
+ return &ResourceInUseException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ResourceInUseException) Code() string {
+ return "ResourceInUseException"
+}
+
+// Message returns the exception's message.
+func (s *ResourceInUseException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ResourceInUseException) OrigErr() error {
+ return nil
+}
+
+func (s *ResourceInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ResourceInUseException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ResourceInUseException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Error returned when the caller has exceeded the default resource quotas.
+// For example, too many maintenance windows or patch baselines have been created.
+//
+// For information about resource quotas in Systems Manager, see Systems Manager
+// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+// in the AWS General Reference.
+type ResourceLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s ResourceLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResourceLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorResourceLimitExceededException(v protocol.ResponseMetadata) error {
+ return &ResourceLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ResourceLimitExceededException) Code() string {
+ return "ResourceLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *ResourceLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ResourceLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *ResourceLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ResourceLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ResourceLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// The inventory item result attribute.
type ResultAttribute struct {
_ struct{} `type:"structure"`
@@ -33003,8 +40119,8 @@ type ResumeSessionOutput struct {
//
// region represents the Region identifier for an AWS Region supported by AWS
// Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a list
- // of supported region values, see the Region column in the AWS Systems Manager
- // table of regions and endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#ssm_region)
+ // of supported region values, see the Region column in Systems Manager service
+ // endpoints (http://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region)
// in the AWS General Reference.
//
// session-id represents the ID of a Session Manager session, such as 1a2b3c4dEXAMPLE.
@@ -33043,19 +40159,19 @@ func (s *ResumeSessionOutput) SetTokenValue(v string) *ResumeSessionOutput {
return s
}
-// An Amazon S3 bucket where you want to store the results of this request.
+// An S3 bucket where you want to store the results of this request.
type S3OutputLocation struct {
_ struct{} `type:"structure"`
- // The name of the Amazon S3 bucket.
+ // The name of the S3 bucket.
OutputS3BucketName *string `min:"3" type:"string"`
- // The Amazon S3 bucket subfolder.
+ // The S3 bucket subfolder.
OutputS3KeyPrefix *string `type:"string"`
// (Deprecated) You can no longer specify this parameter. The system ignores
- // it. Instead, Systems Manager automatically determines the Amazon S3 bucket
- // region.
+ // it. Instead, Systems Manager automatically determines the Region of the S3
+ // bucket.
OutputS3Region *string `min:"3" type:"string"`
}
@@ -33103,13 +40219,11 @@ func (s *S3OutputLocation) SetOutputS3Region(v string) *S3OutputLocation {
return s
}
-// A URL for the Amazon S3 bucket where you want to store the results of this
-// request.
+// A URL for the S3 bucket where you want to store the results of this request.
type S3OutputUrl struct {
_ struct{} `type:"structure"`
- // A URL for an Amazon S3 bucket where you want to store the results of this
- // request.
+ // A URL for an S3 bucket where you want to store the results of this request.
OutputUrl *string `type:"string"`
}
@@ -33312,15 +40426,15 @@ type SendCommandInput struct {
// The instance IDs where the command should run. You can specify a maximum
// of 50 IDs. If you prefer not to list individual instance IDs, you can instead
// send commands to a fleet of instances using the Targets parameter, which
- // accepts EC2 tags. For more information about how to use targets, see Sending
- // Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html)
+ // accepts EC2 tags. For more information about how to use targets, see Using
+ // targets and rate controls to send commands to a fleet (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html)
// in the AWS Systems Manager User Guide.
InstanceIds []*string `type:"list"`
// (Optional) The maximum number of instances that are allowed to run the command
// at the same time. You can specify a number such as 10 or a percentage such
// as 10%. The default value is 50. For more information about how to use MaxConcurrency,
- // see Using Concurrency Controls (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity)
+ // see Using concurrency controls (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity)
// in the AWS Systems Manager User Guide.
MaxConcurrency *string `min:"1" type:"string"`
@@ -33328,7 +40442,7 @@ type SendCommandInput struct {
// command fails one more time beyond the value of MaxErrors, the systems stops
// sending the command to additional targets. You can specify a number like
// 10 or a percentage like 10%. The default value is 0. For more information
- // about how to use MaxErrors, see Using Error Controls (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-maxerrors)
+ // about how to use MaxErrors, see Using error controls (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-maxerrors)
// in the AWS Systems Manager User Guide.
MaxErrors *string `min:"1" type:"string"`
@@ -33343,8 +40457,8 @@ type SendCommandInput struct {
OutputS3KeyPrefix *string `type:"string"`
// (Deprecated) You can no longer specify this parameter. The system ignores
- // it. Instead, Systems Manager automatically determines the Amazon S3 bucket
- // region.
+ // it. Instead, Systems Manager automatically determines the Region of the S3
+ // bucket.
OutputS3Region *string `min:"3" type:"string"`
// The required and optional parameters specified in the document being run.
@@ -33357,7 +40471,7 @@ type SendCommandInput struct {
// (Optional) An array of search criteria that targets instances using a Key,Value
// combination that you specify. Targets is required if you don't provide one
// or more instance IDs in the call. For more information about how to use targets,
- // see Sending Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html)
+ // see Sending commands to a fleet (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html)
// in the AWS Systems Manager User Guide.
Targets []*Target `type:"list"`
@@ -33639,6 +40753,63 @@ func (s *ServiceSetting) SetStatus(v string) *ServiceSetting {
return s
}
+// The specified service setting was not found. Either the service name or the
+// setting has not been provisioned by the AWS service team.
+type ServiceSettingNotFound struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s ServiceSettingNotFound) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ServiceSettingNotFound) GoString() string {
+ return s.String()
+}
+
+func newErrorServiceSettingNotFound(v protocol.ResponseMetadata) error {
+ return &ServiceSettingNotFound{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ServiceSettingNotFound) Code() string {
+ return "ServiceSettingNotFound"
+}
+
+// Message returns the exception's message.
+func (s *ServiceSettingNotFound) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ServiceSettingNotFound) OrigErr() error {
+ return nil
+}
+
+func (s *ServiceSettingNotFound) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ServiceSettingNotFound) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ServiceSettingNotFound) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Information about a Session Manager connection to an instance.
type Session struct {
_ struct{} `type:"structure"`
@@ -34023,10 +41194,23 @@ type StartAutomationExecutionInput struct {
// in the Automation document.
Parameters map[string][]*string `min:"1" type:"map"`
+ // Optional metadata that you assign to a resource. You can specify a maximum
+ // of five tags for an automation. Tags enable you to categorize a resource
+ // in different ways, such as by purpose, owner, or environment. For example,
+ // you might want to tag an automation to identify an environment or operating
+ // system. In this case, you could specify the following key name/value pairs:
+ //
+ // * Key=environment,Value=test
+ //
+ // * Key=OS,Value=Windows
+ //
+ // To add tags to an existing patch baseline, use the AddTagsToResource action.
+ Tags []*Tag `type:"list"`
+
// A location is a combination of AWS Regions and/or AWS accounts where you
// want to run the Automation. Use this action to start an Automation in multiple
- // Regions and multiple accounts. For more information, see Executing Automations
- // in Multiple AWS Regions and Accounts (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html)
+ // Regions and multiple accounts. For more information, see Running Automation
+ // workflows in multiple AWS Regions and accounts (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html)
// in the AWS Systems Manager User Guide.
TargetLocations []*TargetLocation `min:"1" type:"list"`
@@ -34076,6 +41260,16 @@ func (s *StartAutomationExecutionInput) Validate() error {
if s.TargetParameterName != nil && len(*s.TargetParameterName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("TargetParameterName", 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 s.TargetLocations != nil {
for i, v := range s.TargetLocations {
if v == nil {
@@ -34145,6 +41339,12 @@ func (s *StartAutomationExecutionInput) SetParameters(v map[string][]*string) *S
return s
}
+// SetTags sets the Tags field's value.
+func (s *StartAutomationExecutionInput) SetTags(v []*Tag) *StartAutomationExecutionInput {
+ s.Tags = v
+ return s
+}
+
// SetTargetLocations sets the TargetLocations field's value.
func (s *StartAutomationExecutionInput) SetTargetLocations(v []*TargetLocation) *StartAutomationExecutionInput {
s.TargetLocations = v
@@ -34196,8 +41396,10 @@ type StartSessionInput struct {
_ struct{} `type:"structure"`
// The name of the SSM document to define the parameters and plugin settings
- // for the session. For example, SSM-SessionManagerRunShell. If no document
- // name is provided, a shell to the instance is launched by default.
+ // for the session. For example, SSM-SessionManagerRunShell. You can call the
+ // GetDocument API to verify the document exists before attempting to start
+ // a session. If no document name is provided, a shell to the instance is launched
+ // by default.
DocumentName *string `type:"string"`
// Reserved for future use.
@@ -34264,8 +41466,8 @@ type StartSessionOutput struct {
//
// region represents the Region identifier for an AWS Region supported by AWS
// Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a list
- // of supported region values, see the Region column in the AWS Systems Manager
- // table of regions and endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#ssm_region)
+ // of supported region values, see the Region column in Systems Manager service
+ // endpoints (http://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region)
// in the AWS General Reference.
//
// session-id represents the ID of a Session Manager session, such as 1a2b3c4dEXAMPLE.
@@ -34304,6 +41506,62 @@ func (s *StartSessionOutput) SetTokenValue(v string) *StartSessionOutput {
return s
}
+// The updated status is the same as the current status.
+type StatusUnchanged struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s StatusUnchanged) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s StatusUnchanged) GoString() string {
+ return s.String()
+}
+
+func newErrorStatusUnchanged(v protocol.ResponseMetadata) error {
+ return &StatusUnchanged{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *StatusUnchanged) Code() string {
+ return "StatusUnchanged"
+}
+
+// Message returns the exception's message.
+func (s *StatusUnchanged) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *StatusUnchanged) OrigErr() error {
+ return nil
+}
+
+func (s *StatusUnchanged) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *StatusUnchanged) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *StatusUnchanged) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// Detailed information about an the execution state of an Automation step.
type StepExecution struct {
_ struct{} `type:"structure"`
@@ -34365,8 +41623,7 @@ type StepExecution struct {
// The name of this execution step.
StepName *string `type:"string"`
- // The execution status for this step. Valid values include: Pending, InProgress,
- // Success, Cancelled, Failed, and TimedOut.
+ // The execution status for this step.
StepStatus *string `type:"string" enum:"AutomationExecutionStatus"`
// The combination of AWS Regions and accounts targeted by the current Automation
@@ -34653,6 +41910,62 @@ func (s StopAutomationExecutionOutput) GoString() string {
return s.String()
}
+// The sub-type count exceeded the limit for the inventory type.
+type SubTypeCountLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s SubTypeCountLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SubTypeCountLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorSubTypeCountLimitExceededException(v protocol.ResponseMetadata) error {
+ return &SubTypeCountLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *SubTypeCountLimitExceededException) Code() string {
+ return "SubTypeCountLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *SubTypeCountLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *SubTypeCountLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *SubTypeCountLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *SubTypeCountLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *SubTypeCountLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// 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
@@ -34739,12 +42052,19 @@ func (s *Tag) SetValue(v string) *Tag {
// * Key=tag-key,Values=Name,Instance-Type,CostCenter
//
// * (Maintenance window targets only) Key=resource-groups:Name,Values=ProductionResourceGroup
+// This example demonstrates how to target all resources in the resource
+// group ProductionResourceGroup in your maintenance window.
//
// * (Maintenance window targets only) Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC
+// This example demonstrates how to target only EC2 instances and VPCs in
+// your maintenance window.
+//
+// * (State Manager association targets only) Key=InstanceIds,Values=* This
+// example demonstrates how to target all managed instances in the AWS Region
+// where the association was created.
//
// For information about how to send commands that target instances using Key,Value
-// parameters, see Using Targets and Rate Controls to Send Commands to a Fleet
-// (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting)
+// parameters, see Targeting multiple instances (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting)
// in the AWS Systems Manager User Guide.
type Target struct {
_ struct{} `type:"structure"`
@@ -34755,7 +42075,7 @@ type Target struct {
// User-defined criteria that maps to Key. For example, if you specified tag:ServerRole,
// you could specify value:WebServer to run a command on instances that include
- // Amazon EC2 tags of ServerRole,WebServer.
+ // EC2 tags of ServerRole,WebServer.
Values []*string `type:"list"`
}
@@ -34794,6 +42114,63 @@ func (s *Target) SetValues(v []*string) *Target {
return s
}
+// You specified the Safe option for the DeregisterTargetFromMaintenanceWindow
+// operation, but the target is still referenced in a task.
+type TargetInUseException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s TargetInUseException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TargetInUseException) GoString() string {
+ return s.String()
+}
+
+func newErrorTargetInUseException(v protocol.ResponseMetadata) error {
+ return &TargetInUseException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TargetInUseException) Code() string {
+ return "TargetInUseException"
+}
+
+// Message returns the exception's message.
+func (s *TargetInUseException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TargetInUseException) OrigErr() error {
+ return nil
+}
+
+func (s *TargetInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TargetInUseException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TargetInUseException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
// The combination of AWS Regions and accounts targeted by the current Automation
// execution.
type TargetLocation struct {
@@ -34882,6 +42259,65 @@ func (s *TargetLocation) SetTargetLocationMaxErrors(v string) *TargetLocation {
return s
}
+// The specified target instance for the session is not fully configured for
+// use with Session Manager. For more information, see Getting started with
+// Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html)
+// in the AWS Systems Manager User Guide.
+type TargetNotConnected struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s TargetNotConnected) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TargetNotConnected) GoString() string {
+ return s.String()
+}
+
+func newErrorTargetNotConnected(v protocol.ResponseMetadata) error {
+ return &TargetNotConnected{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TargetNotConnected) Code() string {
+ return "TargetNotConnected"
+}
+
+// Message returns the exception's message.
+func (s *TargetNotConnected) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TargetNotConnected) OrigErr() error {
+ return nil
+}
+
+func (s *TargetNotConnected) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TargetNotConnected) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TargetNotConnected) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
type TerminateSessionInput struct {
_ struct{} `type:"structure"`
@@ -34946,9 +42382,597 @@ func (s *TerminateSessionOutput) SetSessionId(v string) *TerminateSessionOutput
return s
}
+// The Targets parameter includes too many tags. Remove one or more tags and
+// try the command again.
+type TooManyTagsError struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s TooManyTagsError) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TooManyTagsError) GoString() string {
+ return s.String()
+}
+
+func newErrorTooManyTagsError(v protocol.ResponseMetadata) error {
+ return &TooManyTagsError{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TooManyTagsError) Code() string {
+ return "TooManyTagsError"
+}
+
+// Message returns the exception's message.
+func (s *TooManyTagsError) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TooManyTagsError) OrigErr() error {
+ return nil
+}
+
+func (s *TooManyTagsError) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TooManyTagsError) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TooManyTagsError) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// There are concurrent updates for a resource that supports one update at a
+// time.
+type TooManyUpdates struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s TooManyUpdates) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TooManyUpdates) GoString() string {
+ return s.String()
+}
+
+func newErrorTooManyUpdates(v protocol.ResponseMetadata) error {
+ return &TooManyUpdates{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TooManyUpdates) Code() string {
+ return "TooManyUpdates"
+}
+
+// Message returns the exception's message.
+func (s *TooManyUpdates) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TooManyUpdates) OrigErr() error {
+ return nil
+}
+
+func (s *TooManyUpdates) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TooManyUpdates) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TooManyUpdates) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The size of inventory data has exceeded the total size limit for the resource.
+type TotalSizeLimitExceededException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s TotalSizeLimitExceededException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TotalSizeLimitExceededException) GoString() string {
+ return s.String()
+}
+
+func newErrorTotalSizeLimitExceededException(v protocol.ResponseMetadata) error {
+ return &TotalSizeLimitExceededException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TotalSizeLimitExceededException) Code() string {
+ return "TotalSizeLimitExceededException"
+}
+
+// Message returns the exception's message.
+func (s *TotalSizeLimitExceededException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TotalSizeLimitExceededException) OrigErr() error {
+ return nil
+}
+
+func (s *TotalSizeLimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TotalSizeLimitExceededException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TotalSizeLimitExceededException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The calendar entry contained in the specified Systems Manager document is
+// not supported.
+type UnsupportedCalendarException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s UnsupportedCalendarException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsupportedCalendarException) GoString() string {
+ return s.String()
+}
+
+func newErrorUnsupportedCalendarException(v protocol.ResponseMetadata) error {
+ return &UnsupportedCalendarException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *UnsupportedCalendarException) Code() string {
+ return "UnsupportedCalendarException"
+}
+
+// Message returns the exception's message.
+func (s *UnsupportedCalendarException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *UnsupportedCalendarException) OrigErr() error {
+ return nil
+}
+
+func (s *UnsupportedCalendarException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *UnsupportedCalendarException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *UnsupportedCalendarException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Microsoft application patching is only available on EC2 instances and advanced
+// instances. To patch Microsoft applications on on-premises servers and VMs,
+// you must enable advanced instances. For more information, see Using the advanced-instances
+// tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html)
+// in the AWS Systems Manager User Guide.
+type UnsupportedFeatureRequiredException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s UnsupportedFeatureRequiredException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsupportedFeatureRequiredException) GoString() string {
+ return s.String()
+}
+
+func newErrorUnsupportedFeatureRequiredException(v protocol.ResponseMetadata) error {
+ return &UnsupportedFeatureRequiredException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *UnsupportedFeatureRequiredException) Code() string {
+ return "UnsupportedFeatureRequiredException"
+}
+
+// Message returns the exception's message.
+func (s *UnsupportedFeatureRequiredException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *UnsupportedFeatureRequiredException) OrigErr() error {
+ return nil
+}
+
+func (s *UnsupportedFeatureRequiredException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *UnsupportedFeatureRequiredException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *UnsupportedFeatureRequiredException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The Context attribute that you specified for the InventoryItem is not allowed
+// for this inventory type. You can only use the Context attribute with inventory
+// types like AWS:ComplianceItem.
+type UnsupportedInventoryItemContextException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+
+ TypeName *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s UnsupportedInventoryItemContextException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsupportedInventoryItemContextException) GoString() string {
+ return s.String()
+}
+
+func newErrorUnsupportedInventoryItemContextException(v protocol.ResponseMetadata) error {
+ return &UnsupportedInventoryItemContextException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *UnsupportedInventoryItemContextException) Code() string {
+ return "UnsupportedInventoryItemContextException"
+}
+
+// Message returns the exception's message.
+func (s *UnsupportedInventoryItemContextException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *UnsupportedInventoryItemContextException) OrigErr() error {
+ return nil
+}
+
+func (s *UnsupportedInventoryItemContextException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *UnsupportedInventoryItemContextException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *UnsupportedInventoryItemContextException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Inventory item type schema version has to match supported versions in the
+// service. Check output of GetInventorySchema to see the available schema version
+// for each type.
+type UnsupportedInventorySchemaVersionException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s UnsupportedInventorySchemaVersionException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsupportedInventorySchemaVersionException) GoString() string {
+ return s.String()
+}
+
+func newErrorUnsupportedInventorySchemaVersionException(v protocol.ResponseMetadata) error {
+ return &UnsupportedInventorySchemaVersionException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *UnsupportedInventorySchemaVersionException) Code() string {
+ return "UnsupportedInventorySchemaVersionException"
+}
+
+// Message returns the exception's message.
+func (s *UnsupportedInventorySchemaVersionException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *UnsupportedInventorySchemaVersionException) OrigErr() error {
+ return nil
+}
+
+func (s *UnsupportedInventorySchemaVersionException) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *UnsupportedInventorySchemaVersionException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *UnsupportedInventorySchemaVersionException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The operating systems you specified is not supported, or the operation is
+// not supported for the operating system. Valid operating systems include:
+// Windows, AmazonLinux, RedhatEnterpriseLinux, and Ubuntu.
+type UnsupportedOperatingSystem struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s UnsupportedOperatingSystem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsupportedOperatingSystem) GoString() string {
+ return s.String()
+}
+
+func newErrorUnsupportedOperatingSystem(v protocol.ResponseMetadata) error {
+ return &UnsupportedOperatingSystem{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *UnsupportedOperatingSystem) Code() string {
+ return "UnsupportedOperatingSystem"
+}
+
+// Message returns the exception's message.
+func (s *UnsupportedOperatingSystem) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *UnsupportedOperatingSystem) OrigErr() error {
+ return nil
+}
+
+func (s *UnsupportedOperatingSystem) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *UnsupportedOperatingSystem) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *UnsupportedOperatingSystem) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The parameter type is not supported.
+type UnsupportedParameterType struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s UnsupportedParameterType) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsupportedParameterType) GoString() string {
+ return s.String()
+}
+
+func newErrorUnsupportedParameterType(v protocol.ResponseMetadata) error {
+ return &UnsupportedParameterType{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *UnsupportedParameterType) Code() string {
+ return "UnsupportedParameterType"
+}
+
+// Message returns the exception's message.
+func (s *UnsupportedParameterType) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *UnsupportedParameterType) OrigErr() error {
+ return nil
+}
+
+func (s *UnsupportedParameterType) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *UnsupportedParameterType) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *UnsupportedParameterType) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The document does not support the platform type of the given instance ID(s).
+// For example, you sent an document for a Windows instance to a Linux instance.
+type UnsupportedPlatformType struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s UnsupportedPlatformType) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsupportedPlatformType) GoString() string {
+ return s.String()
+}
+
+func newErrorUnsupportedPlatformType(v protocol.ResponseMetadata) error {
+ return &UnsupportedPlatformType{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *UnsupportedPlatformType) Code() string {
+ return "UnsupportedPlatformType"
+}
+
+// Message returns the exception's message.
+func (s *UnsupportedPlatformType) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *UnsupportedPlatformType) OrigErr() error {
+ return nil
+}
+
+func (s *UnsupportedPlatformType) Error() string {
+ return fmt.Sprintf("%s: %s", s.Code(), s.Message())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *UnsupportedPlatformType) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *UnsupportedPlatformType) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
type UpdateAssociationInput struct {
_ struct{} `type:"structure"`
+ // By default, when you update an association, the system runs it immediately
+ // after it is updated and then according to the schedule you specified. Specify
+ // this option if you don't want an association to run immediately after you
+ // update it.
+ //
+ // Also, if you specified this option when you created the association, you
+ // can reset it. To do so, specify the no-apply-only-at-cron-interval parameter
+ // when you update the association from the command line. This parameter forces
+ // the association to run immediately after updating it and according to the
+ // interval specified.
+ ApplyOnlyAtCronInterval *bool `type:"boolean"`
+
// The ID of the association you want to update.
//
// AssociationId is a required field
@@ -35018,7 +43042,7 @@ type UpdateAssociationInput struct {
// or My-Document.
Name *string `type:"string"`
- // An Amazon S3 bucket where you want to store the results of this request.
+ // An S3 bucket where you want to store the results of this request.
OutputLocation *InstanceAssociationOutputLocation `type:"structure"`
// The parameters you want to update for the association. If you create a parameter
@@ -35028,6 +43052,20 @@ type UpdateAssociationInput struct {
// The cron expression used to schedule the association that you want to update.
ScheduleExpression *string `min:"1" type:"string"`
+ // The mode for generating association compliance. You can specify AUTO or MANUAL.
+ // In AUTO mode, the system uses the status of the association execution to
+ // determine the compliance status. If the association execution runs successfully,
+ // then the association is COMPLIANT. If the association execution doesn't run
+ // successfully, the association is NON-COMPLIANT.
+ //
+ // In MANUAL mode, you must specify the AssociationId as a parameter for the
+ // PutComplianceItems API action. In this case, compliance data is not managed
+ // by State Manager. It is managed by your direct call to the PutComplianceItems
+ // API action.
+ //
+ // By default, all associations use AUTO mode.
+ SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"`
+
// The targets of the association.
Targets []*Target `type:"list"`
}
@@ -35082,6 +43120,12 @@ func (s *UpdateAssociationInput) Validate() error {
return nil
}
+// SetApplyOnlyAtCronInterval sets the ApplyOnlyAtCronInterval field's value.
+func (s *UpdateAssociationInput) SetApplyOnlyAtCronInterval(v bool) *UpdateAssociationInput {
+ s.ApplyOnlyAtCronInterval = &v
+ return s
+}
+
// SetAssociationId sets the AssociationId field's value.
func (s *UpdateAssociationInput) SetAssociationId(v string) *UpdateAssociationInput {
s.AssociationId = &v
@@ -35154,6 +43198,12 @@ func (s *UpdateAssociationInput) SetScheduleExpression(v string) *UpdateAssociat
return s
}
+// SetSyncCompliance sets the SyncCompliance field's value.
+func (s *UpdateAssociationInput) SetSyncCompliance(v string) *UpdateAssociationInput {
+ s.SyncCompliance = &v
+ return s
+}
+
// SetTargets sets the Targets field's value.
func (s *UpdateAssociationInput) SetTargets(v []*Target) *UpdateAssociationInput {
s.Targets = v
@@ -35369,7 +43419,9 @@ type UpdateDocumentInput struct {
// supports JSON and YAML documents. JSON is the default format.
DocumentFormat *string `type:"string" enum:"DocumentFormat"`
- // (Required) The version of the document that you want to update.
+ // (Required) The latest version of the document that you want to update. The
+ // latest document version can be specified using the $LATEST variable or by
+ // the version number. Updating a previous version of a document is not supported.
DocumentVersion *string `type:"string"`
// The name of the document that you want to update.
@@ -35526,6 +43578,18 @@ type UpdateMaintenanceWindowInput struct {
// The schedule of the maintenance window in the form of a cron or rate expression.
Schedule *string `min:"1" type:"string"`
+ // The number of days to wait after the date and time specified by a CRON expression
+ // before running the maintenance window.
+ //
+ // For example, the following cron expression schedules a maintenance window
+ // to run the third Tuesday of every month at 11:30 PM.
+ //
+ // cron(0 30 23 ? * TUE#3 *)
+ //
+ // If the schedule offset is 2, the maintenance window won't run until two days
+ // later.
+ ScheduleOffset *int64 `min:"1" type:"integer"`
+
// The time zone that the scheduled maintenance window executions are based
// on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles",
// "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database
@@ -35569,6 +43633,9 @@ func (s *UpdateMaintenanceWindowInput) Validate() error {
if s.Schedule != nil && len(*s.Schedule) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Schedule", 1))
}
+ if s.ScheduleOffset != nil && *s.ScheduleOffset < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("ScheduleOffset", 1))
+ }
if s.WindowId == nil {
invalidParams.Add(request.NewErrParamRequired("WindowId"))
}
@@ -35636,6 +43703,12 @@ func (s *UpdateMaintenanceWindowInput) SetSchedule(v string) *UpdateMaintenanceW
return s
}
+// SetScheduleOffset sets the ScheduleOffset field's value.
+func (s *UpdateMaintenanceWindowInput) SetScheduleOffset(v int64) *UpdateMaintenanceWindowInput {
+ s.ScheduleOffset = &v
+ return s
+}
+
// SetScheduleTimezone sets the ScheduleTimezone field's value.
func (s *UpdateMaintenanceWindowInput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowInput {
s.ScheduleTimezone = &v
@@ -35685,6 +43758,10 @@ type UpdateMaintenanceWindowOutput struct {
// The schedule of the maintenance window in the form of a cron or rate expression.
Schedule *string `min:"1" type:"string"`
+ // The number of days to wait to run a maintenance window after the scheduled
+ // CRON expression date and time.
+ ScheduleOffset *int64 `min:"1" type:"integer"`
+
// The time zone that the scheduled maintenance window executions are based
// on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles",
// "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database
@@ -35758,6 +43835,12 @@ func (s *UpdateMaintenanceWindowOutput) SetSchedule(v string) *UpdateMaintenance
return s
}
+// SetScheduleOffset sets the ScheduleOffset field's value.
+func (s *UpdateMaintenanceWindowOutput) SetScheduleOffset(v int64) *UpdateMaintenanceWindowOutput {
+ s.ScheduleOffset = &v
+ return s
+}
+
// SetScheduleTimezone sets the ScheduleTimezone field's value.
func (s *UpdateMaintenanceWindowOutput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowOutput {
s.ScheduleTimezone = &v
@@ -36011,10 +44094,10 @@ type UpdateMaintenanceWindowTaskInput struct {
// For more information, see the following topics in the in the AWS Systems
// Manager User Guide:
//
- // * Service-Linked Role Permissions for Systems Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions)
+ // * Using service-linked roles for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions)
//
- // * Should I Use a Service-Linked Role or a Custom Service Role to Run Maintenance
- // Window Tasks? (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role)
+ // * Should I use a service-linked role or a custom service role to run maintenance
+ // window tasks? (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role)
ServiceRoleArn *string `type:"string"`
// The targets (either instances or tags) to modify. Instances are specified
@@ -36416,6 +44499,9 @@ func (s UpdateManagedInstanceRoleOutput) GoString() string {
type UpdateOpsItemInput struct {
_ struct{} `type:"structure"`
+ // Specify a new category for an OpsItem.
+ Category *string `min:"1" type:"string"`
+
// Update the information about the OpsItem. Provide enough information so that
// users reading this OpsItem for the first time understand the issue.
Description *string `min:"1" type:"string"`
@@ -36446,7 +44532,7 @@ type UpdateOpsItemInput struct {
// Use the /aws/resources key in OperationalData to specify a related resource
// in the request. Use the /aws/automations key in OperationalData to associate
// an Automation runbook with the OpsItem. To view AWS CLI example commands
- // that use these keys, see Creating OpsItems Manually (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems)
+ // that use these keys, see Creating OpsItems manually (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems)
// in the AWS Systems Manager User Guide.
OperationalData map[string]*OpsItemDataValue `type:"map"`
@@ -36466,8 +44552,11 @@ type UpdateOpsItemInput struct {
// impacted resources, or statuses for the impacted resource.
RelatedOpsItems []*RelatedOpsItem `type:"list"`
+ // Specify a new severity for an OpsItem.
+ Severity *string `min:"1" type:"string"`
+
// The OpsItem status. Status can be Open, In Progress, or Resolved. For more
- // information, see Editing OpsItem Details (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html)
+ // information, see Editing OpsItem details (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems.html#OpsCenter-working-with-OpsItems-editing-details)
// in the AWS Systems Manager User Guide.
Status *string `type:"string" enum:"OpsItemStatus"`
@@ -36489,6 +44578,9 @@ func (s UpdateOpsItemInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateOpsItemInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateOpsItemInput"}
+ if s.Category != nil && len(*s.Category) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Category", 1))
+ }
if s.Description != nil && len(*s.Description) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Description", 1))
}
@@ -36498,6 +44590,9 @@ func (s *UpdateOpsItemInput) Validate() error {
if s.Priority != nil && *s.Priority < 1 {
invalidParams.Add(request.NewErrParamMinValue("Priority", 1))
}
+ if s.Severity != nil && len(*s.Severity) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Severity", 1))
+ }
if s.Title != nil && len(*s.Title) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Title", 1))
}
@@ -36518,6 +44613,12 @@ func (s *UpdateOpsItemInput) Validate() error {
return nil
}
+// SetCategory sets the Category field's value.
+func (s *UpdateOpsItemInput) SetCategory(v string) *UpdateOpsItemInput {
+ s.Category = &v
+ return s
+}
+
// SetDescription sets the Description field's value.
func (s *UpdateOpsItemInput) SetDescription(v string) *UpdateOpsItemInput {
s.Description = &v
@@ -36560,6 +44661,12 @@ func (s *UpdateOpsItemInput) SetRelatedOpsItems(v []*RelatedOpsItem) *UpdateOpsI
return s
}
+// SetSeverity sets the Severity field's value.
+func (s *UpdateOpsItemInput) SetSeverity(v string) *UpdateOpsItemInput {
+ s.Severity = &v
+ return s
+}
+
// SetStatus sets the Status field's value.
func (s *UpdateOpsItemInput) SetStatus(v string) *UpdateOpsItemInput {
s.Status = &v
@@ -36595,8 +44702,8 @@ type UpdatePatchBaselineInput struct {
// A list of explicitly approved patches for the baseline.
//
// For information about accepted formats for lists of approved patches and
- // rejected patches, see Package Name Formats for Approved and Rejected Patch
- // Lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html)
+ // rejected patches, see About package name formats for approved and rejected
+ // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html)
// in the AWS Systems Manager User Guide.
ApprovedPatches []*string `type:"list"`
@@ -36625,8 +44732,8 @@ type UpdatePatchBaselineInput struct {
// A list of explicitly rejected patches for the baseline.
//
// For information about accepted formats for lists of approved patches and
- // rejected patches, see Package Name Formats for Approved and Rejected Patch
- // Lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html)
+ // rejected patches, see About package name formats for approved and rejected
+ // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html)
// in the AWS Systems Manager User Guide.
RejectedPatches []*string `type:"list"`
@@ -36925,16 +45032,125 @@ func (s *UpdatePatchBaselineOutput) SetSources(v []*PatchSource) *UpdatePatchBas
return s
}
+type UpdateResourceDataSyncInput struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the resource data sync you want to update.
+ //
+ // SyncName is a required field
+ SyncName *string `min:"1" type:"string" required:"true"`
+
+ // Specify information about the data sources to synchronize.
+ //
+ // SyncSource is a required field
+ SyncSource *ResourceDataSyncSource `type:"structure" required:"true"`
+
+ // The type of resource data sync. The supported SyncType is SyncFromSource.
+ //
+ // SyncType is a required field
+ SyncType *string `min:"1" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s UpdateResourceDataSyncInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateResourceDataSyncInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *UpdateResourceDataSyncInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "UpdateResourceDataSyncInput"}
+ if s.SyncName == nil {
+ invalidParams.Add(request.NewErrParamRequired("SyncName"))
+ }
+ if s.SyncName != nil && len(*s.SyncName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("SyncName", 1))
+ }
+ if s.SyncSource == nil {
+ invalidParams.Add(request.NewErrParamRequired("SyncSource"))
+ }
+ if s.SyncType == nil {
+ invalidParams.Add(request.NewErrParamRequired("SyncType"))
+ }
+ if s.SyncType != nil && len(*s.SyncType) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("SyncType", 1))
+ }
+ if s.SyncSource != nil {
+ if err := s.SyncSource.Validate(); err != nil {
+ invalidParams.AddNested("SyncSource", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetSyncName sets the SyncName field's value.
+func (s *UpdateResourceDataSyncInput) SetSyncName(v string) *UpdateResourceDataSyncInput {
+ s.SyncName = &v
+ return s
+}
+
+// SetSyncSource sets the SyncSource field's value.
+func (s *UpdateResourceDataSyncInput) SetSyncSource(v *ResourceDataSyncSource) *UpdateResourceDataSyncInput {
+ s.SyncSource = v
+ return s
+}
+
+// SetSyncType sets the SyncType field's value.
+func (s *UpdateResourceDataSyncInput) SetSyncType(v string) *UpdateResourceDataSyncInput {
+ s.SyncType = &v
+ return s
+}
+
+type UpdateResourceDataSyncOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s UpdateResourceDataSyncOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateResourceDataSyncOutput) GoString() string {
+ return s.String()
+}
+
// The request body of the UpdateServiceSetting API action.
type UpdateServiceSettingInput struct {
_ struct{} `type:"structure"`
- // The ID of the service setting to update.
+ // The Amazon Resource Name (ARN) of the service setting to reset. For example,
+ // arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled.
+ // The setting ID can be one of the following.
+ //
+ // * /ssm/parameter-store/default-parameter-tier
+ //
+ // * /ssm/parameter-store/high-throughput-enabled
+ //
+ // * /ssm/managed-instance/activation-tier
//
// SettingId is a required field
SettingId *string `min:"1" type:"string" required:"true"`
- // The new value to specify for the service setting.
+ // The new value to specify for the service setting. For the /ssm/parameter-store/default-parameter-tier
+ // setting ID, the setting value can be one of the following.
+ //
+ // * Standard
+ //
+ // * Advanced
+ //
+ // * Intelligent-Tiering
+ //
+ // For the /ssm/parameter-store/high-throughput-enabled, and /ssm/managed-instance/activation-tier
+ // setting IDs, the setting value can be true or false.
//
// SettingValue is a required field
SettingValue *string `min:"1" type:"string" required:"true"`
@@ -37059,6 +45275,9 @@ const (
// AssociationFilterKeyAssociationName is a AssociationFilterKey enum value
AssociationFilterKeyAssociationName = "AssociationName"
+
+ // AssociationFilterKeyResourceGroupName is a AssociationFilterKey enum value
+ AssociationFilterKeyResourceGroupName = "ResourceGroupName"
)
const (
@@ -37083,6 +45302,14 @@ const (
AssociationStatusNameFailed = "Failed"
)
+const (
+ // AssociationSyncComplianceAuto is a AssociationSyncCompliance enum value
+ AssociationSyncComplianceAuto = "AUTO"
+
+ // AssociationSyncComplianceManual is a AssociationSyncCompliance enum value
+ AssociationSyncComplianceManual = "MANUAL"
+)
+
const (
// AttachmentHashTypeSha256 is a AttachmentHashType enum value
AttachmentHashTypeSha256 = "Sha256"
@@ -37091,6 +45318,12 @@ const (
const (
// AttachmentsSourceKeySourceUrl is a AttachmentsSourceKey enum value
AttachmentsSourceKeySourceUrl = "SourceUrl"
+
+ // AttachmentsSourceKeyS3fileUrl is a AttachmentsSourceKey enum value
+ AttachmentsSourceKeyS3fileUrl = "S3FileUrl"
+
+ // AttachmentsSourceKeyAttachmentReference is a AttachmentsSourceKey enum value
+ AttachmentsSourceKeyAttachmentReference = "AttachmentReference"
)
const (
@@ -37117,6 +45350,9 @@ const (
// AutomationExecutionFilterKeyAutomationType is a AutomationExecutionFilterKey enum value
AutomationExecutionFilterKeyAutomationType = "AutomationType"
+
+ // AutomationExecutionFilterKeyTagKey is a AutomationExecutionFilterKey enum value
+ AutomationExecutionFilterKeyTagKey = "TagKey"
)
const (
@@ -37153,6 +45389,14 @@ const (
AutomationTypeLocal = "Local"
)
+const (
+ // CalendarStateOpen is a CalendarState enum value
+ CalendarStateOpen = "OPEN"
+
+ // CalendarStateClosed is a CalendarState enum value
+ CalendarStateClosed = "CLOSED"
+)
+
const (
// CommandFilterKeyInvokedAfter is a CommandFilterKey enum value
CommandFilterKeyInvokedAfter = "InvokedAfter"
@@ -37284,6 +45528,14 @@ const (
ComplianceStatusNonCompliant = "NON_COMPLIANT"
)
+const (
+ // ComplianceUploadTypeComplete is a ComplianceUploadType enum value
+ ComplianceUploadTypeComplete = "COMPLETE"
+
+ // ComplianceUploadTypePartial is a ComplianceUploadType enum value
+ ComplianceUploadTypePartial = "PARTIAL"
+)
+
const (
// ConnectionStatusConnected is a ConnectionStatus enum value
ConnectionStatusConnected = "Connected"
@@ -37323,6 +45575,9 @@ const (
// DocumentFormatJson is a DocumentFormat enum value
DocumentFormatJson = "JSON"
+
+ // DocumentFormatText is a DocumentFormat enum value
+ DocumentFormatText = "TEXT"
)
const (
@@ -37379,6 +45634,18 @@ const (
// DocumentTypePackage is a DocumentType enum value
DocumentTypePackage = "Package"
+
+ // DocumentTypeApplicationConfiguration is a DocumentType enum value
+ DocumentTypeApplicationConfiguration = "ApplicationConfiguration"
+
+ // DocumentTypeApplicationConfigurationSchema is a DocumentType enum value
+ DocumentTypeApplicationConfigurationSchema = "ApplicationConfigurationSchema"
+
+ // DocumentTypeDeploymentStrategy is a DocumentType enum value
+ DocumentTypeDeploymentStrategy = "DeploymentStrategy"
+
+ // DocumentTypeChangeCalendar is a DocumentType enum value
+ DocumentTypeChangeCalendar = "ChangeCalendar"
)
const (
@@ -37592,6 +45859,12 @@ const (
// OperatingSystemCentos is a OperatingSystem enum value
OperatingSystemCentos = "CENTOS"
+
+ // OperatingSystemOracleLinux is a OperatingSystem enum value
+ OperatingSystemOracleLinux = "ORACLE_LINUX"
+
+ // OperatingSystemDebian is a OperatingSystem enum value
+ OperatingSystemDebian = "DEBIAN"
)
const (
@@ -37661,6 +45934,12 @@ const (
// OpsItemFilterKeyAutomationId is a OpsItemFilterKey enum value
OpsItemFilterKeyAutomationId = "AutomationId"
+
+ // OpsItemFilterKeyCategory is a OpsItemFilterKey enum value
+ OpsItemFilterKeyCategory = "Category"
+
+ // OpsItemFilterKeySeverity is a OpsItemFilterKey enum value
+ OpsItemFilterKeySeverity = "Severity"
)
const (
@@ -37736,6 +46015,9 @@ const (
// PatchComplianceDataStateInstalledOther is a PatchComplianceDataState enum value
PatchComplianceDataStateInstalledOther = "INSTALLED_OTHER"
+ // PatchComplianceDataStateInstalledPendingReboot is a PatchComplianceDataState enum value
+ PatchComplianceDataStateInstalledPendingReboot = "INSTALLED_PENDING_REBOOT"
+
// PatchComplianceDataStateInstalledRejected is a PatchComplianceDataState enum value
PatchComplianceDataStateInstalledRejected = "INSTALLED_REJECTED"
@@ -37867,6 +46149,14 @@ const (
PlatformTypeLinux = "Linux"
)
+const (
+ // RebootOptionRebootIfNeeded is a RebootOption enum value
+ RebootOptionRebootIfNeeded = "RebootIfNeeded"
+
+ // RebootOptionNoReboot is a RebootOption enum value
+ RebootOptionNoReboot = "NoReboot"
+)
+
const (
// ResourceDataSyncS3FormatJsonSerDe is a ResourceDataSyncS3Format enum value
ResourceDataSyncS3FormatJsonSerDe = "JsonSerDe"
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 48d6d3ee..2fe2457c 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
@@ -8,19 +8,20 @@
// system (OS) patches, automating the creation of Amazon Machine Images (AMIs),
// and configuring operating systems (OSs) and applications at scale. Systems
// Manager lets you remotely and securely manage the configuration of your managed
-// instances. A managed instance is any Amazon EC2 instance or on-premises machine
-// in your hybrid environment that has been configured for Systems Manager.
+// instances. A managed instance is any Amazon Elastic Compute Cloud instance
+// (EC2 instance), or any on-premises server or virtual machine (VM) in your
+// hybrid environment that has been configured for Systems Manager.
//
// This reference is intended to be used with the AWS Systems Manager User Guide
-// (http://docs.aws.amazon.com/systems-manager/latest/userguide/).
+// (https://docs.aws.amazon.com/systems-manager/latest/userguide/).
//
// To get started, verify prerequisites and configure managed instances. For
-// more information, see Setting Up AWS Systems Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html)
+// more information, see Setting up AWS Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html)
// in the AWS Systems Manager User Guide.
//
-// 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).
+// For information about other API actions you can perform on EC2 instances,
+// see the Amazon EC2 API Reference (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/).
+// For information about how to use a Query API, see Making API requests (https://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.
//
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 90c4a777..884d9255 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
@@ -2,6 +2,10 @@
package ssm
+import (
+ "github.com/aws/aws-sdk-go/private/protocol"
+)
+
const (
// ErrCodeAlreadyExistsException for service response error code
@@ -129,8 +133,9 @@ const (
// Error returned when the ID specified for a resource, such as a maintenance
// window or Patch baseline, doesn't exist.
//
- // For information about resource limits in Systems Manager, see AWS Systems
- // Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+ // For information about resource quotas in Systems Manager, see Systems Manager
+ // service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+ // in the AWS General Reference.
ErrCodeDoesNotExistException = "DoesNotExistException"
// ErrCodeDuplicateDocumentContent for service response error code
@@ -164,7 +169,7 @@ const (
// "HierarchyLevelLimitExceededException".
//
// A hierarchy can have a maximum of 15 levels. For more information, see Requirements
- // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html)
+ // and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html)
// in the AWS Systems Manager User Guide.
ErrCodeHierarchyLevelLimitExceededException = "HierarchyLevelLimitExceededException"
@@ -301,6 +306,13 @@ const (
// The version of the document schema is not supported.
ErrCodeInvalidDocumentSchemaVersion = "InvalidDocumentSchemaVersion"
+ // ErrCodeInvalidDocumentType for service response error code
+ // "InvalidDocumentType".
+ //
+ // The document type is not valid. Valid document types are described in the
+ // DocumentType property.
+ ErrCodeInvalidDocumentType = "InvalidDocumentType"
+
// ErrCodeInvalidDocumentVersion for service response error code
// "InvalidDocumentVersion".
//
@@ -477,7 +489,7 @@ const (
// The role name can't contain invalid characters. Also verify that you specified
// an IAM role for notifications that includes the required trust policy. For
// information about configuring the IAM role for Run Command notifications,
- // see Configuring Amazon SNS Notifications for Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html)
+ // see Configuring Amazon SNS Notifications for Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html)
// in the AWS Systems Manager User Guide.
ErrCodeInvalidRole = "InvalidRole"
@@ -491,7 +503,7 @@ const (
// "InvalidTarget".
//
// The target is not valid or does not exist. It might not be configured for
- // EC2 Systems Manager or you might not have permission to perform the operation.
+ // Systems Manager or you might not have permission to perform the operation.
ErrCodeInvalidTarget = "InvalidTarget"
// ErrCodeInvalidTypeNameException for service response error code
@@ -547,8 +559,8 @@ const (
// ErrCodeOpsItemLimitExceededException for service response error code
// "OpsItemLimitExceededException".
//
- // The request caused OpsItems to exceed one or more limits. For information
- // about OpsItem limits, see What are the resource limits for OpsCenter? (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits).
+ // The request caused OpsItems to exceed one or more quotas. For information
+ // about OpsItem quotas, see What are the resource limits for OpsCenter? (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits).
ErrCodeOpsItemLimitExceededException = "OpsItemLimitExceededException"
// ErrCodeOpsItemNotFoundException for service response error code
@@ -614,6 +626,13 @@ const (
// A sync configuration with the same name already exists.
ErrCodeResourceDataSyncAlreadyExistsException = "ResourceDataSyncAlreadyExistsException"
+ // ErrCodeResourceDataSyncConflictException for service response error code
+ // "ResourceDataSyncConflictException".
+ //
+ // Another UpdateResourceDataSync request is being processed. Wait a few minutes
+ // and try again.
+ ErrCodeResourceDataSyncConflictException = "ResourceDataSyncConflictException"
+
// ErrCodeResourceDataSyncCountExceededException for service response error code
// "ResourceDataSyncCountExceededException".
//
@@ -642,11 +661,12 @@ const (
// ErrCodeResourceLimitExceededException for service response error code
// "ResourceLimitExceededException".
//
- // Error returned when the caller has exceeded the default resource limits.
+ // Error returned when the caller has exceeded the default resource quotas.
// For example, too many maintenance windows or patch baselines have been created.
//
- // For information about resource limits in Systems Manager, see AWS Systems
- // Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm).
+ // For information about resource quotas in Systems Manager, see Systems Manager
+ // service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm)
+ // in the AWS General Reference.
ErrCodeResourceLimitExceededException = "ResourceLimitExceededException"
// ErrCodeServiceSettingNotFound for service response error code
@@ -679,8 +699,8 @@ const (
// "TargetNotConnected".
//
// The specified target instance for the session is not fully configured for
- // use with Session Manager. For more information, see Getting Started with
- // Session Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html)
+ // use with Session Manager. For more information, see Getting started with
+ // Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html)
// in the AWS Systems Manager User Guide.
ErrCodeTargetNotConnected = "TargetNotConnected"
@@ -704,13 +724,20 @@ const (
// The size of inventory data has exceeded the total size limit for the resource.
ErrCodeTotalSizeLimitExceededException = "TotalSizeLimitExceededException"
+ // ErrCodeUnsupportedCalendarException for service response error code
+ // "UnsupportedCalendarException".
+ //
+ // The calendar entry contained in the specified Systems Manager document is
+ // not supported.
+ ErrCodeUnsupportedCalendarException = "UnsupportedCalendarException"
+
// ErrCodeUnsupportedFeatureRequiredException for service response error code
// "UnsupportedFeatureRequiredException".
//
- // Microsoft application patching is only available on EC2 instances and Advanced
- // Instances. To patch Microsoft applications on on-premises servers and VMs,
- // you must enable Advanced Instances. For more information, see Using the Advanced-Instances
- // Tier (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html)
+ // Microsoft application patching is only available on EC2 instances and advanced
+ // instances. To patch Microsoft applications on on-premises servers and VMs,
+ // you must enable advanced instances. For more information, see Using the advanced-instances
+ // tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html)
// in the AWS Systems Manager User Guide.
ErrCodeUnsupportedFeatureRequiredException = "UnsupportedFeatureRequiredException"
@@ -751,3 +778,119 @@ const (
// For example, you sent an document for a Windows instance to a Linux instance.
ErrCodeUnsupportedPlatformType = "UnsupportedPlatformType"
)
+
+var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
+ "AlreadyExistsException": newErrorAlreadyExistsException,
+ "AssociatedInstances": newErrorAssociatedInstances,
+ "AssociationAlreadyExists": newErrorAssociationAlreadyExists,
+ "AssociationDoesNotExist": newErrorAssociationDoesNotExist,
+ "AssociationExecutionDoesNotExist": newErrorAssociationExecutionDoesNotExist,
+ "AssociationLimitExceeded": newErrorAssociationLimitExceeded,
+ "AssociationVersionLimitExceeded": newErrorAssociationVersionLimitExceeded,
+ "AutomationDefinitionNotFoundException": newErrorAutomationDefinitionNotFoundException,
+ "AutomationDefinitionVersionNotFoundException": newErrorAutomationDefinitionVersionNotFoundException,
+ "AutomationExecutionLimitExceededException": newErrorAutomationExecutionLimitExceededException,
+ "AutomationExecutionNotFoundException": newErrorAutomationExecutionNotFoundException,
+ "AutomationStepNotFoundException": newErrorAutomationStepNotFoundException,
+ "ComplianceTypeCountLimitExceededException": newErrorComplianceTypeCountLimitExceededException,
+ "CustomSchemaCountLimitExceededException": newErrorCustomSchemaCountLimitExceededException,
+ "DocumentAlreadyExists": newErrorDocumentAlreadyExists,
+ "DocumentLimitExceeded": newErrorDocumentLimitExceeded,
+ "DocumentPermissionLimit": newErrorDocumentPermissionLimit,
+ "DocumentVersionLimitExceeded": newErrorDocumentVersionLimitExceeded,
+ "DoesNotExistException": newErrorDoesNotExistException,
+ "DuplicateDocumentContent": newErrorDuplicateDocumentContent,
+ "DuplicateDocumentVersionName": newErrorDuplicateDocumentVersionName,
+ "DuplicateInstanceId": newErrorDuplicateInstanceId,
+ "FeatureNotAvailableException": newErrorFeatureNotAvailableException,
+ "HierarchyLevelLimitExceededException": newErrorHierarchyLevelLimitExceededException,
+ "HierarchyTypeMismatchException": newErrorHierarchyTypeMismatchException,
+ "IdempotentParameterMismatch": newErrorIdempotentParameterMismatch,
+ "IncompatiblePolicyException": newErrorIncompatiblePolicyException,
+ "InternalServerError": newErrorInternalServerError,
+ "InvalidActivation": newErrorInvalidActivation,
+ "InvalidActivationId": newErrorInvalidActivationId,
+ "InvalidAggregatorException": newErrorInvalidAggregatorException,
+ "InvalidAllowedPatternException": newErrorInvalidAllowedPatternException,
+ "InvalidAssociation": newErrorInvalidAssociation,
+ "InvalidAssociationVersion": newErrorInvalidAssociationVersion,
+ "InvalidAutomationExecutionParametersException": newErrorInvalidAutomationExecutionParametersException,
+ "InvalidAutomationSignalException": newErrorInvalidAutomationSignalException,
+ "InvalidAutomationStatusUpdateException": newErrorInvalidAutomationStatusUpdateException,
+ "InvalidCommandId": newErrorInvalidCommandId,
+ "InvalidDeleteInventoryParametersException": newErrorInvalidDeleteInventoryParametersException,
+ "InvalidDeletionIdException": newErrorInvalidDeletionIdException,
+ "InvalidDocument": newErrorInvalidDocument,
+ "InvalidDocumentContent": newErrorInvalidDocumentContent,
+ "InvalidDocumentOperation": newErrorInvalidDocumentOperation,
+ "InvalidDocumentSchemaVersion": newErrorInvalidDocumentSchemaVersion,
+ "InvalidDocumentType": newErrorInvalidDocumentType,
+ "InvalidDocumentVersion": newErrorInvalidDocumentVersion,
+ "InvalidFilter": newErrorInvalidFilter,
+ "InvalidFilterKey": newErrorInvalidFilterKey,
+ "InvalidFilterOption": newErrorInvalidFilterOption,
+ "InvalidFilterValue": newErrorInvalidFilterValue,
+ "InvalidInstanceId": newErrorInvalidInstanceId,
+ "InvalidInstanceInformationFilterValue": newErrorInvalidInstanceInformationFilterValue,
+ "InvalidInventoryGroupException": newErrorInvalidInventoryGroupException,
+ "InvalidInventoryItemContextException": newErrorInvalidInventoryItemContextException,
+ "InvalidInventoryRequestException": newErrorInvalidInventoryRequestException,
+ "InvalidItemContentException": newErrorInvalidItemContentException,
+ "InvalidKeyId": newErrorInvalidKeyId,
+ "InvalidNextToken": newErrorInvalidNextToken,
+ "InvalidNotificationConfig": newErrorInvalidNotificationConfig,
+ "InvalidOptionException": newErrorInvalidOptionException,
+ "InvalidOutputFolder": newErrorInvalidOutputFolder,
+ "InvalidOutputLocation": newErrorInvalidOutputLocation,
+ "InvalidParameters": newErrorInvalidParameters,
+ "InvalidPermissionType": newErrorInvalidPermissionType,
+ "InvalidPluginName": newErrorInvalidPluginName,
+ "InvalidPolicyAttributeException": newErrorInvalidPolicyAttributeException,
+ "InvalidPolicyTypeException": newErrorInvalidPolicyTypeException,
+ "InvalidResourceId": newErrorInvalidResourceId,
+ "InvalidResourceType": newErrorInvalidResourceType,
+ "InvalidResultAttributeException": newErrorInvalidResultAttributeException,
+ "InvalidRole": newErrorInvalidRole,
+ "InvalidSchedule": newErrorInvalidSchedule,
+ "InvalidTarget": newErrorInvalidTarget,
+ "InvalidTypeNameException": newErrorInvalidTypeNameException,
+ "InvalidUpdate": newErrorInvalidUpdate,
+ "InvocationDoesNotExist": newErrorInvocationDoesNotExist,
+ "ItemContentMismatchException": newErrorItemContentMismatchException,
+ "ItemSizeLimitExceededException": newErrorItemSizeLimitExceededException,
+ "MaxDocumentSizeExceeded": newErrorMaxDocumentSizeExceeded,
+ "OpsItemAlreadyExistsException": newErrorOpsItemAlreadyExistsException,
+ "OpsItemInvalidParameterException": newErrorOpsItemInvalidParameterException,
+ "OpsItemLimitExceededException": newErrorOpsItemLimitExceededException,
+ "OpsItemNotFoundException": newErrorOpsItemNotFoundException,
+ "ParameterAlreadyExists": newErrorParameterAlreadyExists,
+ "ParameterLimitExceeded": newErrorParameterLimitExceeded,
+ "ParameterMaxVersionLimitExceeded": newErrorParameterMaxVersionLimitExceeded,
+ "ParameterNotFound": newErrorParameterNotFound,
+ "ParameterPatternMismatchException": newErrorParameterPatternMismatchException,
+ "ParameterVersionLabelLimitExceeded": newErrorParameterVersionLabelLimitExceeded,
+ "ParameterVersionNotFound": newErrorParameterVersionNotFound,
+ "PoliciesLimitExceededException": newErrorPoliciesLimitExceededException,
+ "ResourceDataSyncAlreadyExistsException": newErrorResourceDataSyncAlreadyExistsException,
+ "ResourceDataSyncConflictException": newErrorResourceDataSyncConflictException,
+ "ResourceDataSyncCountExceededException": newErrorResourceDataSyncCountExceededException,
+ "ResourceDataSyncInvalidConfigurationException": newErrorResourceDataSyncInvalidConfigurationException,
+ "ResourceDataSyncNotFoundException": newErrorResourceDataSyncNotFoundException,
+ "ResourceInUseException": newErrorResourceInUseException,
+ "ResourceLimitExceededException": newErrorResourceLimitExceededException,
+ "ServiceSettingNotFound": newErrorServiceSettingNotFound,
+ "StatusUnchanged": newErrorStatusUnchanged,
+ "SubTypeCountLimitExceededException": newErrorSubTypeCountLimitExceededException,
+ "TargetInUseException": newErrorTargetInUseException,
+ "TargetNotConnected": newErrorTargetNotConnected,
+ "TooManyTagsError": newErrorTooManyTagsError,
+ "TooManyUpdates": newErrorTooManyUpdates,
+ "TotalSizeLimitExceededException": newErrorTotalSizeLimitExceededException,
+ "UnsupportedCalendarException": newErrorUnsupportedCalendarException,
+ "UnsupportedFeatureRequiredException": newErrorUnsupportedFeatureRequiredException,
+ "UnsupportedInventoryItemContextException": newErrorUnsupportedInventoryItemContextException,
+ "UnsupportedInventorySchemaVersionException": newErrorUnsupportedInventorySchemaVersionException,
+ "UnsupportedOperatingSystem": newErrorUnsupportedOperatingSystem,
+ "UnsupportedParameterType": newErrorUnsupportedParameterType,
+ "UnsupportedPlatformType": newErrorUnsupportedPlatformType,
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go
index 9a6b8f71..9d097020 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go
@@ -8,6 +8,7 @@ import (
"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"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
@@ -31,7 +32,7 @@ var initRequest func(*request.Request)
const (
ServiceName = "ssm" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "SSM" // ServiceID is a unique identifer of a specific service.
+ ServiceID = "SSM" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the SSM client with a session.
@@ -39,6 +40,8 @@ const (
// aws.Config parameter to add your extra config.
//
// Example:
+// mySession := session.Must(session.NewSession())
+//
// // Create a SSM client from just a session.
// svc := ssm.New(mySession)
//
@@ -46,11 +49,11 @@ const (
// svc := ssm.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSM {
c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
+ return newClient(*c.Config, c.Handlers, c.PartitionID, 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) *SSM {
+func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *SSM {
svc := &SSM{
Client: client.New(
cfg,
@@ -59,6 +62,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
+ PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2014-11-06",
JSONVersion: "1.1",
@@ -73,7 +77,9 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
+ svc.Handlers.UnmarshalError.PushBackNamed(
+ protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
+ )
// Run custom client initialization if present
if initClient != nil {
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/ssmiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/ssmiface/interface.go
index 9a415b3c..8469ff52 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ssm/ssmiface/interface.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/ssmiface/interface.go
@@ -297,6 +297,10 @@ type SSMAPI interface {
GetAutomationExecutionWithContext(aws.Context, *ssm.GetAutomationExecutionInput, ...request.Option) (*ssm.GetAutomationExecutionOutput, error)
GetAutomationExecutionRequest(*ssm.GetAutomationExecutionInput) (*request.Request, *ssm.GetAutomationExecutionOutput)
+ GetCalendarState(*ssm.GetCalendarStateInput) (*ssm.GetCalendarStateOutput, error)
+ GetCalendarStateWithContext(aws.Context, *ssm.GetCalendarStateInput, ...request.Option) (*ssm.GetCalendarStateOutput, error)
+ GetCalendarStateRequest(*ssm.GetCalendarStateInput) (*request.Request, *ssm.GetCalendarStateOutput)
+
GetCommandInvocation(*ssm.GetCommandInvocationInput) (*ssm.GetCommandInvocationOutput, error)
GetCommandInvocationWithContext(aws.Context, *ssm.GetCommandInvocationInput, ...request.Option) (*ssm.GetCommandInvocationOutput, error)
GetCommandInvocationRequest(*ssm.GetCommandInvocationInput) (*request.Request, *ssm.GetCommandInvocationOutput)
@@ -563,6 +567,10 @@ type SSMAPI interface {
UpdatePatchBaselineWithContext(aws.Context, *ssm.UpdatePatchBaselineInput, ...request.Option) (*ssm.UpdatePatchBaselineOutput, error)
UpdatePatchBaselineRequest(*ssm.UpdatePatchBaselineInput) (*request.Request, *ssm.UpdatePatchBaselineOutput)
+ UpdateResourceDataSync(*ssm.UpdateResourceDataSyncInput) (*ssm.UpdateResourceDataSyncOutput, error)
+ UpdateResourceDataSyncWithContext(aws.Context, *ssm.UpdateResourceDataSyncInput, ...request.Option) (*ssm.UpdateResourceDataSyncOutput, error)
+ UpdateResourceDataSyncRequest(*ssm.UpdateResourceDataSyncInput) (*request.Request, *ssm.UpdateResourceDataSyncOutput)
+
UpdateServiceSetting(*ssm.UpdateServiceSettingInput) (*ssm.UpdateServiceSettingOutput, error)
UpdateServiceSettingWithContext(aws.Context, *ssm.UpdateServiceSettingInput, ...request.Option) (*ssm.UpdateServiceSettingOutput, error)
UpdateServiceSettingRequest(*ssm.UpdateServiceSettingInput) (*request.Request, *ssm.UpdateServiceSettingOutput)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
index eb0a6a41..550b5f68 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
@@ -78,6 +78,8 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)
// in the IAM User Guide.
//
+// Session Duration
+//
// By default, the temporary security credentials created by AssumeRole last
// for one hour. However, you can use the optional DurationSeconds parameter
// to specify the duration of your session. You can provide a value from 900
@@ -91,6 +93,8 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
// in the IAM User Guide.
//
+// Permissions
+//
// The temporary security credentials created by AssumeRole can be used to make
// API calls to any AWS service with the following exception: You cannot call
// the AWS STS GetFederationToken or GetSessionToken API operations.
@@ -99,7 +103,7 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// to this operation. You can pass a single JSON policy document to use as an
// inline session policy. You can also specify up to 10 managed policies to
// use as managed session policies. The plain text that you use for both inline
-// and managed session policies shouldn't exceed 2048 characters. Passing policies
+// and managed session policies can't exceed 2,048 characters. Passing policies
// to this operation returns new temporary credentials. The resulting session's
// permissions are the intersection of the role's identity-based policy and
// the session policies. You can use the role's temporary credentials in subsequent
@@ -131,6 +135,24 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
// in the IAM User Guide.
//
+// Tags
+//
+// (Optional) You can pass tag key-value pairs to your session. These tags are
+// called session tags. For more information about session tags, see Passing
+// Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide.
+//
+// An administrator must grant you the permissions necessary to pass session
+// tags. The administrator can also create granular permissions to allow you
+// to pass only specific session tags. For more information, see Tutorial: Using
+// Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
+// in the IAM User Guide.
+//
+// You can set the session tags as transitive. Transitive tags persist during
+// role chaining. For more information, see Chaining Roles with Session Tags
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
+// in the IAM User Guide.
+//
// Using MFA with AssumeRole
//
// (Optional) You can include multi-factor authentication (MFA) information
@@ -165,9 +187,18 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// message describes the specific error.
//
// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the policy document was too large. The error
-// message describes how big the policy document is, in packed form, as a percentage
-// of what the API allows.
+// The request was rejected because the total packed size of the session policies
+// and session tags combined was too large. An AWS conversion compresses the
+// session policy document, session policy ARNs, and session tags into a packed
+// binary format that has a separate limit. The error message indicates by percentage
+// how close the policies and tags are to the upper size limit. For more information,
+// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide.
+//
+// You could receive this error even though you meet other defined session policy
+// and session tag limits. For more information, see IAM and STS Entity Character
+// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
+// in the IAM User Guide.
//
// * ErrCodeRegionDisabledException "RegionDisabledException"
// STS is not activated in the requested region for the account that is being
@@ -256,6 +287,8 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// an access key ID, a secret access key, and a security token. Applications
// can use these temporary security credentials to sign calls to AWS services.
//
+// Session Duration
+//
// By default, the temporary security credentials created by AssumeRoleWithSAML
// last for one hour. However, you can use the optional DurationSeconds parameter
// to specify the duration of your session. Your role session lasts for the
@@ -271,6 +304,8 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
// in the IAM User Guide.
//
+// Permissions
+//
// The temporary security credentials created by AssumeRoleWithSAML can be used
// to make API calls to any AWS service with the following exception: you cannot
// call the STS GetFederationToken or GetSessionToken API operations.
@@ -279,7 +314,7 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// to this operation. You can pass a single JSON policy document to use as an
// inline session policy. You can also specify up to 10 managed policies to
// use as managed session policies. The plain text that you use for both inline
-// and managed session policies shouldn't exceed 2048 characters. Passing policies
+// and managed session policies can't exceed 2,048 characters. Passing policies
// to this operation returns new temporary credentials. The resulting session's
// permissions are the intersection of the role's identity-based policy and
// the session policies. You can use the role's temporary credentials in subsequent
@@ -289,12 +324,6 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide.
//
-// Before your application can call AssumeRoleWithSAML, you must configure your
-// SAML identity provider (IdP) to issue the claims required by AWS. Additionally,
-// you must use AWS Identity and Access Management (IAM) to create a SAML provider
-// entity in your AWS account that represents your identity provider. You must
-// also create an IAM role that specifies this SAML provider in its trust policy.
-//
// Calling AssumeRoleWithSAML does not require the use of AWS security credentials.
// The identity of the caller is validated by using keys in the metadata document
// that is uploaded for the SAML provider entity for your identity provider.
@@ -302,8 +331,50 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// Calling AssumeRoleWithSAML can result in an entry in your AWS CloudTrail
// logs. The entry includes the value in the NameID element of the SAML assertion.
// We recommend that you use a NameIDType that is not associated with any personally
-// identifiable information (PII). For example, you could instead use the Persistent
-// Identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).
+// identifiable information (PII). For example, you could instead use the persistent
+// identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).
+//
+// Tags
+//
+// (Optional) You can configure your IdP to pass attributes into your SAML assertion
+// as session tags. Each session tag consists of a key name and an associated
+// value. For more information about session tags, see Passing Session Tags
+// in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide.
+//
+// You can pass up to 50 session tags. The plain text session tag keys can’t
+// exceed 128 characters and the values can’t exceed 256 characters. For these
+// and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+// in the IAM User Guide.
+//
+// An AWS conversion compresses the passed session policies and session tags
+// into a packed binary format that has a separate limit. Your request can fail
+// for this limit even if your plain text meets the other requirements. The
+// PackedPolicySize response element indicates by percentage how close the policies
+// and tags for your request are to the upper size limit.
+//
+// You can pass a session tag with the same key as a tag that is attached to
+// the role. When you do, session tags override the role's tags with the same
+// key.
+//
+// An administrator must grant you the permissions necessary to pass session
+// tags. The administrator can also create granular permissions to allow you
+// to pass only specific session tags. For more information, see Tutorial: Using
+// Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
+// in the IAM User Guide.
+//
+// You can set the session tags as transitive. Transitive tags persist during
+// role chaining. For more information, see Chaining Roles with Session Tags
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
+// in the IAM User Guide.
+//
+// SAML Configuration
+//
+// Before your application can call AssumeRoleWithSAML, you must configure your
+// SAML identity provider (IdP) to issue the claims required by AWS. Additionally,
+// you must use AWS Identity and Access Management (IAM) to create a SAML provider
+// entity in your AWS account that represents your identity provider. You must
+// also create an IAM role that specifies this SAML provider in its trust policy.
//
// For more information, see the following resources:
//
@@ -332,9 +403,18 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// message describes the specific error.
//
// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the policy document was too large. The error
-// message describes how big the policy document is, in packed form, as a percentage
-// of what the API allows.
+// The request was rejected because the total packed size of the session policies
+// and session tags combined was too large. An AWS conversion compresses the
+// session policy document, session policy ARNs, and session tags into a packed
+// binary format that has a separate limit. The error message indicates by percentage
+// how close the policies and tags are to the upper size limit. For more information,
+// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide.
+//
+// You could receive this error even though you meet other defined session policy
+// and session tag limits. For more information, see IAM and STS Entity Character
+// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
+// in the IAM User Guide.
//
// * ErrCodeIDPRejectedClaimException "IDPRejectedClaim"
// The identity provider (IdP) reported that authentication failed. This might
@@ -456,6 +536,8 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// key ID, a secret access key, and a security token. Applications can use these
// temporary security credentials to sign calls to AWS service API operations.
//
+// Session Duration
+//
// By default, the temporary security credentials created by AssumeRoleWithWebIdentity
// last for one hour. However, you can use the optional DurationSeconds parameter
// to specify the duration of your session. You can provide a value from 900
@@ -469,6 +551,8 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
// in the IAM User Guide.
//
+// Permissions
+//
// The temporary security credentials created by AssumeRoleWithWebIdentity can
// be used to make API calls to any AWS service with the following exception:
// you cannot call the STS GetFederationToken or GetSessionToken API operations.
@@ -477,7 +561,7 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// to this operation. You can pass a single JSON policy document to use as an
// inline session policy. You can also specify up to 10 managed policies to
// use as managed session policies. The plain text that you use for both inline
-// and managed session policies shouldn't exceed 2048 characters. Passing policies
+// and managed session policies can't exceed 2,048 characters. Passing policies
// to this operation returns new temporary credentials. The resulting session's
// permissions are the intersection of the role's identity-based policy and
// the session policies. You can use the role's temporary credentials in subsequent
@@ -487,6 +571,42 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide.
//
+// Tags
+//
+// (Optional) You can configure your IdP to pass attributes into your web identity
+// token as session tags. Each session tag consists of a key name and an associated
+// value. For more information about session tags, see Passing Session Tags
+// in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide.
+//
+// You can pass up to 50 session tags. The plain text session tag keys can’t
+// exceed 128 characters and the values can’t exceed 256 characters. For these
+// and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+// in the IAM User Guide.
+//
+// An AWS conversion compresses the passed session policies and session tags
+// into a packed binary format that has a separate limit. Your request can fail
+// for this limit even if your plain text meets the other requirements. The
+// PackedPolicySize response element indicates by percentage how close the policies
+// and tags for your request are to the upper size limit.
+//
+// You can pass a session tag with the same key as a tag that is attached to
+// the role. When you do, the session tag overrides the role tag with the same
+// key.
+//
+// An administrator must grant you the permissions necessary to pass session
+// tags. The administrator can also create granular permissions to allow you
+// to pass only specific session tags. For more information, see Tutorial: Using
+// Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
+// in the IAM User Guide.
+//
+// You can set the session tags as transitive. Transitive tags persist during
+// role chaining. For more information, see Chaining Roles with Session Tags
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
+// in the IAM User Guide.
+//
+// Identities
+//
// Before your application can call AssumeRoleWithWebIdentity, you must have
// an identity token from a supported identity provider and create a role that
// the application can assume. The role that your application assumes must trust
@@ -514,8 +634,8 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// * AWS SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/) and
// AWS SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/).
// These toolkits contain sample apps that show how to invoke the identity
-// providers, and then how to use the information from these providers to
-// get and use temporary security credentials.
+// providers. The toolkits then show how to use the information from these
+// providers to get and use temporary security credentials.
//
// * Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications).
// This article discusses web identity federation and shows an example of
@@ -535,9 +655,18 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// message describes the specific error.
//
// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the policy document was too large. The error
-// message describes how big the policy document is, in packed form, as a percentage
-// of what the API allows.
+// The request was rejected because the total packed size of the session policies
+// and session tags combined was too large. An AWS conversion compresses the
+// session policy document, session policy ARNs, and session tags into a packed
+// binary format that has a separate limit. The error message indicates by percentage
+// how close the policies and tags are to the upper size limit. For more information,
+// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide.
+//
+// You could receive this error even though you meet other defined session policy
+// and session tag limits. For more information, see IAM and STS Entity Character
+// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
+// in the IAM User Guide.
//
// * ErrCodeIDPRejectedClaimException "IDPRejectedClaim"
// The identity provider (IdP) reported that authentication failed. This might
@@ -547,11 +676,11 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// can also mean that the claim has expired or has been explicitly revoked.
//
// * ErrCodeIDPCommunicationErrorException "IDPCommunicationError"
-// The request could not be fulfilled because the non-AWS identity provider
-// (IDP) that was asked to verify the incoming identity token could not be reached.
-// This is often a transient error caused by network conditions. Retry the request
+// The request could not be fulfilled because the identity provider (IDP) that
+// was asked to verify the incoming identity token could not be reached. This
+// is often a transient error caused by network conditions. Retry the request
// a limited number of times so that you don't exceed the request rate. If the
-// error persists, the non-AWS identity provider might be down or not responding.
+// error persists, the identity provider might be down or not responding.
//
// * ErrCodeInvalidIdentityTokenException "InvalidIdentityToken"
// The web identity token that was passed could not be validated by AWS. Get
@@ -763,7 +892,8 @@ func (c *STS) GetAccessKeyInfoRequest(input *GetAccessKeyInfoInput) (req *reques
// pull a credentials report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html)
// to learn which IAM user owns the keys. To learn who requested the temporary
// credentials for an ASIA access key, view the STS events in your CloudTrail
-// logs (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html).
+// logs (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html)
+// in the IAM User Guide.
//
// This operation does not indicate the state of the access key. The key might
// be active, inactive, or deleted. Active keys might not have permissions to
@@ -850,7 +980,8 @@ func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *requ
// sts:GetCallerIdentity action, you can still perform this operation. Permissions
// are not required because the same information is returned when an IAM user
// or role is denied access. To view an example response, see I Am Not Authorized
-// to Perform: iam:DeleteVirtualMFADevice (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa).
+// to Perform: iam:DeleteVirtualMFADevice (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa)
+// 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
@@ -942,7 +1073,8 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
// or an OpenID Connect-compatible identity provider. In this case, we recommend
// that you use Amazon Cognito (http://aws.amazon.com/cognito/) or AssumeRoleWithWebIdentity.
// For more information, see Federation Through a Web-based Identity Provider
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity).
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
+// in the IAM User Guide.
//
// You can also call GetFederationToken using the security credentials of an
// AWS account root user, but we do not recommend it. Instead, we recommend
@@ -952,41 +1084,67 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
// Practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)
// in the IAM User Guide.
//
+// Session duration
+//
// The temporary credentials are valid for the specified duration, from 900
// seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default
-// is 43,200 seconds (12 hours). Temporary credentials that are obtained by
-// using AWS account root user credentials have a maximum duration of 3,600
-// seconds (1 hour).
+// session duration is 43,200 seconds (12 hours). Temporary credentials that
+// are obtained by using AWS account root user credentials have a maximum duration
+// of 3,600 seconds (1 hour).
//
-// The temporary security credentials created by GetFederationToken can be used
-// to make API calls to any AWS service with the following exceptions:
+// Permissions
//
-// * You cannot use these credentials to call any IAM API operations.
+// You can use the temporary credentials created by GetFederationToken in any
+// AWS service except the following:
//
-// * You cannot call any STS API operations except GetCallerIdentity.
+// * You cannot call any IAM operations using the AWS CLI or the AWS API.
//
-// Permissions
+// * You cannot call any STS operations except GetCallerIdentity.
//
// You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// to this operation. You can pass a single JSON policy document to use as an
// inline session policy. You can also specify up to 10 managed policies to
// use as managed session policies. The plain text that you use for both inline
-// and managed session policies shouldn't exceed 2048 characters.
+// and managed session policies can't exceed 2,048 characters.
//
// Though the session policy parameters are optional, if you do not pass a policy,
-// then the resulting federated user session has no permissions. The only exception
-// is when the credentials are used to access a resource that has a resource-based
-// policy that specifically references the federated user session in the Principal
-// element of the policy. When you pass session policies, the session permissions
-// are the intersection of the IAM user policies and the session policies that
-// you pass. This gives you a way to further restrict the permissions for a
-// federated user. You cannot use session policies to grant more permissions
-// than those that are defined in the permissions policy of the IAM user. For
-// more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+// then the resulting federated user session has no permissions. When you pass
+// session policies, the session permissions are the intersection of the IAM
+// user policies and the session policies that you pass. This gives you a way
+// to further restrict the permissions for a federated user. You cannot use
+// session policies to grant more permissions than those that are defined in
+// the permissions policy of the IAM user. For more information, see Session
+// Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide. For information about using GetFederationToken to
// create temporary security credentials, see GetFederationToken—Federation
// Through a Custom Identity Broker (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken).
//
+// You can use the credentials to access a resource that has a resource-based
+// policy. If that policy specifically references the federated user session
+// in the Principal element of the policy, the session has the permissions allowed
+// by the policy. These permissions are granted in addition to the permissions
+// granted by the session policies.
+//
+// Tags
+//
+// (Optional) You can pass tag key-value pairs to your session. These are called
+// session tags. For more information about session tags, see Passing Session
+// Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide.
+//
+// An administrator must grant you the permissions necessary to pass session
+// tags. The administrator can also create granular permissions to allow you
+// to pass only specific session tags. For more information, see Tutorial: Using
+// Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
+// in the IAM User Guide.
+//
+// Tag key–value pairs are not case sensitive, but case is preserved. This
+// means that you cannot have separate Department and department tag keys. Assume
+// that the user that you are federating has the Department=Marketing tag and
+// you pass the department=engineering session tag. Department and department
+// are not saved as separate tags, and the session tag passed in the request
+// takes precedence over the user tag.
+//
// Returns awserr.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.
@@ -1000,9 +1158,18 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
// message describes the specific error.
//
// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the policy document was too large. The error
-// message describes how big the policy document is, in packed form, as a percentage
-// of what the API allows.
+// The request was rejected because the total packed size of the session policies
+// and session tags combined was too large. An AWS conversion compresses the
+// session policy document, session policy ARNs, and session tags into a packed
+// binary format that has a separate limit. The error message indicates by percentage
+// how close the policies and tags are to the upper size limit. For more information,
+// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide.
+//
+// You could receive this error even though you meet other defined session policy
+// and session tag limits. For more information, see IAM and STS Entity Character
+// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
+// in the IAM User Guide.
//
// * ErrCodeRegionDisabledException "RegionDisabledException"
// STS is not activated in the requested region for the account that is being
@@ -1091,6 +1258,8 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.
// and Comparing the AWS STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
// in the IAM User Guide.
//
+// Session Duration
+//
// The GetSessionToken operation must be called by using the long-term AWS security
// credentials of the AWS account root user or an IAM user. Credentials that
// are created by IAM users are valid for the duration that you specify. This
@@ -1099,6 +1268,8 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.
// based on account credentials can range from 900 seconds (15 minutes) up to
// 3,600 seconds (1 hour), with a default of 1 hour.
//
+// Permissions
+//
// The temporary security credentials created by GetSessionToken can be used
// to make API calls to any AWS service with the following exceptions:
//
@@ -1213,16 +1384,16 @@ type AssumeRoleInput struct {
// in the IAM User Guide.
//
// The plain text that you use for both inline and managed session policies
- // shouldn't exceed 2048 characters. The JSON policy characters can be any ASCII
+ // can't exceed 2,048 characters. The JSON policy characters can be any ASCII
// character from the space character to the end of the valid character list
// (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A),
// and carriage return (\u000D) characters.
//
- // The characters in this parameter count towards the 2048 character session
- // policy guideline. However, an AWS conversion compresses the session policies
- // into a packed binary format that has a separate limit. This is the enforced
- // limit. The PackedPolicySize response element indicates by percentage how
- // close the policy is to the upper size limit.
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
Policy *string `min:"1" type:"string"`
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want
@@ -1231,15 +1402,15 @@ type AssumeRoleInput struct {
//
// This parameter is optional. You can provide up to 10 managed policy ARNs.
// However, the plain text that you use for both inline and managed session
- // policies shouldn't exceed 2048 characters. For more information about ARNs,
+ // policies can't exceed 2,048 characters. For more information about ARNs,
// see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// in the AWS General Reference.
//
- // The characters in this parameter count towards the 2048 character session
- // policy guideline. However, an AWS conversion compresses the session policies
- // into a packed binary format that has a separate limit. This is the enforced
- // limit. The PackedPolicySize response element indicates by percentage how
- // close the policy is to the upper size limit.
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
//
// Passing policies to this operation returns new temporary credentials. The
// resulting session's permissions are the intersection of the role's identity-based
@@ -1284,6 +1455,41 @@ type AssumeRoleInput struct {
// also include underscores or any of the following characters: =,.@-
SerialNumber *string `min:"9" type:"string"`
+ // A list of session tags that you want to pass. Each session tag consists of
+ // a key name and an associated value. For more information about session tags,
+ // see Tagging AWS STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+ // in the IAM User Guide.
+ //
+ // This parameter is optional. You can pass up to 50 session tags. The plain
+ // text session tag keys can’t exceed 128 characters, and the values can’t
+ // exceed 256 characters. For these and additional limits, see IAM and STS Character
+ // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+ // in the IAM User Guide.
+ //
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
+ //
+ // You can pass a session tag with the same key as a tag that is already attached
+ // to the role. When you do, session tags override a role tag with the same
+ // key.
+ //
+ // Tag key–value pairs are not case sensitive, but case is preserved. This
+ // means that you cannot have separate Department and department tag keys. Assume
+ // that the role has the Department=Marketing tag and you pass the department=engineering
+ // session tag. Department and department are not saved as separate tags, and
+ // the session tag passed in the request takes precedence over the role tag.
+ //
+ // Additionally, if you used temporary credentials to perform this operation,
+ // the new session inherits any transitive session tags from the calling session.
+ // If you pass a session tag with the same key as an inherited tag, the operation
+ // fails. To view the inherited tags for a session, see the AWS CloudTrail logs.
+ // For more information, see Viewing Session Tags in CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/session-tags.html#id_session-tags_ctlogs)
+ // in the IAM User Guide.
+ Tags []*Tag `type:"list"`
+
// The value provided by the MFA device, if the trust policy of the role being
// assumed requires MFA (that is, if the policy includes a condition that tests
// for MFA). If the role being assumed requires MFA and if the TokenCode value
@@ -1292,6 +1498,19 @@ type AssumeRoleInput struct {
// The format for this parameter, as described by its regex pattern, is a sequence
// of six numeric digits.
TokenCode *string `min:"6" type:"string"`
+
+ // A list of keys for session tags that you want to set as transitive. If you
+ // set a tag key as transitive, the corresponding key and value passes to subsequent
+ // sessions in a role chain. For more information, see Chaining Roles with Session
+ // Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
+ // in the IAM User Guide.
+ //
+ // This parameter is optional. When you set session tags as transitive, the
+ // session policy and session tags packed binary limit is not affected.
+ //
+ // If you choose not to specify a transitive tag key, then no tags are passed
+ // from this session to any subsequent sessions.
+ TransitiveTagKeys []*string `type:"list"`
}
// String returns the string representation
@@ -1344,6 +1563,16 @@ func (s *AssumeRoleInput) Validate() error {
}
}
}
+ 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
@@ -1393,12 +1622,24 @@ func (s *AssumeRoleInput) SetSerialNumber(v string) *AssumeRoleInput {
return s
}
+// SetTags sets the Tags field's value.
+func (s *AssumeRoleInput) SetTags(v []*Tag) *AssumeRoleInput {
+ s.Tags = v
+ return s
+}
+
// SetTokenCode sets the TokenCode field's value.
func (s *AssumeRoleInput) SetTokenCode(v string) *AssumeRoleInput {
s.TokenCode = &v
return s
}
+// SetTransitiveTagKeys sets the TransitiveTagKeys field's value.
+func (s *AssumeRoleInput) SetTransitiveTagKeys(v []*string) *AssumeRoleInput {
+ s.TransitiveTagKeys = v
+ return s
+}
+
// Contains the response to a successful AssumeRole request, including temporary
// AWS credentials that can be used to make AWS requests.
type AssumeRoleOutput struct {
@@ -1418,9 +1659,10 @@ type AssumeRoleOutput struct {
// We strongly recommend that you make no assumptions about the maximum size.
Credentials *Credentials `type:"structure"`
- // A percentage value that indicates the size of the policy in packed form.
- // The service rejects any policy with a packed size greater than 100 percent,
- // which means the policy exceeded the allowed space.
+ // A percentage value that indicates the packed size of the session policies
+ // and session tags combined passed in the request. The request fails if the
+ // packed size is greater than 100 percent, which means the policies and tags
+ // exceeded the allowed space.
PackedPolicySize *int64 `type:"integer"`
}
@@ -1491,16 +1733,16 @@ type AssumeRoleWithSAMLInput struct {
// in the IAM User Guide.
//
// The plain text that you use for both inline and managed session policies
- // shouldn't exceed 2048 characters. The JSON policy characters can be any ASCII
+ // can't exceed 2,048 characters. The JSON policy characters can be any ASCII
// character from the space character to the end of the valid character list
// (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A),
// and carriage return (\u000D) characters.
//
- // The characters in this parameter count towards the 2048 character session
- // policy guideline. However, an AWS conversion compresses the session policies
- // into a packed binary format that has a separate limit. This is the enforced
- // limit. The PackedPolicySize response element indicates by percentage how
- // close the policy is to the upper size limit.
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
Policy *string `min:"1" type:"string"`
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want
@@ -1509,15 +1751,15 @@ type AssumeRoleWithSAMLInput struct {
//
// This parameter is optional. You can provide up to 10 managed policy ARNs.
// However, the plain text that you use for both inline and managed session
- // policies shouldn't exceed 2048 characters. For more information about ARNs,
+ // policies can't exceed 2,048 characters. For more information about ARNs,
// see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// in the AWS General Reference.
//
- // The characters in this parameter count towards the 2048 character session
- // policy guideline. However, an AWS conversion compresses the session policies
- // into a packed binary format that has a separate limit. This is the enforced
- // limit. The PackedPolicySize response element indicates by percentage how
- // close the policy is to the upper size limit.
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
//
// Passing policies to this operation returns new temporary credentials. The
// resulting session's permissions are the intersection of the role's identity-based
@@ -1546,7 +1788,7 @@ type AssumeRoleWithSAMLInput struct {
// in the IAM User Guide.
//
// SAMLAssertion is a required field
- SAMLAssertion *string `min:"4" type:"string" required:"true"`
+ SAMLAssertion *string `min:"4" type:"string" required:"true" sensitive:"true"`
}
// String returns the string representation
@@ -1673,9 +1915,10 @@ type AssumeRoleWithSAMLOutput struct {
// ) )
NameQualifier *string `type:"string"`
- // A percentage value that indicates the size of the policy in packed form.
- // The service rejects any policy with a packed size greater than 100 percent,
- // which means the policy exceeded the allowed space.
+ // A percentage value that indicates the packed size of the session policies
+ // and session tags combined passed in the request. The request fails if the
+ // packed size is greater than 100 percent, which means the policies and tags
+ // exceeded the allowed space.
PackedPolicySize *int64 `type:"integer"`
// The value of the NameID element in the Subject element of the SAML assertion.
@@ -1786,16 +2029,16 @@ type AssumeRoleWithWebIdentityInput struct {
// in the IAM User Guide.
//
// The plain text that you use for both inline and managed session policies
- // shouldn't exceed 2048 characters. The JSON policy characters can be any ASCII
+ // can't exceed 2,048 characters. The JSON policy characters can be any ASCII
// character from the space character to the end of the valid character list
// (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A),
// and carriage return (\u000D) characters.
//
- // The characters in this parameter count towards the 2048 character session
- // policy guideline. However, an AWS conversion compresses the session policies
- // into a packed binary format that has a separate limit. This is the enforced
- // limit. The PackedPolicySize response element indicates by percentage how
- // close the policy is to the upper size limit.
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
Policy *string `min:"1" type:"string"`
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want
@@ -1804,15 +2047,15 @@ type AssumeRoleWithWebIdentityInput struct {
//
// This parameter is optional. You can provide up to 10 managed policy ARNs.
// However, the plain text that you use for both inline and managed session
- // policies shouldn't exceed 2048 characters. For more information about ARNs,
+ // policies can't exceed 2,048 characters. For more information about ARNs,
// see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// in the AWS General Reference.
//
- // The characters in this parameter count towards the 2048 character session
- // policy guideline. However, an AWS conversion compresses the session policies
- // into a packed binary format that has a separate limit. This is the enforced
- // limit. The PackedPolicySize response element indicates by percentage how
- // close the policy is to the upper size limit.
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
//
// Passing policies to this operation returns new temporary credentials. The
// resulting session's permissions are the intersection of the role's identity-based
@@ -1857,7 +2100,7 @@ type AssumeRoleWithWebIdentityInput struct {
// the application makes an AssumeRoleWithWebIdentity call.
//
// WebIdentityToken is a required field
- WebIdentityToken *string `min:"4" type:"string" required:"true"`
+ WebIdentityToken *string `min:"4" type:"string" required:"true" sensitive:"true"`
}
// String returns the string representation
@@ -1983,9 +2226,10 @@ type AssumeRoleWithWebIdentityOutput struct {
// We strongly recommend that you make no assumptions about the maximum size.
Credentials *Credentials `type:"structure"`
- // A percentage value that indicates the size of the policy in packed form.
- // The service rejects any policy with a packed size greater than 100 percent,
- // which means the policy exceeded the allowed space.
+ // A percentage value that indicates the packed size of the session policies
+ // and session tags combined passed in the request. The request fails if the
+ // packed size is greater than 100 percent, which means the policies and tags
+ // exceeded the allowed space.
PackedPolicySize *int64 `type:"integer"`
// The issuing authority of the web identity token presented. For OpenID Connect
@@ -2057,7 +2301,7 @@ type AssumedRoleUser struct {
// The ARN of the temporary security credentials that are returned from the
// AssumeRole action. For more information about ARNs and how to use them in
// policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html)
- // in Using IAM.
+ // in the IAM User Guide.
//
// Arn is a required field
Arn *string `min:"20" type:"string" required:"true"`
@@ -2225,7 +2469,7 @@ type FederatedUser struct {
// The ARN that specifies the federated user that is associated with the credentials.
// For more information about ARNs and how to use them in policies, see IAM
// Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html)
- // in Using IAM.
+ // in the IAM User Guide.
//
// Arn is a required field
Arn *string `min:"20" type:"string" required:"true"`
@@ -2265,7 +2509,7 @@ type GetAccessKeyInfoInput struct {
// The identifier of an access key.
//
// This parameter allows (through its regex pattern) a string of characters
- // that can consist of any upper- or lowercased letter or digit.
+ // that can consist of any upper- or lowercase letter or digit.
//
// AccessKeyId is a required field
AccessKeyId *string `min:"16" type:"string" required:"true"`
@@ -2418,10 +2662,7 @@ type GetFederationTokenInput struct {
// use as managed session policies.
//
// This parameter is optional. However, if you do not pass any session policies,
- // then the resulting federated user session has no permissions. The only exception
- // is when the credentials are used to access a resource that has a resource-based
- // policy that specifically references the federated user session in the Principal
- // element of the policy.
+ // then the resulting federated user session has no permissions.
//
// When you pass session policies, the session permissions are the intersection
// of the IAM user policies and the session policies that you pass. This gives
@@ -2431,17 +2672,23 @@ type GetFederationTokenInput struct {
// Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide.
//
+ // The resulting credentials can be used to access a resource that has a resource-based
+ // policy. If that policy specifically references the federated user session
+ // in the Principal element of the policy, the session has the permissions allowed
+ // by the policy. These permissions are granted in addition to the permissions
+ // that are granted by the session policies.
+ //
// The plain text that you use for both inline and managed session policies
- // shouldn't exceed 2048 characters. The JSON policy characters can be any ASCII
+ // can't exceed 2,048 characters. The JSON policy characters can be any ASCII
// character from the space character to the end of the valid character list
// (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A),
// and carriage return (\u000D) characters.
//
- // The characters in this parameter count towards the 2048 character session
- // policy guideline. However, an AWS conversion compresses the session policies
- // into a packed binary format that has a separate limit. This is the enforced
- // limit. The PackedPolicySize response element indicates by percentage how
- // close the policy is to the upper size limit.
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
Policy *string `min:"1" type:"string"`
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want
@@ -2452,16 +2699,13 @@ type GetFederationTokenInput struct {
// to this operation. You can pass a single JSON policy document to use as an
// inline session policy. You can also specify up to 10 managed policies to
// use as managed session policies. The plain text that you use for both inline
- // and managed session policies shouldn't exceed 2048 characters. You can provide
+ // and managed session policies can't exceed 2,048 characters. You can provide
// up to 10 managed policy ARNs. For more information about ARNs, see Amazon
// Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// in the AWS General Reference.
//
// This parameter is optional. However, if you do not pass any session policies,
- // then the resulting federated user session has no permissions. The only exception
- // is when the credentials are used to access a resource that has a resource-based
- // policy that specifically references the federated user session in the Principal
- // element of the policy.
+ // then the resulting federated user session has no permissions.
//
// When you pass session policies, the session permissions are the intersection
// of the IAM user policies and the session policies that you pass. This gives
@@ -2471,12 +2715,46 @@ type GetFederationTokenInput struct {
// Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide.
//
- // The characters in this parameter count towards the 2048 character session
- // policy guideline. However, an AWS conversion compresses the session policies
- // into a packed binary format that has a separate limit. This is the enforced
- // limit. The PackedPolicySize response element indicates by percentage how
- // close the policy is to the upper size limit.
+ // The resulting credentials can be used to access a resource that has a resource-based
+ // policy. If that policy specifically references the federated user session
+ // in the Principal element of the policy, the session has the permissions allowed
+ // by the policy. These permissions are granted in addition to the permissions
+ // that are granted by the session policies.
+ //
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
PolicyArns []*PolicyDescriptorType `type:"list"`
+
+ // A list of session tags. Each session tag consists of a key name and an associated
+ // value. For more information about session tags, see Passing Session Tags
+ // in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+ // in the IAM User Guide.
+ //
+ // This parameter is optional. You can pass up to 50 session tags. The plain
+ // text session tag keys can’t exceed 128 characters and the values can’t
+ // exceed 256 characters. For these and additional limits, see IAM and STS Character
+ // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+ // in the IAM User Guide.
+ //
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
+ //
+ // You can pass a session tag with the same key as a tag that is already attached
+ // to the user you are federating. When you do, session tags override a user
+ // tag with the same key.
+ //
+ // Tag key–value pairs are not case sensitive, but case is preserved. This
+ // means that you cannot have separate Department and department tag keys. Assume
+ // that the role has the Department=Marketing tag and you pass the department=engineering
+ // session tag. Department and department are not saved as separate tags, and
+ // the session tag passed in the request takes precedence over the role tag.
+ Tags []*Tag `type:"list"`
}
// String returns the string representation
@@ -2514,6 +2792,16 @@ func (s *GetFederationTokenInput) Validate() error {
}
}
}
+ 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
@@ -2545,6 +2833,12 @@ func (s *GetFederationTokenInput) SetPolicyArns(v []*PolicyDescriptorType) *GetF
return s
}
+// SetTags sets the Tags field's value.
+func (s *GetFederationTokenInput) SetTags(v []*Tag) *GetFederationTokenInput {
+ s.Tags = v
+ return s
+}
+
// Contains the response to a successful GetFederationToken request, including
// temporary AWS credentials that can be used to make AWS requests.
type GetFederationTokenOutput struct {
@@ -2563,9 +2857,10 @@ type GetFederationTokenOutput struct {
// an Amazon S3 bucket policy.
FederatedUser *FederatedUser `type:"structure"`
- // A percentage value indicating the size of the policy in packed form. The
- // service rejects policies for which the packed size is greater than 100 percent
- // of the allowed value.
+ // A percentage value that indicates the packed size of the session policies
+ // and session tags combined passed in the request. The request fails if the
+ // packed size is greater than 100 percent, which means the policies and tags
+ // exceeded the allowed space.
PackedPolicySize *int64 `type:"integer"`
}
@@ -2748,3 +3043,73 @@ func (s *PolicyDescriptorType) SetArn(v string) *PolicyDescriptorType {
s.Arn = &v
return s
}
+
+// You can pass custom key-value pair attributes when you assume a role or federate
+// a user. These are called session tags. You can then use the session tags
+// to control access to resources. For more information, see Tagging AWS STS
+// Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+// in the IAM User Guide.
+type Tag struct {
+ _ struct{} `type:"structure"`
+
+ // The key for a session tag.
+ //
+ // You can pass up to 50 session tags. The plain text session tag keys can’t
+ // exceed 128 characters. For these and additional limits, see IAM and STS Character
+ // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+ // in the IAM User Guide.
+ //
+ // Key is a required field
+ Key *string `min:"1" type:"string" required:"true"`
+
+ // The value for a session tag.
+ //
+ // You can pass up to 50 session tags. The plain text session tag values can’t
+ // exceed 256 characters. For these and additional limits, see IAM and STS Character
+ // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
+ // in the IAM User Guide.
+ //
+ // Value is a required field
+ Value *string `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 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
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
index 41ea09c3..a233f542 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
@@ -14,11 +14,11 @@ const (
// ErrCodeIDPCommunicationErrorException for service response error code
// "IDPCommunicationError".
//
- // The request could not be fulfilled because the non-AWS identity provider
- // (IDP) that was asked to verify the incoming identity token could not be reached.
- // This is often a transient error caused by network conditions. Retry the request
+ // The request could not be fulfilled because the identity provider (IDP) that
+ // was asked to verify the incoming identity token could not be reached. This
+ // is often a transient error caused by network conditions. Retry the request
// a limited number of times so that you don't exceed the request rate. If the
- // error persists, the non-AWS identity provider might be down or not responding.
+ // error persists, the identity provider might be down or not responding.
ErrCodeIDPCommunicationErrorException = "IDPCommunicationError"
// ErrCodeIDPRejectedClaimException for service response error code
@@ -56,9 +56,18 @@ const (
// ErrCodePackedPolicyTooLargeException for service response error code
// "PackedPolicyTooLarge".
//
- // The request was rejected because the policy document was too large. The error
- // message describes how big the policy document is, in packed form, as a percentage
- // of what the API allows.
+ // The request was rejected because the total packed size of the session policies
+ // and session tags combined was too large. An AWS conversion compresses the
+ // session policy document, session policy ARNs, and session tags into a packed
+ // binary format that has a separate limit. The error message indicates by percentage
+ // how close the policies and tags are to the upper size limit. For more information,
+ // see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
+ // in the IAM User Guide.
+ //
+ // You could receive this error even though you meet other defined session policy
+ // and session tag limits. For more information, see IAM and STS Entity Character
+ // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
+ // in the IAM User Guide.
ErrCodePackedPolicyTooLargeException = "PackedPolicyTooLarge"
// ErrCodeRegionDisabledException for service response error code
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
index 185c914d..d34a6855 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
@@ -31,7 +31,7 @@ var initRequest func(*request.Request)
const (
ServiceName = "sts" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "STS" // ServiceID is a unique identifer of a specific service.
+ ServiceID = "STS" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the STS client with a session.
@@ -39,6 +39,8 @@ const (
// aws.Config parameter to add your extra config.
//
// Example:
+// mySession := session.Must(session.NewSession())
+//
// // Create a STS client from just a session.
// svc := sts.New(mySession)
//
@@ -46,11 +48,11 @@ const (
// svc := sts.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *STS {
c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
+ return newClient(*c.Config, c.Handlers, c.PartitionID, 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) *STS {
+func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *STS {
svc := &STS{
Client: client.New(
cfg,
@@ -59,6 +61,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
+ PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2011-06-15",
},
diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE
index c8364161..bc52e96f 100644
--- a/vendor/github.com/davecgh/go-spew/LICENSE
+++ b/vendor/github.com/davecgh/go-spew/LICENSE
@@ -2,7 +2,7 @@ ISC License
Copyright (c) 2012-2016 Dave Collins
-Permission to use, copy, modify, and distribute this software for any
+Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go
index 8a4a6589..79299478 100644
--- a/vendor/github.com/davecgh/go-spew/spew/bypass.go
+++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go
@@ -16,7 +16,9 @@
// when the code is not running on Google App Engine, compiled by GopherJS, and
// "-tags safe" is not added to the go build command line. The "disableunsafe"
// tag is deprecated and thus should not be used.
-// +build !js,!appengine,!safe,!disableunsafe
+// Go versions prior to 1.4 are disabled because they use a different layout
+// for interfaces which make the implementation of unsafeReflectValue more complex.
+// +build !js,!appengine,!safe,!disableunsafe,go1.4
package spew
@@ -34,80 +36,49 @@ const (
ptrSize = unsafe.Sizeof((*byte)(nil))
)
+type flag uintptr
+
var (
- // offsetPtr, offsetScalar, and offsetFlag are the offsets for the
- // internal reflect.Value fields. These values are valid before golang
- // commit ecccf07e7f9d which changed the format. The are also valid
- // after commit 82f48826c6c7 which changed the format again to mirror
- // the original format. Code in the init function updates these offsets
- // as necessary.
- offsetPtr = uintptr(ptrSize)
- offsetScalar = uintptr(0)
- offsetFlag = uintptr(ptrSize * 2)
-
- // flagKindWidth and flagKindShift indicate various bits that the
- // reflect package uses internally to track kind information.
- //
- // flagRO indicates whether or not the value field of a reflect.Value is
- // read-only.
- //
- // flagIndir indicates whether the value field of a reflect.Value is
- // the actual data or a pointer to the data.
- //
- // These values are valid before golang commit 90a7c3c86944 which
- // changed their positions. Code in the init function updates these
- // flags as necessary.
- flagKindWidth = uintptr(5)
- flagKindShift = uintptr(flagKindWidth - 1)
- flagRO = uintptr(1 << 0)
- flagIndir = uintptr(1 << 1)
+ // flagRO indicates whether the value field of a reflect.Value
+ // is read-only.
+ flagRO flag
+
+ // flagAddr indicates whether the address of the reflect.Value's
+ // value may be taken.
+ flagAddr flag
)
-func init() {
- // Older versions of reflect.Value stored small integers directly in the
- // ptr field (which is named val in the older versions). Versions
- // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named
- // scalar for this purpose which unfortunately came before the flag
- // field, so the offset of the flag field is different for those
- // versions.
- //
- // This code constructs a new reflect.Value from a known small integer
- // and checks if the size of the reflect.Value struct indicates it has
- // the scalar field. When it does, the offsets are updated accordingly.
- vv := reflect.ValueOf(0xf00)
- if unsafe.Sizeof(vv) == (ptrSize * 4) {
- offsetScalar = ptrSize * 2
- offsetFlag = ptrSize * 3
- }
+// flagKindMask holds the bits that make up the kind
+// part of the flags field. In all the supported versions,
+// it is in the lower 5 bits.
+const flagKindMask = flag(0x1f)
- // Commit 90a7c3c86944 changed the flag positions such that the low
- // order bits are the kind. This code extracts the kind from the flags
- // field and ensures it's the correct type. When it's not, the flag
- // order has been changed to the newer format, so the flags are updated
- // accordingly.
- upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag)
- upfv := *(*uintptr)(upf)
- flagKindMask := uintptr((1<>flagKindShift != uintptr(reflect.Int) {
- flagKindShift = 0
- flagRO = 1 << 5
- flagIndir = 1 << 6
-
- // Commit adf9b30e5594 modified the flags to separate the
- // flagRO flag into two bits which specifies whether or not the
- // field is embedded. This causes flagIndir to move over a bit
- // and means that flagRO is the combination of either of the
- // original flagRO bit and the new bit.
- //
- // This code detects the change by extracting what used to be
- // the indirect bit to ensure it's set. When it's not, the flag
- // order has been changed to the newer format, so the flags are
- // updated accordingly.
- if upfv&flagIndir == 0 {
- flagRO = 3 << 5
- flagIndir = 1 << 7
- }
+// Different versions of Go have used different
+// bit layouts for the flags type. This table
+// records the known combinations.
+var okFlags = []struct {
+ ro, addr flag
+}{{
+ // From Go 1.4 to 1.5
+ ro: 1 << 5,
+ addr: 1 << 7,
+}, {
+ // Up to Go tip.
+ ro: 1<<5 | 1<<6,
+ addr: 1 << 8,
+}}
+
+var flagValOffset = func() uintptr {
+ field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag")
+ if !ok {
+ panic("reflect.Value has no flag field")
}
+ return field.Offset
+}()
+
+// flagField returns a pointer to the flag field of a reflect.Value.
+func flagField(v *reflect.Value) *flag {
+ return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset))
}
// unsafeReflectValue converts the passed reflect.Value into a one that bypasses
@@ -119,34 +90,56 @@ func init() {
// This allows us to check for implementations of the Stringer and error
// interfaces to be used for pretty printing ordinarily unaddressable and
// inaccessible values such as unexported struct fields.
-func unsafeReflectValue(v reflect.Value) (rv reflect.Value) {
- indirects := 1
- vt := v.Type()
- upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr)
- rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag))
- if rvf&flagIndir != 0 {
- vt = reflect.PtrTo(v.Type())
- indirects++
- } else if offsetScalar != 0 {
- // The value is in the scalar field when it's not one of the
- // reference types.
- switch vt.Kind() {
- case reflect.Uintptr:
- case reflect.Chan:
- case reflect.Func:
- case reflect.Map:
- case reflect.Ptr:
- case reflect.UnsafePointer:
- default:
- upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) +
- offsetScalar)
- }
+func unsafeReflectValue(v reflect.Value) reflect.Value {
+ if !v.IsValid() || (v.CanInterface() && v.CanAddr()) {
+ return v
}
+ flagFieldPtr := flagField(&v)
+ *flagFieldPtr &^= flagRO
+ *flagFieldPtr |= flagAddr
+ return v
+}
- pv := reflect.NewAt(vt, upv)
- rv = pv
- for i := 0; i < indirects; i++ {
- rv = rv.Elem()
+// Sanity checks against future reflect package changes
+// to the type or semantics of the Value.flag field.
+func init() {
+ field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag")
+ if !ok {
+ panic("reflect.Value has no flag field")
+ }
+ if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() {
+ panic("reflect.Value flag field has changed kind")
+ }
+ type t0 int
+ var t struct {
+ A t0
+ // t0 will have flagEmbedRO set.
+ t0
+ // a will have flagStickyRO set
+ a t0
+ }
+ vA := reflect.ValueOf(t).FieldByName("A")
+ va := reflect.ValueOf(t).FieldByName("a")
+ vt0 := reflect.ValueOf(t).FieldByName("t0")
+
+ // Infer flagRO from the difference between the flags
+ // for the (otherwise identical) fields in t.
+ flagPublic := *flagField(&vA)
+ flagWithRO := *flagField(&va) | *flagField(&vt0)
+ flagRO = flagPublic ^ flagWithRO
+
+ // Infer flagAddr from the difference between a value
+ // taken from a pointer and not.
+ vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A")
+ flagNoPtr := *flagField(&vA)
+ flagPtr := *flagField(&vPtrA)
+ flagAddr = flagNoPtr ^ flagPtr
+
+ // Check that the inferred flags tally with one of the known versions.
+ for _, f := range okFlags {
+ if flagRO == f.ro && flagAddr == f.addr {
+ return
+ }
}
- return rv
+ panic("reflect.Value read-only flag has changed semantics")
}
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
index 1fe3cf3d..205c28d6 100644
--- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
+++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
@@ -16,7 +16,7 @@
// when the code is running on Google App Engine, compiled by GopherJS, or
// "-tags safe" is added to the go build command line. The "disableunsafe"
// tag is deprecated and thus should not be used.
-// +build js appengine safe disableunsafe
+// +build js appengine safe disableunsafe !go1.4
package spew
diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go
index 7c519ff4..1be8ce94 100644
--- a/vendor/github.com/davecgh/go-spew/spew/common.go
+++ b/vendor/github.com/davecgh/go-spew/spew/common.go
@@ -180,7 +180,7 @@ func printComplex(w io.Writer, c complex128, floatPrecision int) {
w.Write(closeParenBytes)
}
-// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x'
+// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x'
// prefix to Writer w.
func printHexPtr(w io.Writer, p uintptr) {
// Null pointer.
diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go
index df1d582a..f78d89fc 100644
--- a/vendor/github.com/davecgh/go-spew/spew/dump.go
+++ b/vendor/github.com/davecgh/go-spew/spew/dump.go
@@ -35,16 +35,16 @@ var (
// cCharRE is a regular expression that matches a cgo char.
// It is used to detect character arrays to hexdump them.
- cCharRE = regexp.MustCompile("^.*\\._Ctype_char$")
+ cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`)
// cUnsignedCharRE is a regular expression that matches a cgo unsigned
// char. It is used to detect unsigned character arrays to hexdump
// them.
- cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$")
+ cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`)
// cUint8tCharRE is a regular expression that matches a cgo uint8_t.
// It is used to detect uint8_t arrays to hexdump them.
- cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$")
+ cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`)
)
// dumpState contains information about the state of a dump operation.
@@ -143,10 +143,10 @@ func (d *dumpState) dumpPtr(v reflect.Value) {
// Display dereferenced value.
d.w.Write(openParenBytes)
switch {
- case nilFound == true:
+ case nilFound:
d.w.Write(nilAngleBytes)
- case cycleFound == true:
+ case cycleFound:
d.w.Write(circularBytes)
default:
diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go
index c49875ba..b04edb7d 100644
--- a/vendor/github.com/davecgh/go-spew/spew/format.go
+++ b/vendor/github.com/davecgh/go-spew/spew/format.go
@@ -182,10 +182,10 @@ func (f *formatState) formatPtr(v reflect.Value) {
// Display dereferenced value.
switch {
- case nilFound == true:
+ case nilFound:
f.fs.Write(nilAngleBytes)
- case cycleFound == true:
+ case cycleFound:
f.fs.Write(circularShortBytes)
default:
diff --git a/vendor/github.com/go-errors/errors/error.go b/vendor/github.com/go-errors/errors/error.go
index 60062a43..13aa35ac 100644
--- a/vendor/github.com/go-errors/errors/error.go
+++ b/vendor/github.com/go-errors/errors/error.go
@@ -91,6 +91,10 @@ func New(e interface{}) *Error {
// fmt.Errorf("%v"). The skip parameter indicates how far up the stack
// to start the stacktrace. 0 is from the current call, 1 from its caller, etc.
func Wrap(e interface{}, skip int) *Error {
+ if e == nil {
+ return nil
+ }
+
var err error
switch e := e.(type) {
@@ -117,6 +121,9 @@ func Wrap(e interface{}, skip int) *Error {
// up the stack to start the stacktrace. 0 is from the current call,
// 1 from its caller, etc.
func WrapPrefix(e interface{}, prefix string, skip int) *Error {
+ if e == nil {
+ return nil
+ }
err := Wrap(e, 1+skip)
@@ -132,25 +139,6 @@ func WrapPrefix(e interface{}, prefix string, skip int) *Error {
}
-// Is detects whether the error is equal to a given error. Errors
-// are considered equal by this function if they are the same object,
-// or if they both contain the same error inside an errors.Error.
-func Is(e error, original error) bool {
-
- if e == original {
- return true
- }
-
- if e, ok := e.(*Error); ok {
- return Is(e.Err, original)
- }
-
- if original, ok := original.(*Error); ok {
- return Is(e, original.Err)
- }
-
- return false
-}
// Errorf creates a new error with the given message. You can use it
// as a drop-in replacement for fmt.Errorf() to provide descriptive
diff --git a/vendor/github.com/go-errors/errors/stackframe.go b/vendor/github.com/go-errors/errors/stackframe.go
index 750ab9a5..f420849d 100644
--- a/vendor/github.com/go-errors/errors/stackframe.go
+++ b/vendor/github.com/go-errors/errors/stackframe.go
@@ -1,9 +1,10 @@
package errors
import (
+ "bufio"
"bytes"
"fmt"
- "io/ioutil"
+ "os"
"runtime"
"strings"
)
@@ -62,18 +63,29 @@ func (frame *StackFrame) String() string {
// SourceLine gets the line of code (from File and Line) of the original source if possible.
func (frame *StackFrame) SourceLine() (string, error) {
- data, err := ioutil.ReadFile(frame.File)
+ if frame.LineNumber <= 0 {
+ return "???", nil
+ }
+ file, err := os.Open(frame.File)
if err != nil {
return "", New(err)
}
-
- lines := bytes.Split(data, []byte{'\n'})
- if frame.LineNumber <= 0 || frame.LineNumber >= len(lines) {
- return "???", nil
+ defer file.Close()
+
+ scanner := bufio.NewScanner(file)
+ currentLine := 1
+ for scanner.Scan() {
+ if currentLine == frame.LineNumber {
+ return string(bytes.Trim(scanner.Bytes(), " \t")), nil
+ }
+ currentLine++
}
- // -1 because line-numbers are 1 based, but our array is 0 based
- return string(bytes.Trim(lines[frame.LineNumber-1], " \t")), nil
+ if err := scanner.Err(); err != nil {
+ return "", New(err)
+ }
+
+ return "???", nil
}
func packageAndName(fn *runtime.Func) (string, string) {
diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE
index 1b1b1921..0f646931 100644
--- a/vendor/github.com/golang/protobuf/LICENSE
+++ b/vendor/github.com/golang/protobuf/LICENSE
@@ -1,7 +1,4 @@
-Go support for Protocol Buffers - Google's data interchange format
-
Copyright 2010 The Go Authors. All rights reserved.
-https://github.com/golang/protobuf
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
diff --git a/vendor/github.com/golang/protobuf/proto/clone.go b/vendor/github.com/golang/protobuf/proto/clone.go
deleted file mode 100644
index 3cd3249f..00000000
--- a/vendor/github.com/golang/protobuf/proto/clone.go
+++ /dev/null
@@ -1,253 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2011 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Protocol buffer deep copy and merge.
-// TODO: RawMessage.
-
-package proto
-
-import (
- "fmt"
- "log"
- "reflect"
- "strings"
-)
-
-// Clone returns a deep copy of a protocol buffer.
-func Clone(src Message) Message {
- in := reflect.ValueOf(src)
- if in.IsNil() {
- return src
- }
- out := reflect.New(in.Type().Elem())
- dst := out.Interface().(Message)
- Merge(dst, src)
- return dst
-}
-
-// Merger is the interface representing objects that can merge messages of the same type.
-type Merger interface {
- // Merge merges src into this message.
- // Required and optional fields that are set in src will be set to that value in dst.
- // Elements of repeated fields will be appended.
- //
- // Merge may panic if called with a different argument type than the receiver.
- Merge(src Message)
-}
-
-// generatedMerger is the custom merge method that generated protos will have.
-// We must add this method since a generate Merge method will conflict with
-// many existing protos that have a Merge data field already defined.
-type generatedMerger interface {
- XXX_Merge(src Message)
-}
-
-// Merge merges src into dst.
-// Required and optional fields that are set in src will be set to that value in dst.
-// Elements of repeated fields will be appended.
-// Merge panics if src and dst are not the same type, or if dst is nil.
-func Merge(dst, src Message) {
- if m, ok := dst.(Merger); ok {
- m.Merge(src)
- return
- }
-
- in := reflect.ValueOf(src)
- out := reflect.ValueOf(dst)
- if out.IsNil() {
- panic("proto: nil destination")
- }
- if in.Type() != out.Type() {
- panic(fmt.Sprintf("proto.Merge(%T, %T) type mismatch", dst, src))
- }
- if in.IsNil() {
- return // Merge from nil src is a noop
- }
- if m, ok := dst.(generatedMerger); ok {
- m.XXX_Merge(src)
- return
- }
- mergeStruct(out.Elem(), in.Elem())
-}
-
-func mergeStruct(out, in reflect.Value) {
- sprop := GetProperties(in.Type())
- for i := 0; i < in.NumField(); i++ {
- f := in.Type().Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i])
- }
-
- if emIn, err := extendable(in.Addr().Interface()); err == nil {
- emOut, _ := extendable(out.Addr().Interface())
- mIn, muIn := emIn.extensionsRead()
- if mIn != nil {
- mOut := emOut.extensionsWrite()
- muIn.Lock()
- mergeExtension(mOut, mIn)
- muIn.Unlock()
- }
- }
-
- uf := in.FieldByName("XXX_unrecognized")
- if !uf.IsValid() {
- return
- }
- uin := uf.Bytes()
- if len(uin) > 0 {
- out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...))
- }
-}
-
-// mergeAny performs a merge between two values of the same type.
-// viaPtr indicates whether the values were indirected through a pointer (implying proto2).
-// prop is set if this is a struct field (it may be nil).
-func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) {
- if in.Type() == protoMessageType {
- if !in.IsNil() {
- if out.IsNil() {
- out.Set(reflect.ValueOf(Clone(in.Interface().(Message))))
- } else {
- Merge(out.Interface().(Message), in.Interface().(Message))
- }
- }
- return
- }
- switch in.Kind() {
- case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
- reflect.String, reflect.Uint32, reflect.Uint64:
- if !viaPtr && isProto3Zero(in) {
- return
- }
- out.Set(in)
- case reflect.Interface:
- // Probably a oneof field; copy non-nil values.
- if in.IsNil() {
- return
- }
- // Allocate destination if it is not set, or set to a different type.
- // Otherwise we will merge as normal.
- if out.IsNil() || out.Elem().Type() != in.Elem().Type() {
- out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T)
- }
- mergeAny(out.Elem(), in.Elem(), false, nil)
- case reflect.Map:
- if in.Len() == 0 {
- return
- }
- if out.IsNil() {
- out.Set(reflect.MakeMap(in.Type()))
- }
- // For maps with value types of *T or []byte we need to deep copy each value.
- elemKind := in.Type().Elem().Kind()
- for _, key := range in.MapKeys() {
- var val reflect.Value
- switch elemKind {
- case reflect.Ptr:
- val = reflect.New(in.Type().Elem().Elem())
- mergeAny(val, in.MapIndex(key), false, nil)
- case reflect.Slice:
- val = in.MapIndex(key)
- val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
- default:
- val = in.MapIndex(key)
- }
- out.SetMapIndex(key, val)
- }
- case reflect.Ptr:
- if in.IsNil() {
- return
- }
- if out.IsNil() {
- out.Set(reflect.New(in.Elem().Type()))
- }
- mergeAny(out.Elem(), in.Elem(), true, nil)
- case reflect.Slice:
- if in.IsNil() {
- return
- }
- if in.Type().Elem().Kind() == reflect.Uint8 {
- // []byte is a scalar bytes field, not a repeated field.
-
- // Edge case: if this is in a proto3 message, a zero length
- // bytes field is considered the zero value, and should not
- // be merged.
- if prop != nil && prop.proto3 && in.Len() == 0 {
- return
- }
-
- // Make a deep copy.
- // Append to []byte{} instead of []byte(nil) so that we never end up
- // with a nil result.
- out.SetBytes(append([]byte{}, in.Bytes()...))
- return
- }
- n := in.Len()
- if out.IsNil() {
- out.Set(reflect.MakeSlice(in.Type(), 0, n))
- }
- switch in.Type().Elem().Kind() {
- case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
- reflect.String, reflect.Uint32, reflect.Uint64:
- out.Set(reflect.AppendSlice(out, in))
- default:
- for i := 0; i < n; i++ {
- x := reflect.Indirect(reflect.New(in.Type().Elem()))
- mergeAny(x, in.Index(i), false, nil)
- out.Set(reflect.Append(out, x))
- }
- }
- case reflect.Struct:
- mergeStruct(out, in)
- default:
- // unknown type, so not a protocol buffer
- log.Printf("proto: don't know how to copy %v", in)
- }
-}
-
-func mergeExtension(out, in map[int32]Extension) {
- for extNum, eIn := range in {
- eOut := Extension{desc: eIn.desc}
- if eIn.value != nil {
- v := reflect.New(reflect.TypeOf(eIn.value)).Elem()
- mergeAny(v, reflect.ValueOf(eIn.value), false, nil)
- eOut.value = v.Interface()
- }
- if eIn.enc != nil {
- eOut.enc = make([]byte, len(eIn.enc))
- copy(eOut.enc, eIn.enc)
- }
-
- out[extNum] = eOut
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/decode.go b/vendor/github.com/golang/protobuf/proto/decode.go
deleted file mode 100644
index d9aa3c42..00000000
--- a/vendor/github.com/golang/protobuf/proto/decode.go
+++ /dev/null
@@ -1,428 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Routines for decoding protocol buffer data to construct in-memory representations.
- */
-
-import (
- "errors"
- "fmt"
- "io"
-)
-
-// errOverflow is returned when an integer is too large to be represented.
-var errOverflow = errors.New("proto: integer overflow")
-
-// ErrInternalBadWireType is returned by generated code when an incorrect
-// wire type is encountered. It does not get returned to user code.
-var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof")
-
-// DecodeVarint reads a varint-encoded integer from the slice.
-// It returns the integer and the number of bytes consumed, or
-// zero if there is not enough.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-func DecodeVarint(buf []byte) (x uint64, n int) {
- for shift := uint(0); shift < 64; shift += 7 {
- if n >= len(buf) {
- return 0, 0
- }
- b := uint64(buf[n])
- n++
- x |= (b & 0x7F) << shift
- if (b & 0x80) == 0 {
- return x, n
- }
- }
-
- // The number is too large to represent in a 64-bit value.
- return 0, 0
-}
-
-func (p *Buffer) decodeVarintSlow() (x uint64, err error) {
- i := p.index
- l := len(p.buf)
-
- for shift := uint(0); shift < 64; shift += 7 {
- if i >= l {
- err = io.ErrUnexpectedEOF
- return
- }
- b := p.buf[i]
- i++
- x |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- p.index = i
- return
- }
- }
-
- // The number is too large to represent in a 64-bit value.
- err = errOverflow
- return
-}
-
-// DecodeVarint reads a varint-encoded integer from the Buffer.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-func (p *Buffer) DecodeVarint() (x uint64, err error) {
- i := p.index
- buf := p.buf
-
- if i >= len(buf) {
- return 0, io.ErrUnexpectedEOF
- } else if buf[i] < 0x80 {
- p.index++
- return uint64(buf[i]), nil
- } else if len(buf)-i < 10 {
- return p.decodeVarintSlow()
- }
-
- var b uint64
- // we already checked the first byte
- x = uint64(buf[i]) - 0x80
- i++
-
- b = uint64(buf[i])
- i++
- x += b << 7
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 7
-
- b = uint64(buf[i])
- i++
- x += b << 14
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 14
-
- b = uint64(buf[i])
- i++
- x += b << 21
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 21
-
- b = uint64(buf[i])
- i++
- x += b << 28
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 28
-
- b = uint64(buf[i])
- i++
- x += b << 35
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 35
-
- b = uint64(buf[i])
- i++
- x += b << 42
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 42
-
- b = uint64(buf[i])
- i++
- x += b << 49
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 49
-
- b = uint64(buf[i])
- i++
- x += b << 56
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 56
-
- b = uint64(buf[i])
- i++
- x += b << 63
- if b&0x80 == 0 {
- goto done
- }
- // x -= 0x80 << 63 // Always zero.
-
- return 0, errOverflow
-
-done:
- p.index = i
- return x, nil
-}
-
-// DecodeFixed64 reads a 64-bit integer from the Buffer.
-// This is the format for the
-// fixed64, sfixed64, and double protocol buffer types.
-func (p *Buffer) DecodeFixed64() (x uint64, err error) {
- // x, err already 0
- i := p.index + 8
- if i < 0 || i > len(p.buf) {
- err = io.ErrUnexpectedEOF
- return
- }
- p.index = i
-
- x = uint64(p.buf[i-8])
- x |= uint64(p.buf[i-7]) << 8
- x |= uint64(p.buf[i-6]) << 16
- x |= uint64(p.buf[i-5]) << 24
- x |= uint64(p.buf[i-4]) << 32
- x |= uint64(p.buf[i-3]) << 40
- x |= uint64(p.buf[i-2]) << 48
- x |= uint64(p.buf[i-1]) << 56
- return
-}
-
-// DecodeFixed32 reads a 32-bit integer from the Buffer.
-// This is the format for the
-// fixed32, sfixed32, and float protocol buffer types.
-func (p *Buffer) DecodeFixed32() (x uint64, err error) {
- // x, err already 0
- i := p.index + 4
- if i < 0 || i > len(p.buf) {
- err = io.ErrUnexpectedEOF
- return
- }
- p.index = i
-
- x = uint64(p.buf[i-4])
- x |= uint64(p.buf[i-3]) << 8
- x |= uint64(p.buf[i-2]) << 16
- x |= uint64(p.buf[i-1]) << 24
- return
-}
-
-// DecodeZigzag64 reads a zigzag-encoded 64-bit integer
-// from the Buffer.
-// This is the format used for the sint64 protocol buffer type.
-func (p *Buffer) DecodeZigzag64() (x uint64, err error) {
- x, err = p.DecodeVarint()
- if err != nil {
- return
- }
- x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63)
- return
-}
-
-// DecodeZigzag32 reads a zigzag-encoded 32-bit integer
-// from the Buffer.
-// This is the format used for the sint32 protocol buffer type.
-func (p *Buffer) DecodeZigzag32() (x uint64, err error) {
- x, err = p.DecodeVarint()
- if err != nil {
- return
- }
- x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31))
- return
-}
-
-// DecodeRawBytes reads a count-delimited byte buffer from the Buffer.
-// This is the format used for the bytes protocol buffer
-// type and for embedded messages.
-func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) {
- n, err := p.DecodeVarint()
- if err != nil {
- return nil, err
- }
-
- nb := int(n)
- if nb < 0 {
- return nil, fmt.Errorf("proto: bad byte length %d", nb)
- }
- end := p.index + nb
- if end < p.index || end > len(p.buf) {
- return nil, io.ErrUnexpectedEOF
- }
-
- if !alloc {
- // todo: check if can get more uses of alloc=false
- buf = p.buf[p.index:end]
- p.index += nb
- return
- }
-
- buf = make([]byte, nb)
- copy(buf, p.buf[p.index:])
- p.index += nb
- return
-}
-
-// DecodeStringBytes reads an encoded string from the Buffer.
-// This is the format used for the proto2 string type.
-func (p *Buffer) DecodeStringBytes() (s string, err error) {
- buf, err := p.DecodeRawBytes(false)
- if err != nil {
- return
- }
- return string(buf), nil
-}
-
-// Unmarshaler is the interface representing objects that can
-// unmarshal themselves. The argument points to data that may be
-// overwritten, so implementations should not keep references to the
-// buffer.
-// Unmarshal implementations should not clear the receiver.
-// Any unmarshaled data should be merged into the receiver.
-// Callers of Unmarshal that do not want to retain existing data
-// should Reset the receiver before calling Unmarshal.
-type Unmarshaler interface {
- Unmarshal([]byte) error
-}
-
-// newUnmarshaler is the interface representing objects that can
-// unmarshal themselves. The semantics are identical to Unmarshaler.
-//
-// This exists to support protoc-gen-go generated messages.
-// The proto package will stop type-asserting to this interface in the future.
-//
-// DO NOT DEPEND ON THIS.
-type newUnmarshaler interface {
- XXX_Unmarshal([]byte) error
-}
-
-// Unmarshal parses the protocol buffer representation in buf and places the
-// decoded result in pb. If the struct underlying pb does not match
-// the data in buf, the results can be unpredictable.
-//
-// Unmarshal resets pb before starting to unmarshal, so any
-// existing data in pb is always removed. Use UnmarshalMerge
-// to preserve and append to existing data.
-func Unmarshal(buf []byte, pb Message) error {
- pb.Reset()
- if u, ok := pb.(newUnmarshaler); ok {
- return u.XXX_Unmarshal(buf)
- }
- if u, ok := pb.(Unmarshaler); ok {
- return u.Unmarshal(buf)
- }
- return NewBuffer(buf).Unmarshal(pb)
-}
-
-// UnmarshalMerge parses the protocol buffer representation in buf and
-// writes the decoded result to pb. If the struct underlying pb does not match
-// the data in buf, the results can be unpredictable.
-//
-// UnmarshalMerge merges into existing data in pb.
-// Most code should use Unmarshal instead.
-func UnmarshalMerge(buf []byte, pb Message) error {
- if u, ok := pb.(newUnmarshaler); ok {
- return u.XXX_Unmarshal(buf)
- }
- if u, ok := pb.(Unmarshaler); ok {
- // NOTE: The history of proto have unfortunately been inconsistent
- // whether Unmarshaler should or should not implicitly clear itself.
- // Some implementations do, most do not.
- // Thus, calling this here may or may not do what people want.
- //
- // See https://github.com/golang/protobuf/issues/424
- return u.Unmarshal(buf)
- }
- return NewBuffer(buf).Unmarshal(pb)
-}
-
-// DecodeMessage reads a count-delimited message from the Buffer.
-func (p *Buffer) DecodeMessage(pb Message) error {
- enc, err := p.DecodeRawBytes(false)
- if err != nil {
- return err
- }
- return NewBuffer(enc).Unmarshal(pb)
-}
-
-// DecodeGroup reads a tag-delimited group from the Buffer.
-// StartGroup tag is already consumed. This function consumes
-// EndGroup tag.
-func (p *Buffer) DecodeGroup(pb Message) error {
- b := p.buf[p.index:]
- x, y := findEndGroup(b)
- if x < 0 {
- return io.ErrUnexpectedEOF
- }
- err := Unmarshal(b[:x], pb)
- p.index += y
- return err
-}
-
-// Unmarshal parses the protocol buffer representation in the
-// Buffer and places the decoded result in pb. If the struct
-// underlying pb does not match the data in the buffer, the results can be
-// unpredictable.
-//
-// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal.
-func (p *Buffer) Unmarshal(pb Message) error {
- // If the object can unmarshal itself, let it.
- if u, ok := pb.(newUnmarshaler); ok {
- err := u.XXX_Unmarshal(p.buf[p.index:])
- p.index = len(p.buf)
- return err
- }
- if u, ok := pb.(Unmarshaler); ok {
- // NOTE: The history of proto have unfortunately been inconsistent
- // whether Unmarshaler should or should not implicitly clear itself.
- // Some implementations do, most do not.
- // Thus, calling this here may or may not do what people want.
- //
- // See https://github.com/golang/protobuf/issues/424
- err := u.Unmarshal(p.buf[p.index:])
- p.index = len(p.buf)
- return err
- }
-
- // Slow workaround for messages that aren't Unmarshalers.
- // This includes some hand-coded .pb.go files and
- // bootstrap protos.
- // TODO: fix all of those and then add Unmarshal to
- // the Message interface. Then:
- // The cast above and code below can be deleted.
- // The old unmarshaler can be deleted.
- // Clients can call Unmarshal directly (can already do that, actually).
- var info InternalMessageInfo
- err := info.Unmarshal(pb, p.buf[p.index:])
- p.index = len(p.buf)
- return err
-}
diff --git a/vendor/github.com/golang/protobuf/proto/discard.go b/vendor/github.com/golang/protobuf/proto/discard.go
index dea2617c..2187e877 100644
--- a/vendor/github.com/golang/protobuf/proto/discard.go
+++ b/vendor/github.com/golang/protobuf/proto/discard.go
@@ -1,48 +1,13 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2017 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
package proto
import (
- "fmt"
- "reflect"
- "strings"
- "sync"
- "sync/atomic"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
-type generatedDiscarder interface {
- XXX_DiscardUnknown()
-}
-
// DiscardUnknown recursively discards all unknown fields from this message
// and all embedded messages.
//
@@ -51,300 +16,43 @@ type generatedDiscarder interface {
// marshal to be able to produce a message that continues to have those
// unrecognized fields. To avoid this, DiscardUnknown is used to
// explicitly clear the unknown fields after unmarshaling.
-//
-// For proto2 messages, the unknown fields of message extensions are only
-// discarded from messages that have been accessed via GetExtension.
func DiscardUnknown(m Message) {
- if m, ok := m.(generatedDiscarder); ok {
- m.XXX_DiscardUnknown()
- return
- }
- // TODO: Dynamically populate a InternalMessageInfo for legacy messages,
- // but the master branch has no implementation for InternalMessageInfo,
- // so it would be more work to replicate that approach.
- discardLegacy(m)
-}
-
-// DiscardUnknown recursively discards all unknown fields.
-func (a *InternalMessageInfo) DiscardUnknown(m Message) {
- di := atomicLoadDiscardInfo(&a.discard)
- if di == nil {
- di = getDiscardInfo(reflect.TypeOf(m).Elem())
- atomicStoreDiscardInfo(&a.discard, di)
- }
- di.discard(toPointer(&m))
-}
-
-type discardInfo struct {
- typ reflect.Type
-
- initialized int32 // 0: only typ is valid, 1: everything is valid
- lock sync.Mutex
-
- fields []discardFieldInfo
- unrecognized field
-}
-
-type discardFieldInfo struct {
- field field // Offset of field, guaranteed to be valid
- discard func(src pointer)
-}
-
-var (
- discardInfoMap = map[reflect.Type]*discardInfo{}
- discardInfoLock sync.Mutex
-)
-
-func getDiscardInfo(t reflect.Type) *discardInfo {
- discardInfoLock.Lock()
- defer discardInfoLock.Unlock()
- di := discardInfoMap[t]
- if di == nil {
- di = &discardInfo{typ: t}
- discardInfoMap[t] = di
+ if m != nil {
+ discardUnknown(MessageReflect(m))
}
- return di
}
-func (di *discardInfo) discard(src pointer) {
- if src.isNil() {
- return // Nothing to do.
- }
-
- if atomic.LoadInt32(&di.initialized) == 0 {
- di.computeDiscardInfo()
- }
-
- for _, fi := range di.fields {
- sfp := src.offset(fi.field)
- fi.discard(sfp)
- }
-
- // For proto2 messages, only discard unknown fields in message extensions
- // that have been accessed via GetExtension.
- if em, err := extendable(src.asPointerTo(di.typ).Interface()); err == nil {
- // Ignore lock since DiscardUnknown is not concurrency safe.
- emm, _ := em.extensionsRead()
- for _, mx := range emm {
- if m, ok := mx.value.(Message); ok {
- DiscardUnknown(m)
+func discardUnknown(m protoreflect.Message) {
+ m.Range(func(fd protoreflect.FieldDescriptor, val protoreflect.Value) bool {
+ switch {
+ // Handle singular message.
+ case fd.Cardinality() != protoreflect.Repeated:
+ if fd.Message() != nil {
+ discardUnknown(m.Get(fd).Message())
}
- }
- }
-
- if di.unrecognized.IsValid() {
- *src.offset(di.unrecognized).toBytes() = nil
- }
-}
-
-func (di *discardInfo) computeDiscardInfo() {
- di.lock.Lock()
- defer di.lock.Unlock()
- if di.initialized != 0 {
- return
- }
- t := di.typ
- n := t.NumField()
-
- for i := 0; i < n; i++ {
- f := t.Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
-
- dfi := discardFieldInfo{field: toField(&f)}
- tf := f.Type
-
- // Unwrap tf to get its most basic type.
- var isPointer, isSlice bool
- if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
- isSlice = true
- tf = tf.Elem()
- }
- if tf.Kind() == reflect.Ptr {
- isPointer = true
- tf = tf.Elem()
- }
- if isPointer && isSlice && tf.Kind() != reflect.Struct {
- panic(fmt.Sprintf("%v.%s cannot be a slice of pointers to primitive types", t, f.Name))
- }
-
- switch tf.Kind() {
- case reflect.Struct:
- switch {
- case !isPointer:
- panic(fmt.Sprintf("%v.%s cannot be a direct struct value", t, f.Name))
- case isSlice: // E.g., []*pb.T
- di := getDiscardInfo(tf)
- dfi.discard = func(src pointer) {
- sps := src.getPointerSlice()
- for _, sp := range sps {
- if !sp.isNil() {
- di.discard(sp)
- }
- }
- }
- default: // E.g., *pb.T
- di := getDiscardInfo(tf)
- dfi.discard = func(src pointer) {
- sp := src.getPointer()
- if !sp.isNil() {
- di.discard(sp)
- }
+ // Handle list of messages.
+ case fd.IsList():
+ if fd.Message() != nil {
+ ls := m.Get(fd).List()
+ for i := 0; i < ls.Len(); i++ {
+ discardUnknown(ls.Get(i).Message())
}
}
- case reflect.Map:
- switch {
- case isPointer || isSlice:
- panic(fmt.Sprintf("%v.%s cannot be a pointer to a map or a slice of map values", t, f.Name))
- default: // E.g., map[K]V
- if tf.Elem().Kind() == reflect.Ptr { // Proto struct (e.g., *T)
- dfi.discard = func(src pointer) {
- sm := src.asPointerTo(tf).Elem()
- if sm.Len() == 0 {
- return
- }
- for _, key := range sm.MapKeys() {
- val := sm.MapIndex(key)
- DiscardUnknown(val.Interface().(Message))
- }
- }
- } else {
- dfi.discard = func(pointer) {} // Noop
- }
- }
- case reflect.Interface:
- // Must be oneof field.
- switch {
- case isPointer || isSlice:
- panic(fmt.Sprintf("%v.%s cannot be a pointer to a interface or a slice of interface values", t, f.Name))
- default: // E.g., interface{}
- // TODO: Make this faster?
- dfi.discard = func(src pointer) {
- su := src.asPointerTo(tf).Elem()
- if !su.IsNil() {
- sv := su.Elem().Elem().Field(0)
- if sv.Kind() == reflect.Ptr && sv.IsNil() {
- return
- }
- switch sv.Type().Kind() {
- case reflect.Ptr: // Proto struct (e.g., *T)
- DiscardUnknown(sv.Interface().(Message))
- }
- }
- }
+ // Handle map of messages.
+ case fd.IsMap():
+ if fd.MapValue().Message() != nil {
+ ms := m.Get(fd).Map()
+ ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool {
+ discardUnknown(v.Message())
+ return true
+ })
}
- default:
- continue
- }
- di.fields = append(di.fields, dfi)
- }
-
- di.unrecognized = invalidField
- if f, ok := t.FieldByName("XXX_unrecognized"); ok {
- if f.Type != reflect.TypeOf([]byte{}) {
- panic("expected XXX_unrecognized to be of type []byte")
- }
- di.unrecognized = toField(&f)
- }
-
- atomic.StoreInt32(&di.initialized, 1)
-}
-
-func discardLegacy(m Message) {
- v := reflect.ValueOf(m)
- if v.Kind() != reflect.Ptr || v.IsNil() {
- return
- }
- v = v.Elem()
- if v.Kind() != reflect.Struct {
- return
- }
- t := v.Type()
-
- for i := 0; i < v.NumField(); i++ {
- f := t.Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
}
- vf := v.Field(i)
- tf := f.Type
+ return true
+ })
- // Unwrap tf to get its most basic type.
- var isPointer, isSlice bool
- if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
- isSlice = true
- tf = tf.Elem()
- }
- if tf.Kind() == reflect.Ptr {
- isPointer = true
- tf = tf.Elem()
- }
- if isPointer && isSlice && tf.Kind() != reflect.Struct {
- panic(fmt.Sprintf("%T.%s cannot be a slice of pointers to primitive types", m, f.Name))
- }
-
- switch tf.Kind() {
- case reflect.Struct:
- switch {
- case !isPointer:
- panic(fmt.Sprintf("%T.%s cannot be a direct struct value", m, f.Name))
- case isSlice: // E.g., []*pb.T
- for j := 0; j < vf.Len(); j++ {
- discardLegacy(vf.Index(j).Interface().(Message))
- }
- default: // E.g., *pb.T
- discardLegacy(vf.Interface().(Message))
- }
- case reflect.Map:
- switch {
- case isPointer || isSlice:
- panic(fmt.Sprintf("%T.%s cannot be a pointer to a map or a slice of map values", m, f.Name))
- default: // E.g., map[K]V
- tv := vf.Type().Elem()
- if tv.Kind() == reflect.Ptr && tv.Implements(protoMessageType) { // Proto struct (e.g., *T)
- for _, key := range vf.MapKeys() {
- val := vf.MapIndex(key)
- discardLegacy(val.Interface().(Message))
- }
- }
- }
- case reflect.Interface:
- // Must be oneof field.
- switch {
- case isPointer || isSlice:
- panic(fmt.Sprintf("%T.%s cannot be a pointer to a interface or a slice of interface values", m, f.Name))
- default: // E.g., test_proto.isCommunique_Union interface
- if !vf.IsNil() && f.Tag.Get("protobuf_oneof") != "" {
- vf = vf.Elem() // E.g., *test_proto.Communique_Msg
- if !vf.IsNil() {
- vf = vf.Elem() // E.g., test_proto.Communique_Msg
- vf = vf.Field(0) // E.g., Proto struct (e.g., *T) or primitive value
- if vf.Kind() == reflect.Ptr {
- discardLegacy(vf.Interface().(Message))
- }
- }
- }
- }
- }
- }
-
- if vf := v.FieldByName("XXX_unrecognized"); vf.IsValid() {
- if vf.Type() != reflect.TypeOf([]byte{}) {
- panic("expected XXX_unrecognized to be of type []byte")
- }
- vf.Set(reflect.ValueOf([]byte(nil)))
- }
-
- // For proto2 messages, only discard unknown fields in message extensions
- // that have been accessed via GetExtension.
- if em, err := extendable(m); err == nil {
- // Ignore lock since discardLegacy is not concurrency safe.
- emm, _ := em.extensionsRead()
- for _, mx := range emm {
- if m, ok := mx.value.(Message); ok {
- discardLegacy(m)
- }
- }
+ // Discard unknown fields.
+ if len(m.GetUnknown()) > 0 {
+ m.SetUnknown(nil)
}
}
diff --git a/vendor/github.com/golang/protobuf/proto/encode.go b/vendor/github.com/golang/protobuf/proto/encode.go
deleted file mode 100644
index c27d35f8..00000000
--- a/vendor/github.com/golang/protobuf/proto/encode.go
+++ /dev/null
@@ -1,221 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Routines for encoding data into the wire format for protocol buffers.
- */
-
-import (
- "errors"
- "fmt"
- "reflect"
-)
-
-// RequiredNotSetError is the error returned if Marshal is called with
-// a protocol buffer struct whose required fields have not
-// all been initialized. It is also the error returned if Unmarshal is
-// called with an encoded protocol buffer that does not include all the
-// required fields.
-//
-// When printed, RequiredNotSetError reports the first unset required field in a
-// message. If the field cannot be precisely determined, it is reported as
-// "{Unknown}".
-type RequiredNotSetError struct {
- field string
-}
-
-func (e *RequiredNotSetError) Error() string {
- return fmt.Sprintf("proto: required field %q not set", e.field)
-}
-
-var (
- // errRepeatedHasNil is the error returned if Marshal is called with
- // a struct with a repeated field containing a nil element.
- errRepeatedHasNil = errors.New("proto: repeated field has nil element")
-
- // errOneofHasNil is the error returned if Marshal is called with
- // a struct with a oneof field containing a nil element.
- errOneofHasNil = errors.New("proto: oneof field has nil value")
-
- // ErrNil is the error returned if Marshal is called with nil.
- ErrNil = errors.New("proto: Marshal called with nil")
-
- // ErrTooLarge is the error returned if Marshal is called with a
- // message that encodes to >2GB.
- ErrTooLarge = errors.New("proto: message encodes to over 2 GB")
-)
-
-// The fundamental encoders that put bytes on the wire.
-// Those that take integer types all accept uint64 and are
-// therefore of type valueEncoder.
-
-const maxVarintBytes = 10 // maximum length of a varint
-
-// EncodeVarint returns the varint encoding of x.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-// Not used by the package itself, but helpful to clients
-// wishing to use the same encoding.
-func EncodeVarint(x uint64) []byte {
- var buf [maxVarintBytes]byte
- var n int
- for n = 0; x > 127; n++ {
- buf[n] = 0x80 | uint8(x&0x7F)
- x >>= 7
- }
- buf[n] = uint8(x)
- n++
- return buf[0:n]
-}
-
-// EncodeVarint writes a varint-encoded integer to the Buffer.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-func (p *Buffer) EncodeVarint(x uint64) error {
- for x >= 1<<7 {
- p.buf = append(p.buf, uint8(x&0x7f|0x80))
- x >>= 7
- }
- p.buf = append(p.buf, uint8(x))
- return nil
-}
-
-// SizeVarint returns the varint encoding size of an integer.
-func SizeVarint(x uint64) int {
- switch {
- case x < 1<<7:
- return 1
- case x < 1<<14:
- return 2
- case x < 1<<21:
- return 3
- case x < 1<<28:
- return 4
- case x < 1<<35:
- return 5
- case x < 1<<42:
- return 6
- case x < 1<<49:
- return 7
- case x < 1<<56:
- return 8
- case x < 1<<63:
- return 9
- }
- return 10
-}
-
-// EncodeFixed64 writes a 64-bit integer to the Buffer.
-// This is the format for the
-// fixed64, sfixed64, and double protocol buffer types.
-func (p *Buffer) EncodeFixed64(x uint64) error {
- p.buf = append(p.buf,
- uint8(x),
- uint8(x>>8),
- uint8(x>>16),
- uint8(x>>24),
- uint8(x>>32),
- uint8(x>>40),
- uint8(x>>48),
- uint8(x>>56))
- return nil
-}
-
-// EncodeFixed32 writes a 32-bit integer to the Buffer.
-// This is the format for the
-// fixed32, sfixed32, and float protocol buffer types.
-func (p *Buffer) EncodeFixed32(x uint64) error {
- p.buf = append(p.buf,
- uint8(x),
- uint8(x>>8),
- uint8(x>>16),
- uint8(x>>24))
- return nil
-}
-
-// EncodeZigzag64 writes a zigzag-encoded 64-bit integer
-// to the Buffer.
-// This is the format used for the sint64 protocol buffer type.
-func (p *Buffer) EncodeZigzag64(x uint64) error {
- // use signed number to get arithmetic right shift.
- return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-
-// EncodeZigzag32 writes a zigzag-encoded 32-bit integer
-// to the Buffer.
-// This is the format used for the sint32 protocol buffer type.
-func (p *Buffer) EncodeZigzag32(x uint64) error {
- // use signed number to get arithmetic right shift.
- return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31))))
-}
-
-// EncodeRawBytes writes a count-delimited byte buffer to the Buffer.
-// This is the format used for the bytes protocol buffer
-// type and for embedded messages.
-func (p *Buffer) EncodeRawBytes(b []byte) error {
- p.EncodeVarint(uint64(len(b)))
- p.buf = append(p.buf, b...)
- return nil
-}
-
-// EncodeStringBytes writes an encoded string to the Buffer.
-// This is the format used for the proto2 string type.
-func (p *Buffer) EncodeStringBytes(s string) error {
- p.EncodeVarint(uint64(len(s)))
- p.buf = append(p.buf, s...)
- return nil
-}
-
-// Marshaler is the interface representing objects that can marshal themselves.
-type Marshaler interface {
- Marshal() ([]byte, error)
-}
-
-// EncodeMessage writes the protocol buffer to the Buffer,
-// prefixed by a varint-encoded length.
-func (p *Buffer) EncodeMessage(pb Message) error {
- siz := Size(pb)
- p.EncodeVarint(uint64(siz))
- return p.Marshal(pb)
-}
-
-// All protocol buffer fields are nillable, but be careful.
-func isNil(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
- return v.IsNil()
- }
- return false
-}
diff --git a/vendor/github.com/golang/protobuf/proto/equal.go b/vendor/github.com/golang/protobuf/proto/equal.go
deleted file mode 100644
index d4db5a1c..00000000
--- a/vendor/github.com/golang/protobuf/proto/equal.go
+++ /dev/null
@@ -1,300 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2011 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Protocol buffer comparison.
-
-package proto
-
-import (
- "bytes"
- "log"
- "reflect"
- "strings"
-)
-
-/*
-Equal returns true iff protocol buffers a and b are equal.
-The arguments must both be pointers to protocol buffer structs.
-
-Equality is defined in this way:
- - Two messages are equal iff they are the same type,
- corresponding fields are equal, unknown field sets
- are equal, and extensions sets are equal.
- - Two set scalar fields are equal iff their values are equal.
- If the fields are of a floating-point type, remember that
- NaN != x for all x, including NaN. If the message is defined
- in a proto3 .proto file, fields are not "set"; specifically,
- zero length proto3 "bytes" fields are equal (nil == {}).
- - Two repeated fields are equal iff their lengths are the same,
- and their corresponding elements are equal. Note a "bytes" field,
- although represented by []byte, is not a repeated field and the
- rule for the scalar fields described above applies.
- - Two unset fields are equal.
- - Two unknown field sets are equal if their current
- encoded state is equal.
- - Two extension sets are equal iff they have corresponding
- elements that are pairwise equal.
- - Two map fields are equal iff their lengths are the same,
- and they contain the same set of elements. Zero-length map
- fields are equal.
- - Every other combination of things are not equal.
-
-The return value is undefined if a and b are not protocol buffers.
-*/
-func Equal(a, b Message) bool {
- if a == nil || b == nil {
- return a == b
- }
- v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b)
- if v1.Type() != v2.Type() {
- return false
- }
- if v1.Kind() == reflect.Ptr {
- if v1.IsNil() {
- return v2.IsNil()
- }
- if v2.IsNil() {
- return false
- }
- v1, v2 = v1.Elem(), v2.Elem()
- }
- if v1.Kind() != reflect.Struct {
- return false
- }
- return equalStruct(v1, v2)
-}
-
-// v1 and v2 are known to have the same type.
-func equalStruct(v1, v2 reflect.Value) bool {
- sprop := GetProperties(v1.Type())
- for i := 0; i < v1.NumField(); i++ {
- f := v1.Type().Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- f1, f2 := v1.Field(i), v2.Field(i)
- if f.Type.Kind() == reflect.Ptr {
- if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 {
- // both unset
- continue
- } else if n1 != n2 {
- // set/unset mismatch
- return false
- }
- f1, f2 = f1.Elem(), f2.Elem()
- }
- if !equalAny(f1, f2, sprop.Prop[i]) {
- return false
- }
- }
-
- if em1 := v1.FieldByName("XXX_InternalExtensions"); em1.IsValid() {
- em2 := v2.FieldByName("XXX_InternalExtensions")
- if !equalExtensions(v1.Type(), em1.Interface().(XXX_InternalExtensions), em2.Interface().(XXX_InternalExtensions)) {
- return false
- }
- }
-
- if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() {
- em2 := v2.FieldByName("XXX_extensions")
- if !equalExtMap(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) {
- return false
- }
- }
-
- uf := v1.FieldByName("XXX_unrecognized")
- if !uf.IsValid() {
- return true
- }
-
- u1 := uf.Bytes()
- u2 := v2.FieldByName("XXX_unrecognized").Bytes()
- return bytes.Equal(u1, u2)
-}
-
-// v1 and v2 are known to have the same type.
-// prop may be nil.
-func equalAny(v1, v2 reflect.Value, prop *Properties) bool {
- if v1.Type() == protoMessageType {
- m1, _ := v1.Interface().(Message)
- m2, _ := v2.Interface().(Message)
- return Equal(m1, m2)
- }
- switch v1.Kind() {
- case reflect.Bool:
- return v1.Bool() == v2.Bool()
- case reflect.Float32, reflect.Float64:
- return v1.Float() == v2.Float()
- case reflect.Int32, reflect.Int64:
- return v1.Int() == v2.Int()
- case reflect.Interface:
- // Probably a oneof field; compare the inner values.
- n1, n2 := v1.IsNil(), v2.IsNil()
- if n1 || n2 {
- return n1 == n2
- }
- e1, e2 := v1.Elem(), v2.Elem()
- if e1.Type() != e2.Type() {
- return false
- }
- return equalAny(e1, e2, nil)
- case reflect.Map:
- if v1.Len() != v2.Len() {
- return false
- }
- for _, key := range v1.MapKeys() {
- val2 := v2.MapIndex(key)
- if !val2.IsValid() {
- // This key was not found in the second map.
- return false
- }
- if !equalAny(v1.MapIndex(key), val2, nil) {
- return false
- }
- }
- return true
- case reflect.Ptr:
- // Maps may have nil values in them, so check for nil.
- if v1.IsNil() && v2.IsNil() {
- return true
- }
- if v1.IsNil() != v2.IsNil() {
- return false
- }
- return equalAny(v1.Elem(), v2.Elem(), prop)
- case reflect.Slice:
- if v1.Type().Elem().Kind() == reflect.Uint8 {
- // short circuit: []byte
-
- // Edge case: if this is in a proto3 message, a zero length
- // bytes field is considered the zero value.
- if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 {
- return true
- }
- if v1.IsNil() != v2.IsNil() {
- return false
- }
- return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte))
- }
-
- if v1.Len() != v2.Len() {
- return false
- }
- for i := 0; i < v1.Len(); i++ {
- if !equalAny(v1.Index(i), v2.Index(i), prop) {
- return false
- }
- }
- return true
- case reflect.String:
- return v1.Interface().(string) == v2.Interface().(string)
- case reflect.Struct:
- return equalStruct(v1, v2)
- case reflect.Uint32, reflect.Uint64:
- return v1.Uint() == v2.Uint()
- }
-
- // unknown type, so not a protocol buffer
- log.Printf("proto: don't know how to compare %v", v1)
- return false
-}
-
-// base is the struct type that the extensions are based on.
-// x1 and x2 are InternalExtensions.
-func equalExtensions(base reflect.Type, x1, x2 XXX_InternalExtensions) bool {
- em1, _ := x1.extensionsRead()
- em2, _ := x2.extensionsRead()
- return equalExtMap(base, em1, em2)
-}
-
-func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool {
- if len(em1) != len(em2) {
- return false
- }
-
- for extNum, e1 := range em1 {
- e2, ok := em2[extNum]
- if !ok {
- return false
- }
-
- m1, m2 := e1.value, e2.value
-
- if m1 == nil && m2 == nil {
- // Both have only encoded form.
- if bytes.Equal(e1.enc, e2.enc) {
- continue
- }
- // The bytes are different, but the extensions might still be
- // equal. We need to decode them to compare.
- }
-
- if m1 != nil && m2 != nil {
- // Both are unencoded.
- if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) {
- return false
- }
- continue
- }
-
- // At least one is encoded. To do a semantically correct comparison
- // we need to unmarshal them first.
- var desc *ExtensionDesc
- if m := extensionMaps[base]; m != nil {
- desc = m[extNum]
- }
- if desc == nil {
- // If both have only encoded form and the bytes are the same,
- // it is handled above. We get here when the bytes are different.
- // We don't know how to decode it, so just compare them as byte
- // slices.
- log.Printf("proto: don't know how to compare extension %d of %v", extNum, base)
- return false
- }
- var err error
- if m1 == nil {
- m1, err = decodeExtension(e1.enc, desc)
- }
- if m2 == nil && err == nil {
- m2, err = decodeExtension(e2.enc, desc)
- }
- if err != nil {
- // The encoded form is invalid.
- log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err)
- return false
- }
- if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) {
- return false
- }
- }
-
- return true
-}
diff --git a/vendor/github.com/golang/protobuf/proto/extensions.go b/vendor/github.com/golang/protobuf/proto/extensions.go
index 816a3b9d..42fc120c 100644
--- a/vendor/github.com/golang/protobuf/proto/extensions.go
+++ b/vendor/github.com/golang/protobuf/proto/extensions.go
@@ -1,543 +1,356 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
package proto
-/*
- * Types and routines for supporting protocol buffer extensions.
- */
-
import (
"errors"
"fmt"
- "io"
"reflect"
- "strconv"
- "sync"
-)
-
-// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message.
-var ErrMissingExtension = errors.New("proto: missing extension")
-// ExtensionRange represents a range of message extensions for a protocol buffer.
-// Used in code generated by the protocol compiler.
-type ExtensionRange struct {
- Start, End int32 // both inclusive
-}
-
-// extendableProto is an interface implemented by any protocol buffer generated by the current
-// proto compiler that may be extended.
-type extendableProto interface {
- Message
- ExtensionRangeArray() []ExtensionRange
- extensionsWrite() map[int32]Extension
- extensionsRead() (map[int32]Extension, sync.Locker)
-}
-
-// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous
-// version of the proto compiler that may be extended.
-type extendableProtoV1 interface {
- Message
- ExtensionRangeArray() []ExtensionRange
- ExtensionMap() map[int32]Extension
-}
-
-// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto.
-type extensionAdapter struct {
- extendableProtoV1
-}
+ "google.golang.org/protobuf/encoding/protowire"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/runtime/protoiface"
+ "google.golang.org/protobuf/runtime/protoimpl"
+)
-func (e extensionAdapter) extensionsWrite() map[int32]Extension {
- return e.ExtensionMap()
-}
+type (
+ // ExtensionDesc represents an extension descriptor and
+ // is used to interact with an extension field in a message.
+ //
+ // Variables of this type are generated in code by protoc-gen-go.
+ ExtensionDesc = protoimpl.ExtensionInfo
-func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) {
- return e.ExtensionMap(), notLocker{}
-}
+ // ExtensionRange represents a range of message extensions.
+ // Used in code generated by protoc-gen-go.
+ ExtensionRange = protoiface.ExtensionRangeV1
-// notLocker is a sync.Locker whose Lock and Unlock methods are nops.
-type notLocker struct{}
+ // Deprecated: Do not use; this is an internal type.
+ Extension = protoimpl.ExtensionFieldV1
-func (n notLocker) Lock() {}
-func (n notLocker) Unlock() {}
+ // Deprecated: Do not use; this is an internal type.
+ XXX_InternalExtensions = protoimpl.ExtensionFields
+)
-// extendable returns the extendableProto interface for the given generated proto message.
-// If the proto message has the old extension format, it returns a wrapper that implements
-// the extendableProto interface.
-func extendable(p interface{}) (extendableProto, error) {
- switch p := p.(type) {
- case extendableProto:
- if isNilPtr(p) {
- return nil, fmt.Errorf("proto: nil %T is not extendable", p)
- }
- return p, nil
- case extendableProtoV1:
- if isNilPtr(p) {
- return nil, fmt.Errorf("proto: nil %T is not extendable", p)
- }
- return extensionAdapter{p}, nil
- }
- // Don't allocate a specific error containing %T:
- // this is the hot path for Clone and MarshalText.
- return nil, errNotExtendable
-}
+// ErrMissingExtension reports whether the extension was not present.
+var ErrMissingExtension = errors.New("proto: missing extension")
var errNotExtendable = errors.New("proto: not an extendable proto.Message")
-func isNilPtr(x interface{}) bool {
- v := reflect.ValueOf(x)
- return v.Kind() == reflect.Ptr && v.IsNil()
-}
-
-// XXX_InternalExtensions is an internal representation of proto extensions.
-//
-// Each generated message struct type embeds an anonymous XXX_InternalExtensions field,
-// thus gaining the unexported 'extensions' method, which can be called only from the proto package.
-//
-// The methods of XXX_InternalExtensions are not concurrency safe in general,
-// but calls to logically read-only methods such as has and get may be executed concurrently.
-type XXX_InternalExtensions struct {
- // The struct must be indirect so that if a user inadvertently copies a
- // generated message and its embedded XXX_InternalExtensions, they
- // avoid the mayhem of a copied mutex.
- //
- // The mutex serializes all logically read-only operations to p.extensionMap.
- // It is up to the client to ensure that write operations to p.extensionMap are
- // mutually exclusive with other accesses.
- p *struct {
- mu sync.Mutex
- extensionMap map[int32]Extension
+// HasExtension reports whether the extension field is present in m
+// either as an explicitly populated field or as an unknown field.
+func HasExtension(m Message, xt *ExtensionDesc) (has bool) {
+ mr := MessageReflect(m)
+ if mr == nil || !mr.IsValid() {
+ return false
}
-}
-// extensionsWrite returns the extension map, creating it on first use.
-func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension {
- if e.p == nil {
- e.p = new(struct {
- mu sync.Mutex
- extensionMap map[int32]Extension
+ // Check whether any populated known field matches the field number.
+ xtd := xt.TypeDescriptor()
+ if isValidExtension(mr.Descriptor(), xtd) {
+ has = mr.Has(xtd)
+ } else {
+ mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
+ has = int32(fd.Number()) == xt.Field
+ return !has
})
- e.p.extensionMap = make(map[int32]Extension)
}
- return e.p.extensionMap
-}
-// extensionsRead returns the extensions map for read-only use. It may be nil.
-// The caller must hold the returned mutex's lock when accessing Elements within the map.
-func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) {
- if e.p == nil {
- return nil, nil
+ // Check whether any unknown field matches the field number.
+ for b := mr.GetUnknown(); !has && len(b) > 0; {
+ num, _, n := protowire.ConsumeField(b)
+ has = int32(num) == xt.Field
+ b = b[n:]
}
- return e.p.extensionMap, &e.p.mu
-}
-
-// ExtensionDesc represents an extension specification.
-// Used in generated code from the protocol compiler.
-type ExtensionDesc struct {
- ExtendedType Message // nil pointer to the type that is being extended
- ExtensionType interface{} // nil pointer to the extension type
- Field int32 // field number
- Name string // fully-qualified name of extension, for text formatting
- Tag string // protobuf tag style
- Filename string // name of the file in which the extension is defined
-}
-
-func (ed *ExtensionDesc) repeated() bool {
- t := reflect.TypeOf(ed.ExtensionType)
- return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8
-}
-
-// Extension represents an extension in a message.
-type Extension struct {
- // When an extension is stored in a message using SetExtension
- // only desc and value are set. When the message is marshaled
- // enc will be set to the encoded form of the message.
- //
- // When a message is unmarshaled and contains extensions, each
- // extension will have only enc set. When such an extension is
- // accessed using GetExtension (or GetExtensions) desc and value
- // will be set.
- desc *ExtensionDesc
- value interface{}
- enc []byte
+ return has
}
-// SetRawExtension is for testing only.
-func SetRawExtension(base Message, id int32, b []byte) {
- epb, err := extendable(base)
- if err != nil {
+// ClearExtension removes the extension field from m
+// either as an explicitly populated field or as an unknown field.
+func ClearExtension(m Message, xt *ExtensionDesc) {
+ mr := MessageReflect(m)
+ if mr == nil || !mr.IsValid() {
return
}
- extmap := epb.extensionsWrite()
- extmap[id] = Extension{enc: b}
-}
-// isExtensionField returns true iff the given field number is in an extension range.
-func isExtensionField(pb extendableProto, field int32) bool {
- for _, er := range pb.ExtensionRangeArray() {
- if er.Start <= field && field <= er.End {
+ xtd := xt.TypeDescriptor()
+ if isValidExtension(mr.Descriptor(), xtd) {
+ mr.Clear(xtd)
+ } else {
+ mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
+ if int32(fd.Number()) == xt.Field {
+ mr.Clear(fd)
+ return false
+ }
return true
- }
- }
- return false
-}
-
-// checkExtensionTypes checks that the given extension is valid for pb.
-func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error {
- var pbi interface{} = pb
- // Check the extended type.
- if ea, ok := pbi.(extensionAdapter); ok {
- pbi = ea.extendableProtoV1
- }
- if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b {
- return fmt.Errorf("proto: bad extended type; %v does not extend %v", b, a)
- }
- // Check the range.
- if !isExtensionField(pb, extension.Field) {
- return errors.New("proto: bad extension number; not in declared ranges")
- }
- return nil
-}
-
-// extPropKey is sufficient to uniquely identify an extension.
-type extPropKey struct {
- base reflect.Type
- field int32
-}
-
-var extProp = struct {
- sync.RWMutex
- m map[extPropKey]*Properties
-}{
- m: make(map[extPropKey]*Properties),
-}
-
-func extensionProperties(ed *ExtensionDesc) *Properties {
- key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field}
-
- extProp.RLock()
- if prop, ok := extProp.m[key]; ok {
- extProp.RUnlock()
- return prop
- }
- extProp.RUnlock()
-
- extProp.Lock()
- defer extProp.Unlock()
- // Check again.
- if prop, ok := extProp.m[key]; ok {
- return prop
- }
-
- prop := new(Properties)
- prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil)
- extProp.m[key] = prop
- return prop
-}
-
-// HasExtension returns whether the given extension is present in pb.
-func HasExtension(pb Message, extension *ExtensionDesc) bool {
- // TODO: Check types, field numbers, etc.?
- epb, err := extendable(pb)
- if err != nil {
- return false
- }
- extmap, mu := epb.extensionsRead()
- if extmap == nil {
- return false
+ })
}
- mu.Lock()
- _, ok := extmap[extension.Field]
- mu.Unlock()
- return ok
+ clearUnknown(mr, fieldNum(xt.Field))
}
-// ClearExtension removes the given extension from pb.
-func ClearExtension(pb Message, extension *ExtensionDesc) {
- epb, err := extendable(pb)
- if err != nil {
+// ClearAllExtensions clears all extensions from m.
+// This includes populated fields and unknown fields in the extension range.
+func ClearAllExtensions(m Message) {
+ mr := MessageReflect(m)
+ if mr == nil || !mr.IsValid() {
return
}
- // TODO: Check types, field numbers, etc.?
- extmap := epb.extensionsWrite()
- delete(extmap, extension.Field)
+
+ mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
+ if fd.IsExtension() {
+ mr.Clear(fd)
+ }
+ return true
+ })
+ clearUnknown(mr, mr.Descriptor().ExtensionRanges())
}
-// GetExtension retrieves a proto2 extended field from pb.
+// GetExtension retrieves a proto2 extended field from m.
//
// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil),
// then GetExtension parses the encoded field and returns a Go value of the specified type.
// If the field is not present, then the default value is returned (if one is specified),
// otherwise ErrMissingExtension is reported.
//
-// If the descriptor is not type complete (i.e., ExtensionDesc.ExtensionType is nil),
-// then GetExtension returns the raw encoded bytes of the field extension.
-func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) {
- epb, err := extendable(pb)
- if err != nil {
- return nil, err
- }
-
- if extension.ExtendedType != nil {
- // can only check type if this is a complete descriptor
- if err := checkExtensionTypes(epb, extension); err != nil {
- return nil, err
+// If the descriptor is type incomplete (i.e., ExtensionDesc.ExtensionType is nil),
+// then GetExtension returns the raw encoded bytes for the extension field.
+func GetExtension(m Message, xt *ExtensionDesc) (interface{}, error) {
+ mr := MessageReflect(m)
+ if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {
+ return nil, errNotExtendable
+ }
+
+ // Retrieve the unknown fields for this extension field.
+ var bo protoreflect.RawFields
+ for bi := mr.GetUnknown(); len(bi) > 0; {
+ num, _, n := protowire.ConsumeField(bi)
+ if int32(num) == xt.Field {
+ bo = append(bo, bi[:n]...)
}
+ bi = bi[n:]
}
- emap, mu := epb.extensionsRead()
- if emap == nil {
- return defaultExtensionValue(extension)
- }
- mu.Lock()
- defer mu.Unlock()
- e, ok := emap[extension.Field]
- if !ok {
- // defaultExtensionValue returns the default value or
- // ErrMissingExtension if there is no default.
- return defaultExtensionValue(extension)
+ // For type incomplete descriptors, only retrieve the unknown fields.
+ if xt.ExtensionType == nil {
+ return []byte(bo), nil
}
- if e.value != nil {
- // Already decoded. Check the descriptor, though.
- if e.desc != extension {
- // This shouldn't happen. If it does, it means that
- // GetExtension was called twice with two different
- // descriptors with the same field number.
- return nil, errors.New("proto: descriptor conflict")
+ // If the extension field only exists as unknown fields, unmarshal it.
+ // This is rarely done since proto.Unmarshal eagerly unmarshals extensions.
+ xtd := xt.TypeDescriptor()
+ if !isValidExtension(mr.Descriptor(), xtd) {
+ return nil, fmt.Errorf("proto: bad extended type; %T does not extend %T", xt.ExtendedType, m)
+ }
+ if !mr.Has(xtd) && len(bo) > 0 {
+ m2 := mr.New()
+ if err := (proto.UnmarshalOptions{
+ Resolver: extensionResolver{xt},
+ }.Unmarshal(bo, m2.Interface())); err != nil {
+ return nil, err
+ }
+ if m2.Has(xtd) {
+ mr.Set(xtd, m2.Get(xtd))
+ clearUnknown(mr, fieldNum(xt.Field))
}
- return e.value, nil
}
- if extension.ExtensionType == nil {
- // incomplete descriptor
- return e.enc, nil
+ // Check whether the message has the extension field set or a default.
+ var pv protoreflect.Value
+ switch {
+ case mr.Has(xtd):
+ pv = mr.Get(xtd)
+ case xtd.HasDefault():
+ pv = xtd.Default()
+ default:
+ return nil, ErrMissingExtension
}
- v, err := decodeExtension(e.enc, extension)
- if err != nil {
- return nil, err
+ v := xt.InterfaceOf(pv)
+ rv := reflect.ValueOf(v)
+ if isScalarKind(rv.Kind()) {
+ rv2 := reflect.New(rv.Type())
+ rv2.Elem().Set(rv)
+ v = rv2.Interface()
}
-
- // Remember the decoded version and drop the encoded version.
- // That way it is safe to mutate what we return.
- e.value = v
- e.desc = extension
- e.enc = nil
- emap[extension.Field] = e
- return e.value, nil
+ return v, nil
}
-// defaultExtensionValue returns the default value for extension.
-// If no default for an extension is defined ErrMissingExtension is returned.
-func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) {
- if extension.ExtensionType == nil {
- // incomplete descriptor, so no default
- return nil, ErrMissingExtension
- }
-
- t := reflect.TypeOf(extension.ExtensionType)
- props := extensionProperties(extension)
+// extensionResolver is a custom extension resolver that stores a single
+// extension type that takes precedence over the global registry.
+type extensionResolver struct{ xt protoreflect.ExtensionType }
- sf, _, err := fieldDefault(t, props)
- if err != nil {
- return nil, err
+func (r extensionResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {
+ if xtd := r.xt.TypeDescriptor(); xtd.FullName() == field {
+ return r.xt, nil
}
+ return protoregistry.GlobalTypes.FindExtensionByName(field)
+}
- if sf == nil || sf.value == nil {
- // There is no default value.
- return nil, ErrMissingExtension
+func (r extensionResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {
+ if xtd := r.xt.TypeDescriptor(); xtd.ContainingMessage().FullName() == message && xtd.Number() == field {
+ return r.xt, nil
}
+ return protoregistry.GlobalTypes.FindExtensionByNumber(message, field)
+}
- if t.Kind() != reflect.Ptr {
- // We do not need to return a Ptr, we can directly return sf.value.
- return sf.value, nil
+// GetExtensions returns a list of the extensions values present in m,
+// corresponding with the provided list of extension descriptors, xts.
+// If an extension is missing in m, the corresponding value is nil.
+func GetExtensions(m Message, xts []*ExtensionDesc) ([]interface{}, error) {
+ mr := MessageReflect(m)
+ if mr == nil || !mr.IsValid() {
+ return nil, errNotExtendable
}
- // We need to return an interface{} that is a pointer to sf.value.
- value := reflect.New(t).Elem()
- value.Set(reflect.New(value.Type().Elem()))
- if sf.kind == reflect.Int32 {
- // We may have an int32 or an enum, but the underlying data is int32.
- // Since we can't set an int32 into a non int32 reflect.value directly
- // set it as a int32.
- value.Elem().SetInt(int64(sf.value.(int32)))
- } else {
- value.Elem().Set(reflect.ValueOf(sf.value))
+ vs := make([]interface{}, len(xts))
+ for i, xt := range xts {
+ v, err := GetExtension(m, xt)
+ if err != nil {
+ if err == ErrMissingExtension {
+ continue
+ }
+ return vs, err
+ }
+ vs[i] = v
}
- return value.Interface(), nil
+ return vs, nil
}
-// decodeExtension decodes an extension encoded in b.
-func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) {
- t := reflect.TypeOf(extension.ExtensionType)
- unmarshal := typeUnmarshaler(t, extension.Tag)
-
- // t is a pointer to a struct, pointer to basic type or a slice.
- // Allocate space to store the pointer/slice.
- value := reflect.New(t).Elem()
+// SetExtension sets an extension field in m to the provided value.
+func SetExtension(m Message, xt *ExtensionDesc, v interface{}) error {
+ mr := MessageReflect(m)
+ if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {
+ return errNotExtendable
+ }
- var err error
- for {
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
+ rv := reflect.ValueOf(v)
+ if reflect.TypeOf(v) != reflect.TypeOf(xt.ExtensionType) {
+ return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", v, xt.ExtensionType)
+ }
+ if rv.Kind() == reflect.Ptr {
+ if rv.IsNil() {
+ return fmt.Errorf("proto: SetExtension called with nil value of type %T", v)
}
- b = b[n:]
- wire := int(x) & 7
-
- b, err = unmarshal(b, valToPointer(value.Addr()), wire)
- if err != nil {
- return nil, err
+ if isScalarKind(rv.Elem().Kind()) {
+ v = rv.Elem().Interface()
}
+ }
- if len(b) == 0 {
- break
- }
+ xtd := xt.TypeDescriptor()
+ if !isValidExtension(mr.Descriptor(), xtd) {
+ return fmt.Errorf("proto: bad extended type; %T does not extend %T", xt.ExtendedType, m)
}
- return value.Interface(), nil
+ mr.Set(xtd, xt.ValueOf(v))
+ clearUnknown(mr, fieldNum(xt.Field))
+ return nil
}
-// GetExtensions returns a slice of the extensions present in pb that are also listed in es.
-// The returned slice has the same length as es; missing extensions will appear as nil elements.
-func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) {
- epb, err := extendable(pb)
- if err != nil {
- return nil, err
+// SetRawExtension inserts b into the unknown fields of m.
+//
+// Deprecated: Use Message.ProtoReflect.SetUnknown instead.
+func SetRawExtension(m Message, fnum int32, b []byte) {
+ mr := MessageReflect(m)
+ if mr == nil || !mr.IsValid() {
+ return
}
- extensions = make([]interface{}, len(es))
- for i, e := range es {
- extensions[i], err = GetExtension(epb, e)
- if err == ErrMissingExtension {
- err = nil
- }
- if err != nil {
- return
+
+ // Verify that the raw field is valid.
+ for b0 := b; len(b0) > 0; {
+ num, _, n := protowire.ConsumeField(b0)
+ if int32(num) != fnum {
+ panic(fmt.Sprintf("mismatching field number: got %d, want %d", num, fnum))
}
+ b0 = b0[n:]
}
- return
-}
-// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order.
-// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing
-// just the Field field, which defines the extension's field number.
-func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) {
- epb, err := extendable(pb)
- if err != nil {
- return nil, err
- }
- registeredExtensions := RegisteredExtensions(pb)
+ ClearExtension(m, &ExtensionDesc{Field: fnum})
+ mr.SetUnknown(append(mr.GetUnknown(), b...))
+}
- emap, mu := epb.extensionsRead()
- if emap == nil {
- return nil, nil
- }
- mu.Lock()
- defer mu.Unlock()
- extensions := make([]*ExtensionDesc, 0, len(emap))
- for extid, e := range emap {
- desc := e.desc
- if desc == nil {
- desc = registeredExtensions[extid]
- if desc == nil {
- desc = &ExtensionDesc{Field: extid}
+// ExtensionDescs returns a list of extension descriptors found in m,
+// containing descriptors for both populated extension fields in m and
+// also unknown fields of m that are in the extension range.
+// For the later case, an type incomplete descriptor is provided where only
+// the ExtensionDesc.Field field is populated.
+// The order of the extension descriptors is undefined.
+func ExtensionDescs(m Message) ([]*ExtensionDesc, error) {
+ mr := MessageReflect(m)
+ if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {
+ return nil, errNotExtendable
+ }
+
+ // Collect a set of known extension descriptors.
+ extDescs := make(map[protoreflect.FieldNumber]*ExtensionDesc)
+ mr.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
+ if fd.IsExtension() {
+ xt := fd.(protoreflect.ExtensionTypeDescriptor)
+ if xd, ok := xt.Type().(*ExtensionDesc); ok {
+ extDescs[fd.Number()] = xd
}
}
-
- extensions = append(extensions, desc)
+ return true
+ })
+
+ // Collect a set of unknown extension descriptors.
+ extRanges := mr.Descriptor().ExtensionRanges()
+ for b := mr.GetUnknown(); len(b) > 0; {
+ num, _, n := protowire.ConsumeField(b)
+ if extRanges.Has(num) && extDescs[num] == nil {
+ extDescs[num] = nil
+ }
+ b = b[n:]
}
- return extensions, nil
-}
-// SetExtension sets the specified extension of pb to the specified value.
-func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error {
- epb, err := extendable(pb)
- if err != nil {
- return err
- }
- if err := checkExtensionTypes(epb, extension); err != nil {
- return err
- }
- typ := reflect.TypeOf(extension.ExtensionType)
- if typ != reflect.TypeOf(value) {
- return errors.New("proto: bad extension value type")
- }
- // nil extension values need to be caught early, because the
- // encoder can't distinguish an ErrNil due to a nil extension
- // from an ErrNil due to a missing field. Extensions are
- // always optional, so the encoder would just swallow the error
- // and drop all the extensions from the encoded message.
- if reflect.ValueOf(value).IsNil() {
- return fmt.Errorf("proto: SetExtension called with nil value of type %T", value)
+ // Transpose the set of descriptors into a list.
+ var xts []*ExtensionDesc
+ for num, xt := range extDescs {
+ if xt == nil {
+ xt = &ExtensionDesc{Field: int32(num)}
+ }
+ xts = append(xts, xt)
}
+ return xts, nil
+}
- extmap := epb.extensionsWrite()
- extmap[extension.Field] = Extension{desc: extension, value: value}
- return nil
+// isValidExtension reports whether xtd is a valid extension descriptor for md.
+func isValidExtension(md protoreflect.MessageDescriptor, xtd protoreflect.ExtensionTypeDescriptor) bool {
+ return xtd.ContainingMessage() == md && md.ExtensionRanges().Has(xtd.Number())
}
-// ClearAllExtensions clears all extensions from pb.
-func ClearAllExtensions(pb Message) {
- epb, err := extendable(pb)
- if err != nil {
- return
- }
- m := epb.extensionsWrite()
- for k := range m {
- delete(m, k)
+// isScalarKind reports whether k is a protobuf scalar kind (except bytes).
+// This function exists for historical reasons since the representation of
+// scalars differs between v1 and v2, where v1 uses *T and v2 uses T.
+func isScalarKind(k reflect.Kind) bool {
+ switch k {
+ case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:
+ return true
+ default:
+ return false
}
}
-// A global registry of extensions.
-// The generated code will register the generated descriptors by calling RegisterExtension.
-
-var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc)
-
-// RegisterExtension is called from the generated code.
-func RegisterExtension(desc *ExtensionDesc) {
- st := reflect.TypeOf(desc.ExtendedType).Elem()
- m := extensionMaps[st]
- if m == nil {
- m = make(map[int32]*ExtensionDesc)
- extensionMaps[st] = m
+// clearUnknown removes unknown fields from m where remover.Has reports true.
+func clearUnknown(m protoreflect.Message, remover interface {
+ Has(protoreflect.FieldNumber) bool
+}) {
+ var bo protoreflect.RawFields
+ for bi := m.GetUnknown(); len(bi) > 0; {
+ num, _, n := protowire.ConsumeField(bi)
+ if !remover.Has(num) {
+ bo = append(bo, bi[:n]...)
+ }
+ bi = bi[n:]
}
- if _, ok := m[desc.Field]; ok {
- panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field)))
+ if bi := m.GetUnknown(); len(bi) != len(bo) {
+ m.SetUnknown(bo)
}
- m[desc.Field] = desc
}
-// RegisteredExtensions returns a map of the registered extensions of a
-// protocol buffer struct, indexed by the extension number.
-// The argument pb should be a nil pointer to the struct type.
-func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc {
- return extensionMaps[reflect.TypeOf(pb).Elem()]
+type fieldNum protoreflect.FieldNumber
+
+func (n1 fieldNum) Has(n2 protoreflect.FieldNumber) bool {
+ return protoreflect.FieldNumber(n1) == n2
}
diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go
deleted file mode 100644
index 0e2191b8..00000000
--- a/vendor/github.com/golang/protobuf/proto/lib.go
+++ /dev/null
@@ -1,921 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-/*
-Package proto converts data structures to and from the wire format of
-protocol buffers. It works in concert with the Go source code generated
-for .proto files by the protocol compiler.
-
-A summary of the properties of the protocol buffer interface
-for a protocol buffer variable v:
-
- - Names are turned from camel_case to CamelCase for export.
- - There are no methods on v to set fields; just treat
- them as structure fields.
- - There are getters that return a field's value if set,
- and return the field's default value if unset.
- The getters work even if the receiver is a nil message.
- - The zero value for a struct is its correct initialization state.
- All desired fields must be set before marshaling.
- - A Reset() method will restore a protobuf struct to its zero state.
- - Non-repeated fields are pointers to the values; nil means unset.
- That is, optional or required field int32 f becomes F *int32.
- - Repeated fields are slices.
- - Helper functions are available to aid the setting of fields.
- msg.Foo = proto.String("hello") // set field
- - Constants are defined to hold the default values of all fields that
- have them. They have the form Default_StructName_FieldName.
- Because the getter methods handle defaulted values,
- direct use of these constants should be rare.
- - Enums are given type names and maps from names to values.
- Enum values are prefixed by the enclosing message's name, or by the
- enum's type name if it is a top-level enum. Enum types have a String
- method, and a Enum method to assist in message construction.
- - Nested messages, groups and enums have type names prefixed with the name of
- the surrounding message type.
- - Extensions are given descriptor names that start with E_,
- followed by an underscore-delimited list of the nested messages
- that contain it (if any) followed by the CamelCased name of the
- extension field itself. HasExtension, ClearExtension, GetExtension
- and SetExtension are functions for manipulating extensions.
- - Oneof field sets are given a single field in their message,
- with distinguished wrapper types for each possible field value.
- - Marshal and Unmarshal are functions to encode and decode the wire format.
-
-When the .proto file specifies `syntax="proto3"`, there are some differences:
-
- - Non-repeated fields of non-message type are values instead of pointers.
- - Enum types do not get an Enum method.
-
-The simplest way to describe this is to see an example.
-Given file test.proto, containing
-
- package example;
-
- enum FOO { X = 17; }
-
- message Test {
- required string label = 1;
- optional int32 type = 2 [default=77];
- repeated int64 reps = 3;
- optional group OptionalGroup = 4 {
- required string RequiredField = 5;
- }
- oneof union {
- int32 number = 6;
- string name = 7;
- }
- }
-
-The resulting file, test.pb.go, is:
-
- package example
-
- import proto "github.com/golang/protobuf/proto"
- import math "math"
-
- type FOO int32
- const (
- FOO_X FOO = 17
- )
- var FOO_name = map[int32]string{
- 17: "X",
- }
- var FOO_value = map[string]int32{
- "X": 17,
- }
-
- func (x FOO) Enum() *FOO {
- p := new(FOO)
- *p = x
- return p
- }
- func (x FOO) String() string {
- return proto.EnumName(FOO_name, int32(x))
- }
- func (x *FOO) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FOO_value, data)
- if err != nil {
- return err
- }
- *x = FOO(value)
- return nil
- }
-
- type Test struct {
- Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"`
- Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"`
- Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"`
- Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
- // Types that are valid to be assigned to Union:
- // *Test_Number
- // *Test_Name
- Union isTest_Union `protobuf_oneof:"union"`
- XXX_unrecognized []byte `json:"-"`
- }
- func (m *Test) Reset() { *m = Test{} }
- func (m *Test) String() string { return proto.CompactTextString(m) }
- func (*Test) ProtoMessage() {}
-
- type isTest_Union interface {
- isTest_Union()
- }
-
- type Test_Number struct {
- Number int32 `protobuf:"varint,6,opt,name=number"`
- }
- type Test_Name struct {
- Name string `protobuf:"bytes,7,opt,name=name"`
- }
-
- func (*Test_Number) isTest_Union() {}
- func (*Test_Name) isTest_Union() {}
-
- func (m *Test) GetUnion() isTest_Union {
- if m != nil {
- return m.Union
- }
- return nil
- }
- const Default_Test_Type int32 = 77
-
- func (m *Test) GetLabel() string {
- if m != nil && m.Label != nil {
- return *m.Label
- }
- return ""
- }
-
- func (m *Test) GetType() int32 {
- if m != nil && m.Type != nil {
- return *m.Type
- }
- return Default_Test_Type
- }
-
- func (m *Test) GetOptionalgroup() *Test_OptionalGroup {
- if m != nil {
- return m.Optionalgroup
- }
- return nil
- }
-
- type Test_OptionalGroup struct {
- RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"`
- }
- func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} }
- func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) }
-
- func (m *Test_OptionalGroup) GetRequiredField() string {
- if m != nil && m.RequiredField != nil {
- return *m.RequiredField
- }
- return ""
- }
-
- func (m *Test) GetNumber() int32 {
- if x, ok := m.GetUnion().(*Test_Number); ok {
- return x.Number
- }
- return 0
- }
-
- func (m *Test) GetName() string {
- if x, ok := m.GetUnion().(*Test_Name); ok {
- return x.Name
- }
- return ""
- }
-
- func init() {
- proto.RegisterEnum("example.FOO", FOO_name, FOO_value)
- }
-
-To create and play with a Test object:
-
- package main
-
- import (
- "log"
-
- "github.com/golang/protobuf/proto"
- pb "./example.pb"
- )
-
- func main() {
- test := &pb.Test{
- Label: proto.String("hello"),
- Type: proto.Int32(17),
- Reps: []int64{1, 2, 3},
- Optionalgroup: &pb.Test_OptionalGroup{
- RequiredField: proto.String("good bye"),
- },
- Union: &pb.Test_Name{"fred"},
- }
- data, err := proto.Marshal(test)
- if err != nil {
- log.Fatal("marshaling error: ", err)
- }
- newTest := &pb.Test{}
- err = proto.Unmarshal(data, newTest)
- if err != nil {
- log.Fatal("unmarshaling error: ", err)
- }
- // Now test and newTest contain the same data.
- if test.GetLabel() != newTest.GetLabel() {
- log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel())
- }
- // Use a type switch to determine which oneof was set.
- switch u := test.Union.(type) {
- case *pb.Test_Number: // u.Number contains the number.
- case *pb.Test_Name: // u.Name contains the string.
- }
- // etc.
- }
-*/
-package proto
-
-import (
- "encoding/json"
- "errors"
- "fmt"
- "log"
- "reflect"
- "sort"
- "strconv"
- "sync"
-)
-
-var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string")
-
-// Message is implemented by generated protocol buffer messages.
-type Message interface {
- Reset()
- String() string
- ProtoMessage()
-}
-
-// Stats records allocation details about the protocol buffer encoders
-// and decoders. Useful for tuning the library itself.
-type Stats struct {
- Emalloc uint64 // mallocs in encode
- Dmalloc uint64 // mallocs in decode
- Encode uint64 // number of encodes
- Decode uint64 // number of decodes
- Chit uint64 // number of cache hits
- Cmiss uint64 // number of cache misses
- Size uint64 // number of sizes
-}
-
-// Set to true to enable stats collection.
-const collectStats = false
-
-var stats Stats
-
-// GetStats returns a copy of the global Stats structure.
-func GetStats() Stats { return stats }
-
-// A Buffer is a buffer manager for marshaling and unmarshaling
-// protocol buffers. It may be reused between invocations to
-// reduce memory usage. It is not necessary to use a Buffer;
-// the global functions Marshal and Unmarshal create a
-// temporary Buffer and are fine for most applications.
-type Buffer struct {
- buf []byte // encode/decode byte stream
- index int // read point
-
- deterministic bool
-}
-
-// NewBuffer allocates a new Buffer and initializes its internal data to
-// the contents of the argument slice.
-func NewBuffer(e []byte) *Buffer {
- return &Buffer{buf: e}
-}
-
-// Reset resets the Buffer, ready for marshaling a new protocol buffer.
-func (p *Buffer) Reset() {
- p.buf = p.buf[0:0] // for reading/writing
- p.index = 0 // for reading
-}
-
-// SetBuf replaces the internal buffer with the slice,
-// ready for unmarshaling the contents of the slice.
-func (p *Buffer) SetBuf(s []byte) {
- p.buf = s
- p.index = 0
-}
-
-// Bytes returns the contents of the Buffer.
-func (p *Buffer) Bytes() []byte { return p.buf }
-
-// SetDeterministic sets whether to use deterministic serialization.
-//
-// Deterministic serialization guarantees that for a given binary, equal
-// messages will always be serialized to the same bytes. This implies:
-//
-// - Repeated serialization of a message will return the same bytes.
-// - Different processes of the same binary (which may be executing on
-// different machines) will serialize equal messages to the same bytes.
-//
-// Note that the deterministic serialization is NOT canonical across
-// languages. It is not guaranteed to remain stable over time. It is unstable
-// across different builds with schema changes due to unknown fields.
-// Users who need canonical serialization (e.g., persistent storage in a
-// canonical form, fingerprinting, etc.) should define their own
-// canonicalization specification and implement their own serializer rather
-// than relying on this API.
-//
-// If deterministic serialization is requested, map entries will be sorted
-// by keys in lexographical order. This is an implementation detail and
-// subject to change.
-func (p *Buffer) SetDeterministic(deterministic bool) {
- p.deterministic = deterministic
-}
-
-/*
- * Helper routines for simplifying the creation of optional fields of basic type.
- */
-
-// Bool is a helper routine that allocates a new bool value
-// to store v and returns a pointer to it.
-func Bool(v bool) *bool {
- return &v
-}
-
-// Int32 is a helper routine that allocates a new int32 value
-// to store v and returns a pointer to it.
-func Int32(v int32) *int32 {
- return &v
-}
-
-// Int is a helper routine that allocates a new int32 value
-// to store v and returns a pointer to it, but unlike Int32
-// its argument value is an int.
-func Int(v int) *int32 {
- p := new(int32)
- *p = int32(v)
- return p
-}
-
-// Int64 is a helper routine that allocates a new int64 value
-// to store v and returns a pointer to it.
-func Int64(v int64) *int64 {
- return &v
-}
-
-// Float32 is a helper routine that allocates a new float32 value
-// to store v and returns a pointer to it.
-func Float32(v float32) *float32 {
- return &v
-}
-
-// Float64 is a helper routine that allocates a new float64 value
-// to store v and returns a pointer to it.
-func Float64(v float64) *float64 {
- return &v
-}
-
-// Uint32 is a helper routine that allocates a new uint32 value
-// to store v and returns a pointer to it.
-func Uint32(v uint32) *uint32 {
- return &v
-}
-
-// Uint64 is a helper routine that allocates a new uint64 value
-// to store v and returns a pointer to it.
-func Uint64(v uint64) *uint64 {
- return &v
-}
-
-// String is a helper routine that allocates a new string value
-// to store v and returns a pointer to it.
-func String(v string) *string {
- return &v
-}
-
-// EnumName is a helper function to simplify printing protocol buffer enums
-// by name. Given an enum map and a value, it returns a useful string.
-func EnumName(m map[int32]string, v int32) string {
- s, ok := m[v]
- if ok {
- return s
- }
- return strconv.Itoa(int(v))
-}
-
-// UnmarshalJSONEnum is a helper function to simplify recovering enum int values
-// from their JSON-encoded representation. Given a map from the enum's symbolic
-// names to its int values, and a byte buffer containing the JSON-encoded
-// value, it returns an int32 that can be cast to the enum type by the caller.
-//
-// The function can deal with both JSON representations, numeric and symbolic.
-func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) {
- if data[0] == '"' {
- // New style: enums are strings.
- var repr string
- if err := json.Unmarshal(data, &repr); err != nil {
- return -1, err
- }
- val, ok := m[repr]
- if !ok {
- return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr)
- }
- return val, nil
- }
- // Old style: enums are ints.
- var val int32
- if err := json.Unmarshal(data, &val); err != nil {
- return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName)
- }
- return val, nil
-}
-
-// DebugPrint dumps the encoded data in b in a debugging format with a header
-// including the string s. Used in testing but made available for general debugging.
-func (p *Buffer) DebugPrint(s string, b []byte) {
- var u uint64
-
- obuf := p.buf
- index := p.index
- p.buf = b
- p.index = 0
- depth := 0
-
- fmt.Printf("\n--- %s ---\n", s)
-
-out:
- for {
- for i := 0; i < depth; i++ {
- fmt.Print(" ")
- }
-
- index := p.index
- if index == len(p.buf) {
- break
- }
-
- op, err := p.DecodeVarint()
- if err != nil {
- fmt.Printf("%3d: fetching op err %v\n", index, err)
- break out
- }
- tag := op >> 3
- wire := op & 7
-
- switch wire {
- default:
- fmt.Printf("%3d: t=%3d unknown wire=%d\n",
- index, tag, wire)
- break out
-
- case WireBytes:
- var r []byte
-
- r, err = p.DecodeRawBytes(false)
- if err != nil {
- break out
- }
- fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r))
- if len(r) <= 6 {
- for i := 0; i < len(r); i++ {
- fmt.Printf(" %.2x", r[i])
- }
- } else {
- for i := 0; i < 3; i++ {
- fmt.Printf(" %.2x", r[i])
- }
- fmt.Printf(" ..")
- for i := len(r) - 3; i < len(r); i++ {
- fmt.Printf(" %.2x", r[i])
- }
- }
- fmt.Printf("\n")
-
- case WireFixed32:
- u, err = p.DecodeFixed32()
- if err != nil {
- fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err)
- break out
- }
- fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u)
-
- case WireFixed64:
- u, err = p.DecodeFixed64()
- if err != nil {
- fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err)
- break out
- }
- fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u)
-
- case WireVarint:
- u, err = p.DecodeVarint()
- if err != nil {
- fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err)
- break out
- }
- fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u)
-
- case WireStartGroup:
- fmt.Printf("%3d: t=%3d start\n", index, tag)
- depth++
-
- case WireEndGroup:
- depth--
- fmt.Printf("%3d: t=%3d end\n", index, tag)
- }
- }
-
- if depth != 0 {
- fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth)
- }
- fmt.Printf("\n")
-
- p.buf = obuf
- p.index = index
-}
-
-// SetDefaults sets unset protocol buffer fields to their default values.
-// It only modifies fields that are both unset and have defined defaults.
-// It recursively sets default values in any non-nil sub-messages.
-func SetDefaults(pb Message) {
- setDefaults(reflect.ValueOf(pb), true, false)
-}
-
-// v is a pointer to a struct.
-func setDefaults(v reflect.Value, recur, zeros bool) {
- v = v.Elem()
-
- defaultMu.RLock()
- dm, ok := defaults[v.Type()]
- defaultMu.RUnlock()
- if !ok {
- dm = buildDefaultMessage(v.Type())
- defaultMu.Lock()
- defaults[v.Type()] = dm
- defaultMu.Unlock()
- }
-
- for _, sf := range dm.scalars {
- f := v.Field(sf.index)
- if !f.IsNil() {
- // field already set
- continue
- }
- dv := sf.value
- if dv == nil && !zeros {
- // no explicit default, and don't want to set zeros
- continue
- }
- fptr := f.Addr().Interface() // **T
- // TODO: Consider batching the allocations we do here.
- switch sf.kind {
- case reflect.Bool:
- b := new(bool)
- if dv != nil {
- *b = dv.(bool)
- }
- *(fptr.(**bool)) = b
- case reflect.Float32:
- f := new(float32)
- if dv != nil {
- *f = dv.(float32)
- }
- *(fptr.(**float32)) = f
- case reflect.Float64:
- f := new(float64)
- if dv != nil {
- *f = dv.(float64)
- }
- *(fptr.(**float64)) = f
- case reflect.Int32:
- // might be an enum
- if ft := f.Type(); ft != int32PtrType {
- // enum
- f.Set(reflect.New(ft.Elem()))
- if dv != nil {
- f.Elem().SetInt(int64(dv.(int32)))
- }
- } else {
- // int32 field
- i := new(int32)
- if dv != nil {
- *i = dv.(int32)
- }
- *(fptr.(**int32)) = i
- }
- case reflect.Int64:
- i := new(int64)
- if dv != nil {
- *i = dv.(int64)
- }
- *(fptr.(**int64)) = i
- case reflect.String:
- s := new(string)
- if dv != nil {
- *s = dv.(string)
- }
- *(fptr.(**string)) = s
- case reflect.Uint8:
- // exceptional case: []byte
- var b []byte
- if dv != nil {
- db := dv.([]byte)
- b = make([]byte, len(db))
- copy(b, db)
- } else {
- b = []byte{}
- }
- *(fptr.(*[]byte)) = b
- case reflect.Uint32:
- u := new(uint32)
- if dv != nil {
- *u = dv.(uint32)
- }
- *(fptr.(**uint32)) = u
- case reflect.Uint64:
- u := new(uint64)
- if dv != nil {
- *u = dv.(uint64)
- }
- *(fptr.(**uint64)) = u
- default:
- log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind)
- }
- }
-
- for _, ni := range dm.nested {
- f := v.Field(ni)
- // f is *T or []*T or map[T]*T
- switch f.Kind() {
- case reflect.Ptr:
- if f.IsNil() {
- continue
- }
- setDefaults(f, recur, zeros)
-
- case reflect.Slice:
- for i := 0; i < f.Len(); i++ {
- e := f.Index(i)
- if e.IsNil() {
- continue
- }
- setDefaults(e, recur, zeros)
- }
-
- case reflect.Map:
- for _, k := range f.MapKeys() {
- e := f.MapIndex(k)
- if e.IsNil() {
- continue
- }
- setDefaults(e, recur, zeros)
- }
- }
- }
-}
-
-var (
- // defaults maps a protocol buffer struct type to a slice of the fields,
- // with its scalar fields set to their proto-declared non-zero default values.
- defaultMu sync.RWMutex
- defaults = make(map[reflect.Type]defaultMessage)
-
- int32PtrType = reflect.TypeOf((*int32)(nil))
-)
-
-// defaultMessage represents information about the default values of a message.
-type defaultMessage struct {
- scalars []scalarField
- nested []int // struct field index of nested messages
-}
-
-type scalarField struct {
- index int // struct field index
- kind reflect.Kind // element type (the T in *T or []T)
- value interface{} // the proto-declared default value, or nil
-}
-
-// t is a struct type.
-func buildDefaultMessage(t reflect.Type) (dm defaultMessage) {
- sprop := GetProperties(t)
- for _, prop := range sprop.Prop {
- fi, ok := sprop.decoderTags.get(prop.Tag)
- if !ok {
- // XXX_unrecognized
- continue
- }
- ft := t.Field(fi).Type
-
- sf, nested, err := fieldDefault(ft, prop)
- switch {
- case err != nil:
- log.Print(err)
- case nested:
- dm.nested = append(dm.nested, fi)
- case sf != nil:
- sf.index = fi
- dm.scalars = append(dm.scalars, *sf)
- }
- }
-
- return dm
-}
-
-// fieldDefault returns the scalarField for field type ft.
-// sf will be nil if the field can not have a default.
-// nestedMessage will be true if this is a nested message.
-// Note that sf.index is not set on return.
-func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) {
- var canHaveDefault bool
- switch ft.Kind() {
- case reflect.Ptr:
- if ft.Elem().Kind() == reflect.Struct {
- nestedMessage = true
- } else {
- canHaveDefault = true // proto2 scalar field
- }
-
- case reflect.Slice:
- switch ft.Elem().Kind() {
- case reflect.Ptr:
- nestedMessage = true // repeated message
- case reflect.Uint8:
- canHaveDefault = true // bytes field
- }
-
- case reflect.Map:
- if ft.Elem().Kind() == reflect.Ptr {
- nestedMessage = true // map with message values
- }
- }
-
- if !canHaveDefault {
- if nestedMessage {
- return nil, true, nil
- }
- return nil, false, nil
- }
-
- // We now know that ft is a pointer or slice.
- sf = &scalarField{kind: ft.Elem().Kind()}
-
- // scalar fields without defaults
- if !prop.HasDefault {
- return sf, false, nil
- }
-
- // a scalar field: either *T or []byte
- switch ft.Elem().Kind() {
- case reflect.Bool:
- x, err := strconv.ParseBool(prop.Default)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err)
- }
- sf.value = x
- case reflect.Float32:
- x, err := strconv.ParseFloat(prop.Default, 32)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err)
- }
- sf.value = float32(x)
- case reflect.Float64:
- x, err := strconv.ParseFloat(prop.Default, 64)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err)
- }
- sf.value = x
- case reflect.Int32:
- x, err := strconv.ParseInt(prop.Default, 10, 32)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err)
- }
- sf.value = int32(x)
- case reflect.Int64:
- x, err := strconv.ParseInt(prop.Default, 10, 64)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err)
- }
- sf.value = x
- case reflect.String:
- sf.value = prop.Default
- case reflect.Uint8:
- // []byte (not *uint8)
- sf.value = []byte(prop.Default)
- case reflect.Uint32:
- x, err := strconv.ParseUint(prop.Default, 10, 32)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err)
- }
- sf.value = uint32(x)
- case reflect.Uint64:
- x, err := strconv.ParseUint(prop.Default, 10, 64)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err)
- }
- sf.value = x
- default:
- return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind())
- }
-
- return sf, false, nil
-}
-
-// mapKeys returns a sort.Interface to be used for sorting the map keys.
-// Map fields may have key types of non-float scalars, strings and enums.
-func mapKeys(vs []reflect.Value) sort.Interface {
- s := mapKeySorter{vs: vs}
-
- // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps.
- if len(vs) == 0 {
- return s
- }
- switch vs[0].Kind() {
- case reflect.Int32, reflect.Int64:
- s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() }
- case reflect.Uint32, reflect.Uint64:
- s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() }
- case reflect.Bool:
- s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true
- case reflect.String:
- s.less = func(a, b reflect.Value) bool { return a.String() < b.String() }
- default:
- panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind()))
- }
-
- return s
-}
-
-type mapKeySorter struct {
- vs []reflect.Value
- less func(a, b reflect.Value) bool
-}
-
-func (s mapKeySorter) Len() int { return len(s.vs) }
-func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] }
-func (s mapKeySorter) Less(i, j int) bool {
- return s.less(s.vs[i], s.vs[j])
-}
-
-// isProto3Zero reports whether v is a zero proto3 value.
-func isProto3Zero(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Bool:
- return !v.Bool()
- case reflect.Int32, reflect.Int64:
- return v.Int() == 0
- case reflect.Uint32, reflect.Uint64:
- return v.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return v.Float() == 0
- case reflect.String:
- return v.String() == ""
- }
- return false
-}
-
-// ProtoPackageIsVersion2 is referenced from generated protocol buffer files
-// to assert that that code is compatible with this version of the proto package.
-const ProtoPackageIsVersion2 = true
-
-// ProtoPackageIsVersion1 is referenced from generated protocol buffer files
-// to assert that that code is compatible with this version of the proto package.
-const ProtoPackageIsVersion1 = true
-
-// InternalMessageInfo is a type used internally by generated .pb.go files.
-// This type is not intended to be used by non-generated code.
-// This type is not subject to any compatibility guarantee.
-type InternalMessageInfo struct {
- marshal *marshalInfo
- unmarshal *unmarshalInfo
- merge *mergeInfo
- discard *discardInfo
-}
diff --git a/vendor/github.com/golang/protobuf/proto/message_set.go b/vendor/github.com/golang/protobuf/proto/message_set.go
deleted file mode 100644
index 3b6ca41d..00000000
--- a/vendor/github.com/golang/protobuf/proto/message_set.go
+++ /dev/null
@@ -1,314 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Support for message sets.
- */
-
-import (
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- "reflect"
- "sort"
- "sync"
-)
-
-// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID.
-// A message type ID is required for storing a protocol buffer in a message set.
-var errNoMessageTypeID = errors.New("proto does not have a message type ID")
-
-// The first two types (_MessageSet_Item and messageSet)
-// model what the protocol compiler produces for the following protocol message:
-// message MessageSet {
-// repeated group Item = 1 {
-// required int32 type_id = 2;
-// required string message = 3;
-// };
-// }
-// That is the MessageSet wire format. We can't use a proto to generate these
-// because that would introduce a circular dependency between it and this package.
-
-type _MessageSet_Item struct {
- TypeId *int32 `protobuf:"varint,2,req,name=type_id"`
- Message []byte `protobuf:"bytes,3,req,name=message"`
-}
-
-type messageSet struct {
- Item []*_MessageSet_Item `protobuf:"group,1,rep"`
- XXX_unrecognized []byte
- // TODO: caching?
-}
-
-// Make sure messageSet is a Message.
-var _ Message = (*messageSet)(nil)
-
-// messageTypeIder is an interface satisfied by a protocol buffer type
-// that may be stored in a MessageSet.
-type messageTypeIder interface {
- MessageTypeId() int32
-}
-
-func (ms *messageSet) find(pb Message) *_MessageSet_Item {
- mti, ok := pb.(messageTypeIder)
- if !ok {
- return nil
- }
- id := mti.MessageTypeId()
- for _, item := range ms.Item {
- if *item.TypeId == id {
- return item
- }
- }
- return nil
-}
-
-func (ms *messageSet) Has(pb Message) bool {
- return ms.find(pb) != nil
-}
-
-func (ms *messageSet) Unmarshal(pb Message) error {
- if item := ms.find(pb); item != nil {
- return Unmarshal(item.Message, pb)
- }
- if _, ok := pb.(messageTypeIder); !ok {
- return errNoMessageTypeID
- }
- return nil // TODO: return error instead?
-}
-
-func (ms *messageSet) Marshal(pb Message) error {
- msg, err := Marshal(pb)
- if err != nil {
- return err
- }
- if item := ms.find(pb); item != nil {
- // reuse existing item
- item.Message = msg
- return nil
- }
-
- mti, ok := pb.(messageTypeIder)
- if !ok {
- return errNoMessageTypeID
- }
-
- mtid := mti.MessageTypeId()
- ms.Item = append(ms.Item, &_MessageSet_Item{
- TypeId: &mtid,
- Message: msg,
- })
- return nil
-}
-
-func (ms *messageSet) Reset() { *ms = messageSet{} }
-func (ms *messageSet) String() string { return CompactTextString(ms) }
-func (*messageSet) ProtoMessage() {}
-
-// Support for the message_set_wire_format message option.
-
-func skipVarint(buf []byte) []byte {
- i := 0
- for ; buf[i]&0x80 != 0; i++ {
- }
- return buf[i+1:]
-}
-
-// MarshalMessageSet encodes the extension map represented by m in the message set wire format.
-// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option.
-func MarshalMessageSet(exts interface{}) ([]byte, error) {
- return marshalMessageSet(exts, false)
-}
-
-// marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal.
-func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) {
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- var u marshalInfo
- siz := u.sizeMessageSet(exts)
- b := make([]byte, 0, siz)
- return u.appendMessageSet(b, exts, deterministic)
-
- case map[int32]Extension:
- // This is an old-style extension map.
- // Wrap it in a new-style XXX_InternalExtensions.
- ie := XXX_InternalExtensions{
- p: &struct {
- mu sync.Mutex
- extensionMap map[int32]Extension
- }{
- extensionMap: exts,
- },
- }
-
- var u marshalInfo
- siz := u.sizeMessageSet(&ie)
- b := make([]byte, 0, siz)
- return u.appendMessageSet(b, &ie, deterministic)
-
- default:
- return nil, errors.New("proto: not an extension map")
- }
-}
-
-// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format.
-// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option.
-func UnmarshalMessageSet(buf []byte, exts interface{}) error {
- var m map[int32]Extension
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- m = exts.extensionsWrite()
- case map[int32]Extension:
- m = exts
- default:
- return errors.New("proto: not an extension map")
- }
-
- ms := new(messageSet)
- if err := Unmarshal(buf, ms); err != nil {
- return err
- }
- for _, item := range ms.Item {
- id := *item.TypeId
- msg := item.Message
-
- // Restore wire type and field number varint, plus length varint.
- // Be careful to preserve duplicate items.
- b := EncodeVarint(uint64(id)<<3 | WireBytes)
- if ext, ok := m[id]; ok {
- // Existing data; rip off the tag and length varint
- // so we join the new data correctly.
- // We can assume that ext.enc is set because we are unmarshaling.
- o := ext.enc[len(b):] // skip wire type and field number
- _, n := DecodeVarint(o) // calculate length of length varint
- o = o[n:] // skip length varint
- msg = append(o, msg...) // join old data and new data
- }
- b = append(b, EncodeVarint(uint64(len(msg)))...)
- b = append(b, msg...)
-
- m[id] = Extension{enc: b}
- }
- return nil
-}
-
-// MarshalMessageSetJSON encodes the extension map represented by m in JSON format.
-// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
-func MarshalMessageSetJSON(exts interface{}) ([]byte, error) {
- var m map[int32]Extension
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- var mu sync.Locker
- m, mu = exts.extensionsRead()
- if m != nil {
- // Keep the extensions map locked until we're done marshaling to prevent
- // races between marshaling and unmarshaling the lazily-{en,de}coded
- // values.
- mu.Lock()
- defer mu.Unlock()
- }
- case map[int32]Extension:
- m = exts
- default:
- return nil, errors.New("proto: not an extension map")
- }
- var b bytes.Buffer
- b.WriteByte('{')
-
- // Process the map in key order for deterministic output.
- ids := make([]int32, 0, len(m))
- for id := range m {
- ids = append(ids, id)
- }
- sort.Sort(int32Slice(ids)) // int32Slice defined in text.go
-
- for i, id := range ids {
- ext := m[id]
- msd, ok := messageSetMap[id]
- if !ok {
- // Unknown type; we can't render it, so skip it.
- continue
- }
-
- if i > 0 && b.Len() > 1 {
- b.WriteByte(',')
- }
-
- fmt.Fprintf(&b, `"[%s]":`, msd.name)
-
- x := ext.value
- if x == nil {
- x = reflect.New(msd.t.Elem()).Interface()
- if err := Unmarshal(ext.enc, x.(Message)); err != nil {
- return nil, err
- }
- }
- d, err := json.Marshal(x)
- if err != nil {
- return nil, err
- }
- b.Write(d)
- }
- b.WriteByte('}')
- return b.Bytes(), nil
-}
-
-// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format.
-// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
-func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error {
- // Common-case fast path.
- if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) {
- return nil
- }
-
- // This is fairly tricky, and it's not clear that it is needed.
- return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented")
-}
-
-// A global registry of types that can be used in a MessageSet.
-
-var messageSetMap = make(map[int32]messageSetDesc)
-
-type messageSetDesc struct {
- t reflect.Type // pointer to struct
- name string
-}
-
-// RegisterMessageSetType is called from the generated code.
-func RegisterMessageSetType(m Message, fieldNum int32, name string) {
- messageSetMap[fieldNum] = messageSetDesc{
- t: reflect.TypeOf(m),
- name: name,
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
deleted file mode 100644
index b6cad908..00000000
--- a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
+++ /dev/null
@@ -1,357 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2012 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// +build purego appengine js
-
-// This file contains an implementation of proto field accesses using package reflect.
-// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can
-// be used on App Engine.
-
-package proto
-
-import (
- "reflect"
- "sync"
-)
-
-const unsafeAllowed = false
-
-// A field identifies a field in a struct, accessible from a pointer.
-// In this implementation, a field is identified by the sequence of field indices
-// passed to reflect's FieldByIndex.
-type field []int
-
-// toField returns a field equivalent to the given reflect field.
-func toField(f *reflect.StructField) field {
- return f.Index
-}
-
-// invalidField is an invalid field identifier.
-var invalidField = field(nil)
-
-// zeroField is a noop when calling pointer.offset.
-var zeroField = field([]int{})
-
-// IsValid reports whether the field identifier is valid.
-func (f field) IsValid() bool { return f != nil }
-
-// The pointer type is for the table-driven decoder.
-// The implementation here uses a reflect.Value of pointer type to
-// create a generic pointer. In pointer_unsafe.go we use unsafe
-// instead of reflect to implement the same (but faster) interface.
-type pointer struct {
- v reflect.Value
-}
-
-// toPointer converts an interface of pointer type to a pointer
-// that points to the same target.
-func toPointer(i *Message) pointer {
- return pointer{v: reflect.ValueOf(*i)}
-}
-
-// toAddrPointer converts an interface to a pointer that points to
-// the interface data.
-func toAddrPointer(i *interface{}, isptr bool) pointer {
- v := reflect.ValueOf(*i)
- u := reflect.New(v.Type())
- u.Elem().Set(v)
- return pointer{v: u}
-}
-
-// valToPointer converts v to a pointer. v must be of pointer type.
-func valToPointer(v reflect.Value) pointer {
- return pointer{v: v}
-}
-
-// offset converts from a pointer to a structure to a pointer to
-// one of its fields.
-func (p pointer) offset(f field) pointer {
- return pointer{v: p.v.Elem().FieldByIndex(f).Addr()}
-}
-
-func (p pointer) isNil() bool {
- return p.v.IsNil()
-}
-
-// grow updates the slice s in place to make it one element longer.
-// s must be addressable.
-// Returns the (addressable) new element.
-func grow(s reflect.Value) reflect.Value {
- n, m := s.Len(), s.Cap()
- if n < m {
- s.SetLen(n + 1)
- } else {
- s.Set(reflect.Append(s, reflect.Zero(s.Type().Elem())))
- }
- return s.Index(n)
-}
-
-func (p pointer) toInt64() *int64 {
- return p.v.Interface().(*int64)
-}
-func (p pointer) toInt64Ptr() **int64 {
- return p.v.Interface().(**int64)
-}
-func (p pointer) toInt64Slice() *[]int64 {
- return p.v.Interface().(*[]int64)
-}
-
-var int32ptr = reflect.TypeOf((*int32)(nil))
-
-func (p pointer) toInt32() *int32 {
- return p.v.Convert(int32ptr).Interface().(*int32)
-}
-
-// The toInt32Ptr/Slice methods don't work because of enums.
-// Instead, we must use set/get methods for the int32ptr/slice case.
-/*
- func (p pointer) toInt32Ptr() **int32 {
- return p.v.Interface().(**int32)
-}
- func (p pointer) toInt32Slice() *[]int32 {
- return p.v.Interface().(*[]int32)
-}
-*/
-func (p pointer) getInt32Ptr() *int32 {
- if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
- // raw int32 type
- return p.v.Elem().Interface().(*int32)
- }
- // an enum
- return p.v.Elem().Convert(int32PtrType).Interface().(*int32)
-}
-func (p pointer) setInt32Ptr(v int32) {
- // Allocate value in a *int32. Possibly convert that to a *enum.
- // Then assign it to a **int32 or **enum.
- // Note: we can convert *int32 to *enum, but we can't convert
- // **int32 to **enum!
- p.v.Elem().Set(reflect.ValueOf(&v).Convert(p.v.Type().Elem()))
-}
-
-// getInt32Slice copies []int32 from p as a new slice.
-// This behavior differs from the implementation in pointer_unsafe.go.
-func (p pointer) getInt32Slice() []int32 {
- if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
- // raw int32 type
- return p.v.Elem().Interface().([]int32)
- }
- // an enum
- // Allocate a []int32, then assign []enum's values into it.
- // Note: we can't convert []enum to []int32.
- slice := p.v.Elem()
- s := make([]int32, slice.Len())
- for i := 0; i < slice.Len(); i++ {
- s[i] = int32(slice.Index(i).Int())
- }
- return s
-}
-
-// setInt32Slice copies []int32 into p as a new slice.
-// This behavior differs from the implementation in pointer_unsafe.go.
-func (p pointer) setInt32Slice(v []int32) {
- if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
- // raw int32 type
- p.v.Elem().Set(reflect.ValueOf(v))
- return
- }
- // an enum
- // Allocate a []enum, then assign []int32's values into it.
- // Note: we can't convert []enum to []int32.
- slice := reflect.MakeSlice(p.v.Type().Elem(), len(v), cap(v))
- for i, x := range v {
- slice.Index(i).SetInt(int64(x))
- }
- p.v.Elem().Set(slice)
-}
-func (p pointer) appendInt32Slice(v int32) {
- grow(p.v.Elem()).SetInt(int64(v))
-}
-
-func (p pointer) toUint64() *uint64 {
- return p.v.Interface().(*uint64)
-}
-func (p pointer) toUint64Ptr() **uint64 {
- return p.v.Interface().(**uint64)
-}
-func (p pointer) toUint64Slice() *[]uint64 {
- return p.v.Interface().(*[]uint64)
-}
-func (p pointer) toUint32() *uint32 {
- return p.v.Interface().(*uint32)
-}
-func (p pointer) toUint32Ptr() **uint32 {
- return p.v.Interface().(**uint32)
-}
-func (p pointer) toUint32Slice() *[]uint32 {
- return p.v.Interface().(*[]uint32)
-}
-func (p pointer) toBool() *bool {
- return p.v.Interface().(*bool)
-}
-func (p pointer) toBoolPtr() **bool {
- return p.v.Interface().(**bool)
-}
-func (p pointer) toBoolSlice() *[]bool {
- return p.v.Interface().(*[]bool)
-}
-func (p pointer) toFloat64() *float64 {
- return p.v.Interface().(*float64)
-}
-func (p pointer) toFloat64Ptr() **float64 {
- return p.v.Interface().(**float64)
-}
-func (p pointer) toFloat64Slice() *[]float64 {
- return p.v.Interface().(*[]float64)
-}
-func (p pointer) toFloat32() *float32 {
- return p.v.Interface().(*float32)
-}
-func (p pointer) toFloat32Ptr() **float32 {
- return p.v.Interface().(**float32)
-}
-func (p pointer) toFloat32Slice() *[]float32 {
- return p.v.Interface().(*[]float32)
-}
-func (p pointer) toString() *string {
- return p.v.Interface().(*string)
-}
-func (p pointer) toStringPtr() **string {
- return p.v.Interface().(**string)
-}
-func (p pointer) toStringSlice() *[]string {
- return p.v.Interface().(*[]string)
-}
-func (p pointer) toBytes() *[]byte {
- return p.v.Interface().(*[]byte)
-}
-func (p pointer) toBytesSlice() *[][]byte {
- return p.v.Interface().(*[][]byte)
-}
-func (p pointer) toExtensions() *XXX_InternalExtensions {
- return p.v.Interface().(*XXX_InternalExtensions)
-}
-func (p pointer) toOldExtensions() *map[int32]Extension {
- return p.v.Interface().(*map[int32]Extension)
-}
-func (p pointer) getPointer() pointer {
- return pointer{v: p.v.Elem()}
-}
-func (p pointer) setPointer(q pointer) {
- p.v.Elem().Set(q.v)
-}
-func (p pointer) appendPointer(q pointer) {
- grow(p.v.Elem()).Set(q.v)
-}
-
-// getPointerSlice copies []*T from p as a new []pointer.
-// This behavior differs from the implementation in pointer_unsafe.go.
-func (p pointer) getPointerSlice() []pointer {
- if p.v.IsNil() {
- return nil
- }
- n := p.v.Elem().Len()
- s := make([]pointer, n)
- for i := 0; i < n; i++ {
- s[i] = pointer{v: p.v.Elem().Index(i)}
- }
- return s
-}
-
-// setPointerSlice copies []pointer into p as a new []*T.
-// This behavior differs from the implementation in pointer_unsafe.go.
-func (p pointer) setPointerSlice(v []pointer) {
- if v == nil {
- p.v.Elem().Set(reflect.New(p.v.Elem().Type()).Elem())
- return
- }
- s := reflect.MakeSlice(p.v.Elem().Type(), 0, len(v))
- for _, p := range v {
- s = reflect.Append(s, p.v)
- }
- p.v.Elem().Set(s)
-}
-
-// getInterfacePointer returns a pointer that points to the
-// interface data of the interface pointed by p.
-func (p pointer) getInterfacePointer() pointer {
- if p.v.Elem().IsNil() {
- return pointer{v: p.v.Elem()}
- }
- return pointer{v: p.v.Elem().Elem().Elem().Field(0).Addr()} // *interface -> interface -> *struct -> struct
-}
-
-func (p pointer) asPointerTo(t reflect.Type) reflect.Value {
- // TODO: check that p.v.Type().Elem() == t?
- return p.v
-}
-
-func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- return *p
-}
-func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- *p = v
-}
-func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- return *p
-}
-func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- *p = v
-}
-func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- return *p
-}
-func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- *p = v
-}
-func atomicLoadDiscardInfo(p **discardInfo) *discardInfo {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- return *p
-}
-func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) {
- atomicLock.Lock()
- defer atomicLock.Unlock()
- *p = v
-}
-
-var atomicLock sync.Mutex
diff --git a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
deleted file mode 100644
index d55a335d..00000000
--- a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
+++ /dev/null
@@ -1,308 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2012 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// +build !purego,!appengine,!js
-
-// This file contains the implementation of the proto field accesses using package unsafe.
-
-package proto
-
-import (
- "reflect"
- "sync/atomic"
- "unsafe"
-)
-
-const unsafeAllowed = true
-
-// A field identifies a field in a struct, accessible from a pointer.
-// In this implementation, a field is identified by its byte offset from the start of the struct.
-type field uintptr
-
-// toField returns a field equivalent to the given reflect field.
-func toField(f *reflect.StructField) field {
- return field(f.Offset)
-}
-
-// invalidField is an invalid field identifier.
-const invalidField = ^field(0)
-
-// zeroField is a noop when calling pointer.offset.
-const zeroField = field(0)
-
-// IsValid reports whether the field identifier is valid.
-func (f field) IsValid() bool {
- return f != invalidField
-}
-
-// The pointer type below is for the new table-driven encoder/decoder.
-// The implementation here uses unsafe.Pointer to create a generic pointer.
-// In pointer_reflect.go we use reflect instead of unsafe to implement
-// the same (but slower) interface.
-type pointer struct {
- p unsafe.Pointer
-}
-
-// size of pointer
-var ptrSize = unsafe.Sizeof(uintptr(0))
-
-// toPointer converts an interface of pointer type to a pointer
-// that points to the same target.
-func toPointer(i *Message) pointer {
- // Super-tricky - read pointer out of data word of interface value.
- // Saves ~25ns over the equivalent:
- // return valToPointer(reflect.ValueOf(*i))
- return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
-}
-
-// toAddrPointer converts an interface to a pointer that points to
-// the interface data.
-func toAddrPointer(i *interface{}, isptr bool) pointer {
- // Super-tricky - read or get the address of data word of interface value.
- if isptr {
- // The interface is of pointer type, thus it is a direct interface.
- // The data word is the pointer data itself. We take its address.
- return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)}
- }
- // The interface is not of pointer type. The data word is the pointer
- // to the data.
- return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
-}
-
-// valToPointer converts v to a pointer. v must be of pointer type.
-func valToPointer(v reflect.Value) pointer {
- return pointer{p: unsafe.Pointer(v.Pointer())}
-}
-
-// offset converts from a pointer to a structure to a pointer to
-// one of its fields.
-func (p pointer) offset(f field) pointer {
- // For safety, we should panic if !f.IsValid, however calling panic causes
- // this to no longer be inlineable, which is a serious performance cost.
- /*
- if !f.IsValid() {
- panic("invalid field")
- }
- */
- return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))}
-}
-
-func (p pointer) isNil() bool {
- return p.p == nil
-}
-
-func (p pointer) toInt64() *int64 {
- return (*int64)(p.p)
-}
-func (p pointer) toInt64Ptr() **int64 {
- return (**int64)(p.p)
-}
-func (p pointer) toInt64Slice() *[]int64 {
- return (*[]int64)(p.p)
-}
-func (p pointer) toInt32() *int32 {
- return (*int32)(p.p)
-}
-
-// See pointer_reflect.go for why toInt32Ptr/Slice doesn't exist.
-/*
- func (p pointer) toInt32Ptr() **int32 {
- return (**int32)(p.p)
- }
- func (p pointer) toInt32Slice() *[]int32 {
- return (*[]int32)(p.p)
- }
-*/
-func (p pointer) getInt32Ptr() *int32 {
- return *(**int32)(p.p)
-}
-func (p pointer) setInt32Ptr(v int32) {
- *(**int32)(p.p) = &v
-}
-
-// getInt32Slice loads a []int32 from p.
-// The value returned is aliased with the original slice.
-// This behavior differs from the implementation in pointer_reflect.go.
-func (p pointer) getInt32Slice() []int32 {
- return *(*[]int32)(p.p)
-}
-
-// setInt32Slice stores a []int32 to p.
-// The value set is aliased with the input slice.
-// This behavior differs from the implementation in pointer_reflect.go.
-func (p pointer) setInt32Slice(v []int32) {
- *(*[]int32)(p.p) = v
-}
-
-// TODO: Can we get rid of appendInt32Slice and use setInt32Slice instead?
-func (p pointer) appendInt32Slice(v int32) {
- s := (*[]int32)(p.p)
- *s = append(*s, v)
-}
-
-func (p pointer) toUint64() *uint64 {
- return (*uint64)(p.p)
-}
-func (p pointer) toUint64Ptr() **uint64 {
- return (**uint64)(p.p)
-}
-func (p pointer) toUint64Slice() *[]uint64 {
- return (*[]uint64)(p.p)
-}
-func (p pointer) toUint32() *uint32 {
- return (*uint32)(p.p)
-}
-func (p pointer) toUint32Ptr() **uint32 {
- return (**uint32)(p.p)
-}
-func (p pointer) toUint32Slice() *[]uint32 {
- return (*[]uint32)(p.p)
-}
-func (p pointer) toBool() *bool {
- return (*bool)(p.p)
-}
-func (p pointer) toBoolPtr() **bool {
- return (**bool)(p.p)
-}
-func (p pointer) toBoolSlice() *[]bool {
- return (*[]bool)(p.p)
-}
-func (p pointer) toFloat64() *float64 {
- return (*float64)(p.p)
-}
-func (p pointer) toFloat64Ptr() **float64 {
- return (**float64)(p.p)
-}
-func (p pointer) toFloat64Slice() *[]float64 {
- return (*[]float64)(p.p)
-}
-func (p pointer) toFloat32() *float32 {
- return (*float32)(p.p)
-}
-func (p pointer) toFloat32Ptr() **float32 {
- return (**float32)(p.p)
-}
-func (p pointer) toFloat32Slice() *[]float32 {
- return (*[]float32)(p.p)
-}
-func (p pointer) toString() *string {
- return (*string)(p.p)
-}
-func (p pointer) toStringPtr() **string {
- return (**string)(p.p)
-}
-func (p pointer) toStringSlice() *[]string {
- return (*[]string)(p.p)
-}
-func (p pointer) toBytes() *[]byte {
- return (*[]byte)(p.p)
-}
-func (p pointer) toBytesSlice() *[][]byte {
- return (*[][]byte)(p.p)
-}
-func (p pointer) toExtensions() *XXX_InternalExtensions {
- return (*XXX_InternalExtensions)(p.p)
-}
-func (p pointer) toOldExtensions() *map[int32]Extension {
- return (*map[int32]Extension)(p.p)
-}
-
-// getPointerSlice loads []*T from p as a []pointer.
-// The value returned is aliased with the original slice.
-// This behavior differs from the implementation in pointer_reflect.go.
-func (p pointer) getPointerSlice() []pointer {
- // Super-tricky - p should point to a []*T where T is a
- // message type. We load it as []pointer.
- return *(*[]pointer)(p.p)
-}
-
-// setPointerSlice stores []pointer into p as a []*T.
-// The value set is aliased with the input slice.
-// This behavior differs from the implementation in pointer_reflect.go.
-func (p pointer) setPointerSlice(v []pointer) {
- // Super-tricky - p should point to a []*T where T is a
- // message type. We store it as []pointer.
- *(*[]pointer)(p.p) = v
-}
-
-// getPointer loads the pointer at p and returns it.
-func (p pointer) getPointer() pointer {
- return pointer{p: *(*unsafe.Pointer)(p.p)}
-}
-
-// setPointer stores the pointer q at p.
-func (p pointer) setPointer(q pointer) {
- *(*unsafe.Pointer)(p.p) = q.p
-}
-
-// append q to the slice pointed to by p.
-func (p pointer) appendPointer(q pointer) {
- s := (*[]unsafe.Pointer)(p.p)
- *s = append(*s, q.p)
-}
-
-// getInterfacePointer returns a pointer that points to the
-// interface data of the interface pointed by p.
-func (p pointer) getInterfacePointer() pointer {
- // Super-tricky - read pointer out of data word of interface value.
- return pointer{p: (*(*[2]unsafe.Pointer)(p.p))[1]}
-}
-
-// asPointerTo returns a reflect.Value that is a pointer to an
-// object of type t stored at p.
-func (p pointer) asPointerTo(t reflect.Type) reflect.Value {
- return reflect.NewAt(t, p.p)
-}
-
-func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo {
- return (*unmarshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
-}
-func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) {
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
-}
-func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo {
- return (*marshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
-}
-func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) {
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
-}
-func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo {
- return (*mergeInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
-}
-func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) {
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
-}
-func atomicLoadDiscardInfo(p **discardInfo) *discardInfo {
- return (*discardInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
-}
-func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) {
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
-}
diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go
index f710adab..dcdc2202 100644
--- a/vendor/github.com/golang/protobuf/proto/properties.go
+++ b/vendor/github.com/golang/protobuf/proto/properties.go
@@ -1,163 +1,104 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
package proto
-/*
- * Routines for encoding data into the wire format for protocol buffers.
- */
-
import (
"fmt"
- "log"
- "os"
"reflect"
- "sort"
"strconv"
"strings"
"sync"
-)
-
-const debug bool = false
-// Constants that identify the encoding of a value on the wire.
-const (
- WireVarint = 0
- WireFixed64 = 1
- WireBytes = 2
- WireStartGroup = 3
- WireEndGroup = 4
- WireFixed32 = 5
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/runtime/protoimpl"
)
-// tagMap is an optimization over map[int]int for typical protocol buffer
-// use-cases. Encoded protocol buffers are often in tag order with small tag
-// numbers.
-type tagMap struct {
- fastTags []int
- slowTags map[int]int
-}
-
-// tagMapFastLimit is the upper bound on the tag number that will be stored in
-// the tagMap slice rather than its map.
-const tagMapFastLimit = 1024
-
-func (p *tagMap) get(t int) (int, bool) {
- if t > 0 && t < tagMapFastLimit {
- if t >= len(p.fastTags) {
- return 0, false
- }
- fi := p.fastTags[t]
- return fi, fi >= 0
- }
- fi, ok := p.slowTags[t]
- return fi, ok
-}
-
-func (p *tagMap) put(t int, fi int) {
- if t > 0 && t < tagMapFastLimit {
- for len(p.fastTags) < t+1 {
- p.fastTags = append(p.fastTags, -1)
- }
- p.fastTags[t] = fi
- return
- }
- if p.slowTags == nil {
- p.slowTags = make(map[int]int)
- }
- p.slowTags[t] = fi
-}
-
-// StructProperties represents properties for all the fields of a struct.
-// decoderTags and decoderOrigNames should only be used by the decoder.
+// StructProperties represents protocol buffer type information for a
+// generated protobuf message in the open-struct API.
+//
+// Deprecated: Do not use.
type StructProperties struct {
- Prop []*Properties // properties for each field
- reqCount int // required count
- decoderTags tagMap // map from proto tag to struct field number
- decoderOrigNames map[string]int // map from original name to struct field number
- order []int // list of struct field numbers in tag order
+ // Prop are the properties for each field.
+ //
+ // Fields belonging to a oneof are stored in OneofTypes instead, with a
+ // single Properties representing the parent oneof held here.
+ //
+ // The order of Prop matches the order of fields in the Go struct.
+ // Struct fields that are not related to protobufs have a "XXX_" prefix
+ // in the Properties.Name and must be ignored by the user.
+ Prop []*Properties
// OneofTypes contains information about the oneof fields in this message.
- // It is keyed by the original name of a field.
+ // It is keyed by the protobuf field name.
OneofTypes map[string]*OneofProperties
}
-// OneofProperties represents information about a specific field in a oneof.
-type OneofProperties struct {
- Type reflect.Type // pointer to generated struct type for this oneof field
- Field int // struct field number of the containing oneof in the message
- Prop *Properties
-}
-
-// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec.
-// See encode.go, (*Buffer).enc_struct.
-
-func (sp *StructProperties) Len() int { return len(sp.order) }
-func (sp *StructProperties) Less(i, j int) bool {
- return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag
-}
-func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] }
-
-// Properties represents the protocol-specific behavior of a single struct field.
+// Properties represents the type information for a protobuf message field.
+//
+// Deprecated: Do not use.
type Properties struct {
- Name string // name of the field, for error messages
- OrigName string // original name before protocol compiler (always set)
- JSONName string // name to use for JSON; determined by protoc
- Wire string
+ // Name is a placeholder name with little meaningful semantic value.
+ // If the name has an "XXX_" prefix, the entire Properties must be ignored.
+ Name string
+ // OrigName is the protobuf field name or oneof name.
+ OrigName string
+ // JSONName is the JSON name for the protobuf field.
+ JSONName string
+ // Enum is a placeholder name for enums.
+ // For historical reasons, this is neither the Go name for the enum,
+ // nor the protobuf name for the enum.
+ Enum string // Deprecated: Do not use.
+ // Weak contains the full name of the weakly referenced message.
+ Weak string
+ // Wire is a string representation of the wire type.
+ Wire string
+ // WireType is the protobuf wire type for the field.
WireType int
- Tag int
+ // Tag is the protobuf field number.
+ Tag int
+ // Required reports whether this is a required field.
Required bool
+ // Optional reports whether this is a optional field.
Optional bool
+ // Repeated reports whether this is a repeated field.
Repeated bool
- Packed bool // relevant for repeated primitives only
- Enum string // set for enum types only
- proto3 bool // whether this is known to be a proto3 field; set for []byte only
- oneof bool // whether this is a oneof field
-
- Default string // default value
- HasDefault bool // whether an explicit default was provided
-
- stype reflect.Type // set for struct types only
- sprop *StructProperties // set for struct types only
+ // Packed reports whether this is a packed repeated field of scalars.
+ Packed bool
+ // Proto3 reports whether this field operates under the proto3 syntax.
+ Proto3 bool
+ // Oneof reports whether this field belongs within a oneof.
+ Oneof bool
+
+ // Default is the default value in string form.
+ Default string
+ // HasDefault reports whether the field has a default value.
+ HasDefault bool
+
+ // MapKeyProp is the properties for the key field for a map field.
+ MapKeyProp *Properties
+ // MapValProp is the properties for the value field for a map field.
+ MapValProp *Properties
+}
- mtype reflect.Type // set for map types only
- mkeyprop *Properties // set for map types only
- mvalprop *Properties // set for map types only
+// OneofProperties represents the type information for a protobuf oneof.
+//
+// Deprecated: Do not use.
+type OneofProperties struct {
+ // Type is a pointer to the generated wrapper type for the field value.
+ // This is nil for messages that are not in the open-struct API.
+ Type reflect.Type
+ // Field is the index into StructProperties.Prop for the containing oneof.
+ Field int
+ // Prop is the properties for the field.
+ Prop *Properties
}
// String formats the properties in the protobuf struct field tag style.
func (p *Properties) String() string {
s := p.Wire
- s += ","
- s += strconv.Itoa(p.Tag)
+ s += "," + strconv.Itoa(p.Tag)
if p.Required {
s += ",req"
}
@@ -171,18 +112,21 @@ func (p *Properties) String() string {
s += ",packed"
}
s += ",name=" + p.OrigName
- if p.JSONName != p.OrigName {
+ if p.JSONName != "" {
s += ",json=" + p.JSONName
}
- if p.proto3 {
+ if len(p.Enum) > 0 {
+ s += ",enum=" + p.Enum
+ }
+ if len(p.Weak) > 0 {
+ s += ",weak=" + p.Weak
+ }
+ if p.Proto3 {
s += ",proto3"
}
- if p.oneof {
+ if p.Oneof {
s += ",oneof"
}
- if len(p.Enum) > 0 {
- s += ",enum=" + p.Enum
- }
if p.HasDefault {
s += ",def=" + p.Default
}
@@ -190,355 +134,173 @@ func (p *Properties) String() string {
}
// Parse populates p by parsing a string in the protobuf struct field tag style.
-func (p *Properties) Parse(s string) {
- // "bytes,49,opt,name=foo,def=hello!"
- fields := strings.Split(s, ",") // breaks def=, but handled below.
- if len(fields) < 2 {
- fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s)
- return
- }
-
- p.Wire = fields[0]
- switch p.Wire {
- case "varint":
- p.WireType = WireVarint
- case "fixed32":
- p.WireType = WireFixed32
- case "fixed64":
- p.WireType = WireFixed64
- case "zigzag32":
- p.WireType = WireVarint
- case "zigzag64":
- p.WireType = WireVarint
- case "bytes", "group":
- p.WireType = WireBytes
- // no numeric converter for non-numeric types
- default:
- fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s)
- return
- }
-
- var err error
- p.Tag, err = strconv.Atoi(fields[1])
- if err != nil {
- return
- }
-
-outer:
- for i := 2; i < len(fields); i++ {
- f := fields[i]
- switch {
- case f == "req":
- p.Required = true
- case f == "opt":
+func (p *Properties) Parse(tag string) {
+ // For example: "bytes,49,opt,name=foo,def=hello!"
+ for len(tag) > 0 {
+ i := strings.IndexByte(tag, ',')
+ if i < 0 {
+ i = len(tag)
+ }
+ switch s := tag[:i]; {
+ case strings.HasPrefix(s, "name="):
+ p.OrigName = s[len("name="):]
+ case strings.HasPrefix(s, "json="):
+ p.JSONName = s[len("json="):]
+ case strings.HasPrefix(s, "enum="):
+ p.Enum = s[len("enum="):]
+ case strings.HasPrefix(s, "weak="):
+ p.Weak = s[len("weak="):]
+ case strings.Trim(s, "0123456789") == "":
+ n, _ := strconv.ParseUint(s, 10, 32)
+ p.Tag = int(n)
+ case s == "opt":
p.Optional = true
- case f == "rep":
+ case s == "req":
+ p.Required = true
+ case s == "rep":
p.Repeated = true
- case f == "packed":
+ case s == "varint" || s == "zigzag32" || s == "zigzag64":
+ p.Wire = s
+ p.WireType = WireVarint
+ case s == "fixed32":
+ p.Wire = s
+ p.WireType = WireFixed32
+ case s == "fixed64":
+ p.Wire = s
+ p.WireType = WireFixed64
+ case s == "bytes":
+ p.Wire = s
+ p.WireType = WireBytes
+ case s == "group":
+ p.Wire = s
+ p.WireType = WireStartGroup
+ case s == "packed":
p.Packed = true
- case strings.HasPrefix(f, "name="):
- p.OrigName = f[5:]
- case strings.HasPrefix(f, "json="):
- p.JSONName = f[5:]
- case strings.HasPrefix(f, "enum="):
- p.Enum = f[5:]
- case f == "proto3":
- p.proto3 = true
- case f == "oneof":
- p.oneof = true
- case strings.HasPrefix(f, "def="):
+ case s == "proto3":
+ p.Proto3 = true
+ case s == "oneof":
+ p.Oneof = true
+ case strings.HasPrefix(s, "def="):
+ // The default tag is special in that everything afterwards is the
+ // default regardless of the presence of commas.
p.HasDefault = true
- p.Default = f[4:] // rest of string
- if i+1 < len(fields) {
- // Commas aren't escaped, and def is always last.
- p.Default += "," + strings.Join(fields[i+1:], ",")
- break outer
- }
- }
- }
-}
-
-var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem()
-
-// setFieldProps initializes the field properties for submessages and maps.
-func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) {
- switch t1 := typ; t1.Kind() {
- case reflect.Ptr:
- if t1.Elem().Kind() == reflect.Struct {
- p.stype = t1.Elem()
- }
-
- case reflect.Slice:
- if t2 := t1.Elem(); t2.Kind() == reflect.Ptr && t2.Elem().Kind() == reflect.Struct {
- p.stype = t2.Elem()
- }
-
- case reflect.Map:
- p.mtype = t1
- p.mkeyprop = &Properties{}
- p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
- p.mvalprop = &Properties{}
- vtype := p.mtype.Elem()
- if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {
- // The value type is not a message (*T) or bytes ([]byte),
- // so we need encoders for the pointer to this type.
- vtype = reflect.PtrTo(vtype)
- }
- p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
- }
-
- if p.stype != nil {
- if lockGetProp {
- p.sprop = GetProperties(p.stype)
- } else {
- p.sprop = getPropertiesLocked(p.stype)
+ p.Default, i = tag[len("def="):], len(tag)
}
+ tag = strings.TrimPrefix(tag[i:], ",")
}
}
-var (
- marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()
-)
-
// Init populates the properties from a protocol buffer struct tag.
+//
+// Deprecated: Do not use.
func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) {
- p.init(typ, name, tag, f, true)
-}
-
-func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) {
- // "bytes,49,opt,def=hello!"
p.Name = name
p.OrigName = name
if tag == "" {
return
}
p.Parse(tag)
- p.setFieldProps(typ, f, lockGetProp)
+
+ if typ != nil && typ.Kind() == reflect.Map {
+ p.MapKeyProp = new(Properties)
+ p.MapKeyProp.Init(nil, "Key", f.Tag.Get("protobuf_key"), nil)
+ p.MapValProp = new(Properties)
+ p.MapValProp.Init(nil, "Value", f.Tag.Get("protobuf_val"), nil)
+ }
}
-var (
- propertiesMu sync.RWMutex
- propertiesMap = make(map[reflect.Type]*StructProperties)
-)
+var propertiesCache sync.Map // map[reflect.Type]*StructProperties
-// GetProperties returns the list of properties for the type represented by t.
-// t must represent a generated struct type of a protocol message.
+// GetProperties returns the list of properties for the type represented by t,
+// which must be a generated protocol buffer message in the open-struct API,
+// where protobuf message fields are represented by exported Go struct fields.
+//
+// Deprecated: Use protobuf reflection instead.
func GetProperties(t reflect.Type) *StructProperties {
- if t.Kind() != reflect.Struct {
- panic("proto: type must have kind struct")
- }
-
- // Most calls to GetProperties in a long-running program will be
- // retrieving details for types we have seen before.
- propertiesMu.RLock()
- sprop, ok := propertiesMap[t]
- propertiesMu.RUnlock()
- if ok {
- if collectStats {
- stats.Chit++
- }
- return sprop
+ if p, ok := propertiesCache.Load(t); ok {
+ return p.(*StructProperties)
}
-
- propertiesMu.Lock()
- sprop = getPropertiesLocked(t)
- propertiesMu.Unlock()
- return sprop
+ p, _ := propertiesCache.LoadOrStore(t, newProperties(t))
+ return p.(*StructProperties)
}
-// getPropertiesLocked requires that propertiesMu is held.
-func getPropertiesLocked(t reflect.Type) *StructProperties {
- if prop, ok := propertiesMap[t]; ok {
- if collectStats {
- stats.Chit++
- }
- return prop
- }
- if collectStats {
- stats.Cmiss++
+func newProperties(t reflect.Type) *StructProperties {
+ if t.Kind() != reflect.Struct {
+ panic(fmt.Sprintf("%v is not a generated message in the open-struct API", t))
}
+ var hasOneof bool
prop := new(StructProperties)
- // in case of recursive protos, fill this in now.
- propertiesMap[t] = prop
-
- // build properties
- prop.Prop = make([]*Properties, t.NumField())
- prop.order = make([]int, t.NumField())
+ // Construct a list of properties for each field in the struct.
for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
p := new(Properties)
- name := f.Name
- p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false)
+ f := t.Field(i)
+ tagField := f.Tag.Get("protobuf")
+ p.Init(f.Type, f.Name, tagField, &f)
- oneof := f.Tag.Get("protobuf_oneof") // special case
- if oneof != "" {
- // Oneof fields don't use the traditional protobuf tag.
- p.OrigName = oneof
- }
- prop.Prop[i] = p
- prop.order[i] = i
- if debug {
- print(i, " ", f.Name, " ", t.String(), " ")
- if p.Tag > 0 {
- print(p.String())
- }
- print("\n")
+ tagOneof := f.Tag.Get("protobuf_oneof")
+ if tagOneof != "" {
+ hasOneof = true
+ p.OrigName = tagOneof
}
- }
- // Re-order prop.order.
- sort.Sort(prop)
+ // Rename unrelated struct fields with the "XXX_" prefix since so much
+ // user code simply checks for this to exclude special fields.
+ if tagField == "" && tagOneof == "" && !strings.HasPrefix(p.Name, "XXX_") {
+ p.Name = "XXX_" + p.Name
+ p.OrigName = "XXX_" + p.OrigName
+ } else if p.Weak != "" {
+ p.Name = p.OrigName // avoid possible "XXX_" prefix on weak field
+ }
- type oneofMessage interface {
- XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
+ prop.Prop = append(prop.Prop, p)
}
- if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
- var oots []interface{}
- _, _, _, oots = om.XXX_OneofFuncs()
- // Interpret oneof metadata.
+ // Construct a mapping of oneof field names to properties.
+ if hasOneof {
+ var oneofWrappers []interface{}
+ if fn, ok := reflect.PtrTo(t).MethodByName("XXX_OneofFuncs"); ok {
+ oneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[3].Interface().([]interface{})
+ }
+ if fn, ok := reflect.PtrTo(t).MethodByName("XXX_OneofWrappers"); ok {
+ oneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[0].Interface().([]interface{})
+ }
+ if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(protoreflect.ProtoMessage); ok {
+ if m, ok := m.ProtoReflect().(interface{ ProtoMessageInfo() *protoimpl.MessageInfo }); ok {
+ oneofWrappers = m.ProtoMessageInfo().OneofWrappers
+ }
+ }
+
prop.OneofTypes = make(map[string]*OneofProperties)
- for _, oot := range oots {
- oop := &OneofProperties{
- Type: reflect.ValueOf(oot).Type(), // *T
+ for _, wrapper := range oneofWrappers {
+ p := &OneofProperties{
+ Type: reflect.ValueOf(wrapper).Type(), // *T
Prop: new(Properties),
}
- sft := oop.Type.Elem().Field(0)
- oop.Prop.Name = sft.Name
- oop.Prop.Parse(sft.Tag.Get("protobuf"))
- // There will be exactly one interface field that
- // this new value is assignable to.
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- if f.Type.Kind() != reflect.Interface {
- continue
+ f := p.Type.Elem().Field(0)
+ p.Prop.Name = f.Name
+ p.Prop.Parse(f.Tag.Get("protobuf"))
+
+ // Determine the struct field that contains this oneof.
+ // Each wrapper is assignable to exactly one parent field.
+ var foundOneof bool
+ for i := 0; i < t.NumField() && !foundOneof; i++ {
+ if p.Type.AssignableTo(t.Field(i).Type) {
+ p.Field = i
+ foundOneof = true
}
- if !oop.Type.AssignableTo(f.Type) {
- continue
- }
- oop.Field = i
- break
}
- prop.OneofTypes[oop.Prop.OrigName] = oop
- }
- }
-
- // build required counts
- // build tags
- reqCount := 0
- prop.decoderOrigNames = make(map[string]int)
- for i, p := range prop.Prop {
- if strings.HasPrefix(p.Name, "XXX_") {
- // Internal fields should not appear in tags/origNames maps.
- // They are handled specially when encoding and decoding.
- continue
- }
- if p.Required {
- reqCount++
+ if !foundOneof {
+ panic(fmt.Sprintf("%v is not a generated message in the open-struct API", t))
+ }
+ prop.OneofTypes[p.Prop.OrigName] = p
}
- prop.decoderTags.put(p.Tag, i)
- prop.decoderOrigNames[p.OrigName] = i
}
- prop.reqCount = reqCount
return prop
}
-// A global registry of enum types.
-// The generated code will register the generated maps by calling RegisterEnum.
-
-var enumValueMaps = make(map[string]map[string]int32)
-
-// RegisterEnum is called from the generated code to install the enum descriptor
-// maps into the global table to aid parsing text format protocol buffers.
-func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) {
- if _, ok := enumValueMaps[typeName]; ok {
- panic("proto: duplicate enum registered: " + typeName)
- }
- enumValueMaps[typeName] = valueMap
-}
-
-// EnumValueMap returns the mapping from names to integers of the
-// enum type enumType, or a nil if not found.
-func EnumValueMap(enumType string) map[string]int32 {
- return enumValueMaps[enumType]
-}
-
-// A registry of all linked message types.
-// The string is a fully-qualified proto name ("pkg.Message").
-var (
- protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers
- protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types
- revProtoTypes = make(map[reflect.Type]string)
-)
-
-// RegisterType is called from generated code and maps from the fully qualified
-// proto name to the type (pointer to struct) of the protocol buffer.
-func RegisterType(x Message, name string) {
- if _, ok := protoTypedNils[name]; ok {
- // TODO: Some day, make this a panic.
- log.Printf("proto: duplicate proto type registered: %s", name)
- return
- }
- t := reflect.TypeOf(x)
- if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 {
- // Generated code always calls RegisterType with nil x.
- // This check is just for extra safety.
- protoTypedNils[name] = x
- } else {
- protoTypedNils[name] = reflect.Zero(t).Interface().(Message)
- }
- revProtoTypes[t] = name
-}
-
-// RegisterMapType is called from generated code and maps from the fully qualified
-// proto name to the native map type of the proto map definition.
-func RegisterMapType(x interface{}, name string) {
- if reflect.TypeOf(x).Kind() != reflect.Map {
- panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name))
- }
- if _, ok := protoMapTypes[name]; ok {
- log.Printf("proto: duplicate proto type registered: %s", name)
- return
- }
- t := reflect.TypeOf(x)
- protoMapTypes[name] = t
- revProtoTypes[t] = name
-}
-
-// MessageName returns the fully-qualified proto name for the given message type.
-func MessageName(x Message) string {
- type xname interface {
- XXX_MessageName() string
- }
- if m, ok := x.(xname); ok {
- return m.XXX_MessageName()
- }
- return revProtoTypes[reflect.TypeOf(x)]
-}
-
-// MessageType returns the message type (pointer to struct) for a named message.
-// The type is not guaranteed to implement proto.Message if the name refers to a
-// map entry.
-func MessageType(name string) reflect.Type {
- if t, ok := protoTypedNils[name]; ok {
- return reflect.TypeOf(t)
- }
- return protoMapTypes[name]
-}
-
-// A registry of all linked proto files.
-var (
- protoFiles = make(map[string][]byte) // file name => fileDescriptor
-)
-
-// RegisterFile is called from generated code and maps from the
-// full file name of a .proto file to its compressed FileDescriptorProto.
-func RegisterFile(filename string, fileDescriptor []byte) {
- protoFiles[filename] = fileDescriptor
-}
-
-// FileDescriptor returns the compressed FileDescriptorProto for a .proto file.
-func FileDescriptor(filename string) []byte { return protoFiles[filename] }
+func (sp *StructProperties) Len() int { return len(sp.Prop) }
+func (sp *StructProperties) Less(i, j int) bool { return false }
+func (sp *StructProperties) Swap(i, j int) { return }
diff --git a/vendor/github.com/golang/protobuf/proto/table_marshal.go b/vendor/github.com/golang/protobuf/proto/table_marshal.go
deleted file mode 100644
index 0f212b30..00000000
--- a/vendor/github.com/golang/protobuf/proto/table_marshal.go
+++ /dev/null
@@ -1,2681 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-import (
- "errors"
- "fmt"
- "math"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "unicode/utf8"
-)
-
-// a sizer takes a pointer to a field and the size of its tag, computes the size of
-// the encoded data.
-type sizer func(pointer, int) int
-
-// a marshaler takes a byte slice, a pointer to a field, and its tag (in wire format),
-// marshals the field to the end of the slice, returns the slice and error (if any).
-type marshaler func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error)
-
-// marshalInfo is the information used for marshaling a message.
-type marshalInfo struct {
- typ reflect.Type
- fields []*marshalFieldInfo
- unrecognized field // offset of XXX_unrecognized
- extensions field // offset of XXX_InternalExtensions
- v1extensions field // offset of XXX_extensions
- sizecache field // offset of XXX_sizecache
- initialized int32 // 0 -- only typ is set, 1 -- fully initialized
- messageset bool // uses message set wire format
- hasmarshaler bool // has custom marshaler
- sync.RWMutex // protect extElems map, also for initialization
- extElems map[int32]*marshalElemInfo // info of extension elements
-}
-
-// marshalFieldInfo is the information used for marshaling a field of a message.
-type marshalFieldInfo struct {
- field field
- wiretag uint64 // tag in wire format
- tagsize int // size of tag in wire format
- sizer sizer
- marshaler marshaler
- isPointer bool
- required bool // field is required
- name string // name of the field, for error reporting
- oneofElems map[reflect.Type]*marshalElemInfo // info of oneof elements
-}
-
-// marshalElemInfo is the information used for marshaling an extension or oneof element.
-type marshalElemInfo struct {
- wiretag uint64 // tag in wire format
- tagsize int // size of tag in wire format
- sizer sizer
- marshaler marshaler
- isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only)
-}
-
-var (
- marshalInfoMap = map[reflect.Type]*marshalInfo{}
- marshalInfoLock sync.Mutex
-)
-
-// getMarshalInfo returns the information to marshal a given type of message.
-// The info it returns may not necessarily initialized.
-// t is the type of the message (NOT the pointer to it).
-func getMarshalInfo(t reflect.Type) *marshalInfo {
- marshalInfoLock.Lock()
- u, ok := marshalInfoMap[t]
- if !ok {
- u = &marshalInfo{typ: t}
- marshalInfoMap[t] = u
- }
- marshalInfoLock.Unlock()
- return u
-}
-
-// Size is the entry point from generated code,
-// and should be ONLY called by generated code.
-// It computes the size of encoded data of msg.
-// a is a pointer to a place to store cached marshal info.
-func (a *InternalMessageInfo) Size(msg Message) int {
- u := getMessageMarshalInfo(msg, a)
- ptr := toPointer(&msg)
- if ptr.isNil() {
- // We get here if msg is a typed nil ((*SomeMessage)(nil)),
- // so it satisfies the interface, and msg == nil wouldn't
- // catch it. We don't want crash in this case.
- return 0
- }
- return u.size(ptr)
-}
-
-// Marshal is the entry point from generated code,
-// and should be ONLY called by generated code.
-// It marshals msg to the end of b.
-// a is a pointer to a place to store cached marshal info.
-func (a *InternalMessageInfo) Marshal(b []byte, msg Message, deterministic bool) ([]byte, error) {
- u := getMessageMarshalInfo(msg, a)
- ptr := toPointer(&msg)
- if ptr.isNil() {
- // We get here if msg is a typed nil ((*SomeMessage)(nil)),
- // so it satisfies the interface, and msg == nil wouldn't
- // catch it. We don't want crash in this case.
- return b, ErrNil
- }
- return u.marshal(b, ptr, deterministic)
-}
-
-func getMessageMarshalInfo(msg interface{}, a *InternalMessageInfo) *marshalInfo {
- // u := a.marshal, but atomically.
- // We use an atomic here to ensure memory consistency.
- u := atomicLoadMarshalInfo(&a.marshal)
- if u == nil {
- // Get marshal information from type of message.
- t := reflect.ValueOf(msg).Type()
- if t.Kind() != reflect.Ptr {
- panic(fmt.Sprintf("cannot handle non-pointer message type %v", t))
- }
- u = getMarshalInfo(t.Elem())
- // Store it in the cache for later users.
- // a.marshal = u, but atomically.
- atomicStoreMarshalInfo(&a.marshal, u)
- }
- return u
-}
-
-// size is the main function to compute the size of the encoded data of a message.
-// ptr is the pointer to the message.
-func (u *marshalInfo) size(ptr pointer) int {
- if atomic.LoadInt32(&u.initialized) == 0 {
- u.computeMarshalInfo()
- }
-
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- if u.hasmarshaler {
- m := ptr.asPointerTo(u.typ).Interface().(Marshaler)
- b, _ := m.Marshal()
- return len(b)
- }
-
- n := 0
- for _, f := range u.fields {
- if f.isPointer && ptr.offset(f.field).getPointer().isNil() {
- // nil pointer always marshals to nothing
- continue
- }
- n += f.sizer(ptr.offset(f.field), f.tagsize)
- }
- if u.extensions.IsValid() {
- e := ptr.offset(u.extensions).toExtensions()
- if u.messageset {
- n += u.sizeMessageSet(e)
- } else {
- n += u.sizeExtensions(e)
- }
- }
- if u.v1extensions.IsValid() {
- m := *ptr.offset(u.v1extensions).toOldExtensions()
- n += u.sizeV1Extensions(m)
- }
- if u.unrecognized.IsValid() {
- s := *ptr.offset(u.unrecognized).toBytes()
- n += len(s)
- }
- // cache the result for use in marshal
- if u.sizecache.IsValid() {
- atomic.StoreInt32(ptr.offset(u.sizecache).toInt32(), int32(n))
- }
- return n
-}
-
-// cachedsize gets the size from cache. If there is no cache (i.e. message is not generated),
-// fall back to compute the size.
-func (u *marshalInfo) cachedsize(ptr pointer) int {
- if u.sizecache.IsValid() {
- return int(atomic.LoadInt32(ptr.offset(u.sizecache).toInt32()))
- }
- return u.size(ptr)
-}
-
-// marshal is the main function to marshal a message. It takes a byte slice and appends
-// the encoded data to the end of the slice, returns the slice and error (if any).
-// ptr is the pointer to the message.
-// If deterministic is true, map is marshaled in deterministic order.
-func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte, error) {
- if atomic.LoadInt32(&u.initialized) == 0 {
- u.computeMarshalInfo()
- }
-
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- if u.hasmarshaler {
- m := ptr.asPointerTo(u.typ).Interface().(Marshaler)
- b1, err := m.Marshal()
- b = append(b, b1...)
- return b, err
- }
-
- var err, errreq error
- // The old marshaler encodes extensions at beginning.
- if u.extensions.IsValid() {
- e := ptr.offset(u.extensions).toExtensions()
- if u.messageset {
- b, err = u.appendMessageSet(b, e, deterministic)
- } else {
- b, err = u.appendExtensions(b, e, deterministic)
- }
- if err != nil {
- return b, err
- }
- }
- if u.v1extensions.IsValid() {
- m := *ptr.offset(u.v1extensions).toOldExtensions()
- b, err = u.appendV1Extensions(b, m, deterministic)
- if err != nil {
- return b, err
- }
- }
- for _, f := range u.fields {
- if f.required && errreq == nil {
- if ptr.offset(f.field).getPointer().isNil() {
- // Required field is not set.
- // We record the error but keep going, to give a complete marshaling.
- errreq = &RequiredNotSetError{f.name}
- continue
- }
- }
- if f.isPointer && ptr.offset(f.field).getPointer().isNil() {
- // nil pointer always marshals to nothing
- continue
- }
- b, err = f.marshaler(b, ptr.offset(f.field), f.wiretag, deterministic)
- if err != nil {
- if err1, ok := err.(*RequiredNotSetError); ok {
- // Required field in submessage is not set.
- // We record the error but keep going, to give a complete marshaling.
- if errreq == nil {
- errreq = &RequiredNotSetError{f.name + "." + err1.field}
- }
- continue
- }
- if err == errRepeatedHasNil {
- err = errors.New("proto: repeated field " + f.name + " has nil element")
- }
- return b, err
- }
- }
- if u.unrecognized.IsValid() {
- s := *ptr.offset(u.unrecognized).toBytes()
- b = append(b, s...)
- }
- return b, errreq
-}
-
-// computeMarshalInfo initializes the marshal info.
-func (u *marshalInfo) computeMarshalInfo() {
- u.Lock()
- defer u.Unlock()
- if u.initialized != 0 { // non-atomic read is ok as it is protected by the lock
- return
- }
-
- t := u.typ
- u.unrecognized = invalidField
- u.extensions = invalidField
- u.v1extensions = invalidField
- u.sizecache = invalidField
-
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- if reflect.PtrTo(t).Implements(marshalerType) {
- u.hasmarshaler = true
- atomic.StoreInt32(&u.initialized, 1)
- return
- }
-
- // get oneof implementers
- var oneofImplementers []interface{}
- if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
- _, _, _, oneofImplementers = m.XXX_OneofFuncs()
- }
-
- n := t.NumField()
-
- // deal with XXX fields first
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- if !strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- switch f.Name {
- case "XXX_sizecache":
- u.sizecache = toField(&f)
- case "XXX_unrecognized":
- u.unrecognized = toField(&f)
- case "XXX_InternalExtensions":
- u.extensions = toField(&f)
- u.messageset = f.Tag.Get("protobuf_messageset") == "1"
- case "XXX_extensions":
- u.v1extensions = toField(&f)
- case "XXX_NoUnkeyedLiteral":
- // nothing to do
- default:
- panic("unknown XXX field: " + f.Name)
- }
- n--
- }
-
- // normal fields
- fields := make([]marshalFieldInfo, n) // batch allocation
- u.fields = make([]*marshalFieldInfo, 0, n)
- for i, j := 0, 0; i < t.NumField(); i++ {
- f := t.Field(i)
-
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- field := &fields[j]
- j++
- field.name = f.Name
- u.fields = append(u.fields, field)
- if f.Tag.Get("protobuf_oneof") != "" {
- field.computeOneofFieldInfo(&f, oneofImplementers)
- continue
- }
- if f.Tag.Get("protobuf") == "" {
- // field has no tag (not in generated message), ignore it
- u.fields = u.fields[:len(u.fields)-1]
- j--
- continue
- }
- field.computeMarshalFieldInfo(&f)
- }
-
- // fields are marshaled in tag order on the wire.
- sort.Sort(byTag(u.fields))
-
- atomic.StoreInt32(&u.initialized, 1)
-}
-
-// helper for sorting fields by tag
-type byTag []*marshalFieldInfo
-
-func (a byTag) Len() int { return len(a) }
-func (a byTag) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-func (a byTag) Less(i, j int) bool { return a[i].wiretag < a[j].wiretag }
-
-// getExtElemInfo returns the information to marshal an extension element.
-// The info it returns is initialized.
-func (u *marshalInfo) getExtElemInfo(desc *ExtensionDesc) *marshalElemInfo {
- // get from cache first
- u.RLock()
- e, ok := u.extElems[desc.Field]
- u.RUnlock()
- if ok {
- return e
- }
-
- t := reflect.TypeOf(desc.ExtensionType) // pointer or slice to basic type or struct
- tags := strings.Split(desc.Tag, ",")
- tag, err := strconv.Atoi(tags[1])
- if err != nil {
- panic("tag is not an integer")
- }
- wt := wiretype(tags[0])
- sizer, marshaler := typeMarshaler(t, tags, false, false)
- e = &marshalElemInfo{
- wiretag: uint64(tag)<<3 | wt,
- tagsize: SizeVarint(uint64(tag) << 3),
- sizer: sizer,
- marshaler: marshaler,
- isptr: t.Kind() == reflect.Ptr,
- }
-
- // update cache
- u.Lock()
- if u.extElems == nil {
- u.extElems = make(map[int32]*marshalElemInfo)
- }
- u.extElems[desc.Field] = e
- u.Unlock()
- return e
-}
-
-// computeMarshalFieldInfo fills up the information to marshal a field.
-func (fi *marshalFieldInfo) computeMarshalFieldInfo(f *reflect.StructField) {
- // parse protobuf tag of the field.
- // tag has format of "bytes,49,opt,name=foo,def=hello!"
- tags := strings.Split(f.Tag.Get("protobuf"), ",")
- if tags[0] == "" {
- return
- }
- tag, err := strconv.Atoi(tags[1])
- if err != nil {
- panic("tag is not an integer")
- }
- wt := wiretype(tags[0])
- if tags[2] == "req" {
- fi.required = true
- }
- fi.setTag(f, tag, wt)
- fi.setMarshaler(f, tags)
-}
-
-func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) {
- fi.field = toField(f)
- fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire.
- fi.isPointer = true
- fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f)
- fi.oneofElems = make(map[reflect.Type]*marshalElemInfo)
-
- ityp := f.Type // interface type
- for _, o := range oneofImplementers {
- t := reflect.TypeOf(o)
- if !t.Implements(ityp) {
- continue
- }
- sf := t.Elem().Field(0) // oneof implementer is a struct with a single field
- tags := strings.Split(sf.Tag.Get("protobuf"), ",")
- tag, err := strconv.Atoi(tags[1])
- if err != nil {
- panic("tag is not an integer")
- }
- wt := wiretype(tags[0])
- sizer, marshaler := typeMarshaler(sf.Type, tags, false, true) // oneof should not omit any zero value
- fi.oneofElems[t.Elem()] = &marshalElemInfo{
- wiretag: uint64(tag)<<3 | wt,
- tagsize: SizeVarint(uint64(tag) << 3),
- sizer: sizer,
- marshaler: marshaler,
- }
- }
-}
-
-type oneofMessage interface {
- XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
-}
-
-// wiretype returns the wire encoding of the type.
-func wiretype(encoding string) uint64 {
- switch encoding {
- case "fixed32":
- return WireFixed32
- case "fixed64":
- return WireFixed64
- case "varint", "zigzag32", "zigzag64":
- return WireVarint
- case "bytes":
- return WireBytes
- case "group":
- return WireStartGroup
- }
- panic("unknown wire type " + encoding)
-}
-
-// setTag fills up the tag (in wire format) and its size in the info of a field.
-func (fi *marshalFieldInfo) setTag(f *reflect.StructField, tag int, wt uint64) {
- fi.field = toField(f)
- fi.wiretag = uint64(tag)<<3 | wt
- fi.tagsize = SizeVarint(uint64(tag) << 3)
-}
-
-// setMarshaler fills up the sizer and marshaler in the info of a field.
-func (fi *marshalFieldInfo) setMarshaler(f *reflect.StructField, tags []string) {
- switch f.Type.Kind() {
- case reflect.Map:
- // map field
- fi.isPointer = true
- fi.sizer, fi.marshaler = makeMapMarshaler(f)
- return
- case reflect.Ptr, reflect.Slice:
- fi.isPointer = true
- }
- fi.sizer, fi.marshaler = typeMarshaler(f.Type, tags, true, false)
-}
-
-// typeMarshaler returns the sizer and marshaler of a given field.
-// t is the type of the field.
-// tags is the generated "protobuf" tag of the field.
-// If nozero is true, zero value is not marshaled to the wire.
-// If oneof is true, it is a oneof field.
-func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, marshaler) {
- encoding := tags[0]
-
- pointer := false
- slice := false
- if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 {
- slice = true
- t = t.Elem()
- }
- if t.Kind() == reflect.Ptr {
- pointer = true
- t = t.Elem()
- }
-
- packed := false
- proto3 := false
- for i := 2; i < len(tags); i++ {
- if tags[i] == "packed" {
- packed = true
- }
- if tags[i] == "proto3" {
- proto3 = true
- }
- }
-
- switch t.Kind() {
- case reflect.Bool:
- if pointer {
- return sizeBoolPtr, appendBoolPtr
- }
- if slice {
- if packed {
- return sizeBoolPackedSlice, appendBoolPackedSlice
- }
- return sizeBoolSlice, appendBoolSlice
- }
- if nozero {
- return sizeBoolValueNoZero, appendBoolValueNoZero
- }
- return sizeBoolValue, appendBoolValue
- case reflect.Uint32:
- switch encoding {
- case "fixed32":
- if pointer {
- return sizeFixed32Ptr, appendFixed32Ptr
- }
- if slice {
- if packed {
- return sizeFixed32PackedSlice, appendFixed32PackedSlice
- }
- return sizeFixed32Slice, appendFixed32Slice
- }
- if nozero {
- return sizeFixed32ValueNoZero, appendFixed32ValueNoZero
- }
- return sizeFixed32Value, appendFixed32Value
- case "varint":
- if pointer {
- return sizeVarint32Ptr, appendVarint32Ptr
- }
- if slice {
- if packed {
- return sizeVarint32PackedSlice, appendVarint32PackedSlice
- }
- return sizeVarint32Slice, appendVarint32Slice
- }
- if nozero {
- return sizeVarint32ValueNoZero, appendVarint32ValueNoZero
- }
- return sizeVarint32Value, appendVarint32Value
- }
- case reflect.Int32:
- switch encoding {
- case "fixed32":
- if pointer {
- return sizeFixedS32Ptr, appendFixedS32Ptr
- }
- if slice {
- if packed {
- return sizeFixedS32PackedSlice, appendFixedS32PackedSlice
- }
- return sizeFixedS32Slice, appendFixedS32Slice
- }
- if nozero {
- return sizeFixedS32ValueNoZero, appendFixedS32ValueNoZero
- }
- return sizeFixedS32Value, appendFixedS32Value
- case "varint":
- if pointer {
- return sizeVarintS32Ptr, appendVarintS32Ptr
- }
- if slice {
- if packed {
- return sizeVarintS32PackedSlice, appendVarintS32PackedSlice
- }
- return sizeVarintS32Slice, appendVarintS32Slice
- }
- if nozero {
- return sizeVarintS32ValueNoZero, appendVarintS32ValueNoZero
- }
- return sizeVarintS32Value, appendVarintS32Value
- case "zigzag32":
- if pointer {
- return sizeZigzag32Ptr, appendZigzag32Ptr
- }
- if slice {
- if packed {
- return sizeZigzag32PackedSlice, appendZigzag32PackedSlice
- }
- return sizeZigzag32Slice, appendZigzag32Slice
- }
- if nozero {
- return sizeZigzag32ValueNoZero, appendZigzag32ValueNoZero
- }
- return sizeZigzag32Value, appendZigzag32Value
- }
- case reflect.Uint64:
- switch encoding {
- case "fixed64":
- if pointer {
- return sizeFixed64Ptr, appendFixed64Ptr
- }
- if slice {
- if packed {
- return sizeFixed64PackedSlice, appendFixed64PackedSlice
- }
- return sizeFixed64Slice, appendFixed64Slice
- }
- if nozero {
- return sizeFixed64ValueNoZero, appendFixed64ValueNoZero
- }
- return sizeFixed64Value, appendFixed64Value
- case "varint":
- if pointer {
- return sizeVarint64Ptr, appendVarint64Ptr
- }
- if slice {
- if packed {
- return sizeVarint64PackedSlice, appendVarint64PackedSlice
- }
- return sizeVarint64Slice, appendVarint64Slice
- }
- if nozero {
- return sizeVarint64ValueNoZero, appendVarint64ValueNoZero
- }
- return sizeVarint64Value, appendVarint64Value
- }
- case reflect.Int64:
- switch encoding {
- case "fixed64":
- if pointer {
- return sizeFixedS64Ptr, appendFixedS64Ptr
- }
- if slice {
- if packed {
- return sizeFixedS64PackedSlice, appendFixedS64PackedSlice
- }
- return sizeFixedS64Slice, appendFixedS64Slice
- }
- if nozero {
- return sizeFixedS64ValueNoZero, appendFixedS64ValueNoZero
- }
- return sizeFixedS64Value, appendFixedS64Value
- case "varint":
- if pointer {
- return sizeVarintS64Ptr, appendVarintS64Ptr
- }
- if slice {
- if packed {
- return sizeVarintS64PackedSlice, appendVarintS64PackedSlice
- }
- return sizeVarintS64Slice, appendVarintS64Slice
- }
- if nozero {
- return sizeVarintS64ValueNoZero, appendVarintS64ValueNoZero
- }
- return sizeVarintS64Value, appendVarintS64Value
- case "zigzag64":
- if pointer {
- return sizeZigzag64Ptr, appendZigzag64Ptr
- }
- if slice {
- if packed {
- return sizeZigzag64PackedSlice, appendZigzag64PackedSlice
- }
- return sizeZigzag64Slice, appendZigzag64Slice
- }
- if nozero {
- return sizeZigzag64ValueNoZero, appendZigzag64ValueNoZero
- }
- return sizeZigzag64Value, appendZigzag64Value
- }
- case reflect.Float32:
- if pointer {
- return sizeFloat32Ptr, appendFloat32Ptr
- }
- if slice {
- if packed {
- return sizeFloat32PackedSlice, appendFloat32PackedSlice
- }
- return sizeFloat32Slice, appendFloat32Slice
- }
- if nozero {
- return sizeFloat32ValueNoZero, appendFloat32ValueNoZero
- }
- return sizeFloat32Value, appendFloat32Value
- case reflect.Float64:
- if pointer {
- return sizeFloat64Ptr, appendFloat64Ptr
- }
- if slice {
- if packed {
- return sizeFloat64PackedSlice, appendFloat64PackedSlice
- }
- return sizeFloat64Slice, appendFloat64Slice
- }
- if nozero {
- return sizeFloat64ValueNoZero, appendFloat64ValueNoZero
- }
- return sizeFloat64Value, appendFloat64Value
- case reflect.String:
- if pointer {
- return sizeStringPtr, appendStringPtr
- }
- if slice {
- return sizeStringSlice, appendStringSlice
- }
- if nozero {
- return sizeStringValueNoZero, appendStringValueNoZero
- }
- return sizeStringValue, appendStringValue
- case reflect.Slice:
- if slice {
- return sizeBytesSlice, appendBytesSlice
- }
- if oneof {
- // Oneof bytes field may also have "proto3" tag.
- // We want to marshal it as a oneof field. Do this
- // check before the proto3 check.
- return sizeBytesOneof, appendBytesOneof
- }
- if proto3 {
- return sizeBytes3, appendBytes3
- }
- return sizeBytes, appendBytes
- case reflect.Struct:
- switch encoding {
- case "group":
- if slice {
- return makeGroupSliceMarshaler(getMarshalInfo(t))
- }
- return makeGroupMarshaler(getMarshalInfo(t))
- case "bytes":
- if slice {
- return makeMessageSliceMarshaler(getMarshalInfo(t))
- }
- return makeMessageMarshaler(getMarshalInfo(t))
- }
- }
- panic(fmt.Sprintf("unknown or mismatched type: type: %v, wire type: %v", t, encoding))
-}
-
-// Below are functions to size/marshal a specific type of a field.
-// They are stored in the field's info, and called by function pointers.
-// They have type sizer or marshaler.
-
-func sizeFixed32Value(_ pointer, tagsize int) int {
- return 4 + tagsize
-}
-func sizeFixed32ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toUint32()
- if v == 0 {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFixed32Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toUint32Ptr()
- if p == nil {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFixed32Slice(ptr pointer, tagsize int) int {
- s := *ptr.toUint32Slice()
- return (4 + tagsize) * len(s)
-}
-func sizeFixed32PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toUint32Slice()
- if len(s) == 0 {
- return 0
- }
- return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
-}
-func sizeFixedS32Value(_ pointer, tagsize int) int {
- return 4 + tagsize
-}
-func sizeFixedS32ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt32()
- if v == 0 {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFixedS32Ptr(ptr pointer, tagsize int) int {
- p := ptr.getInt32Ptr()
- if p == nil {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFixedS32Slice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- return (4 + tagsize) * len(s)
-}
-func sizeFixedS32PackedSlice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return 0
- }
- return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
-}
-func sizeFloat32Value(_ pointer, tagsize int) int {
- return 4 + tagsize
-}
-func sizeFloat32ValueNoZero(ptr pointer, tagsize int) int {
- v := math.Float32bits(*ptr.toFloat32())
- if v == 0 {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFloat32Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toFloat32Ptr()
- if p == nil {
- return 0
- }
- return 4 + tagsize
-}
-func sizeFloat32Slice(ptr pointer, tagsize int) int {
- s := *ptr.toFloat32Slice()
- return (4 + tagsize) * len(s)
-}
-func sizeFloat32PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toFloat32Slice()
- if len(s) == 0 {
- return 0
- }
- return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
-}
-func sizeFixed64Value(_ pointer, tagsize int) int {
- return 8 + tagsize
-}
-func sizeFixed64ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toUint64()
- if v == 0 {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFixed64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toUint64Ptr()
- if p == nil {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFixed64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toUint64Slice()
- return (8 + tagsize) * len(s)
-}
-func sizeFixed64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toUint64Slice()
- if len(s) == 0 {
- return 0
- }
- return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
-}
-func sizeFixedS64Value(_ pointer, tagsize int) int {
- return 8 + tagsize
-}
-func sizeFixedS64ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt64()
- if v == 0 {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFixedS64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFixedS64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- return (8 + tagsize) * len(s)
-}
-func sizeFixedS64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return 0
- }
- return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
-}
-func sizeFloat64Value(_ pointer, tagsize int) int {
- return 8 + tagsize
-}
-func sizeFloat64ValueNoZero(ptr pointer, tagsize int) int {
- v := math.Float64bits(*ptr.toFloat64())
- if v == 0 {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFloat64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toFloat64Ptr()
- if p == nil {
- return 0
- }
- return 8 + tagsize
-}
-func sizeFloat64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toFloat64Slice()
- return (8 + tagsize) * len(s)
-}
-func sizeFloat64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toFloat64Slice()
- if len(s) == 0 {
- return 0
- }
- return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
-}
-func sizeVarint32Value(ptr pointer, tagsize int) int {
- v := *ptr.toUint32()
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarint32ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toUint32()
- if v == 0 {
- return 0
- }
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarint32Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toUint32Ptr()
- if p == nil {
- return 0
- }
- return SizeVarint(uint64(*p)) + tagsize
-}
-func sizeVarint32Slice(ptr pointer, tagsize int) int {
- s := *ptr.toUint32Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v)) + tagsize
- }
- return n
-}
-func sizeVarint32PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toUint32Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeVarintS32Value(ptr pointer, tagsize int) int {
- v := *ptr.toInt32()
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarintS32ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt32()
- if v == 0 {
- return 0
- }
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarintS32Ptr(ptr pointer, tagsize int) int {
- p := ptr.getInt32Ptr()
- if p == nil {
- return 0
- }
- return SizeVarint(uint64(*p)) + tagsize
-}
-func sizeVarintS32Slice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v)) + tagsize
- }
- return n
-}
-func sizeVarintS32PackedSlice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeVarint64Value(ptr pointer, tagsize int) int {
- v := *ptr.toUint64()
- return SizeVarint(v) + tagsize
-}
-func sizeVarint64ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toUint64()
- if v == 0 {
- return 0
- }
- return SizeVarint(v) + tagsize
-}
-func sizeVarint64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toUint64Ptr()
- if p == nil {
- return 0
- }
- return SizeVarint(*p) + tagsize
-}
-func sizeVarint64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toUint64Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(v) + tagsize
- }
- return n
-}
-func sizeVarint64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toUint64Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(v)
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeVarintS64Value(ptr pointer, tagsize int) int {
- v := *ptr.toInt64()
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarintS64ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt64()
- if v == 0 {
- return 0
- }
- return SizeVarint(uint64(v)) + tagsize
-}
-func sizeVarintS64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return 0
- }
- return SizeVarint(uint64(*p)) + tagsize
-}
-func sizeVarintS64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v)) + tagsize
- }
- return n
-}
-func sizeVarintS64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeZigzag32Value(ptr pointer, tagsize int) int {
- v := *ptr.toInt32()
- return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
-}
-func sizeZigzag32ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt32()
- if v == 0 {
- return 0
- }
- return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
-}
-func sizeZigzag32Ptr(ptr pointer, tagsize int) int {
- p := ptr.getInt32Ptr()
- if p == nil {
- return 0
- }
- v := *p
- return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
-}
-func sizeZigzag32Slice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
- }
- return n
-}
-func sizeZigzag32PackedSlice(ptr pointer, tagsize int) int {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeZigzag64Value(ptr pointer, tagsize int) int {
- v := *ptr.toInt64()
- return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
-}
-func sizeZigzag64ValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toInt64()
- if v == 0 {
- return 0
- }
- return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
-}
-func sizeZigzag64Ptr(ptr pointer, tagsize int) int {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return 0
- }
- v := *p
- return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
-}
-func sizeZigzag64Slice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
- }
- return n
-}
-func sizeZigzag64PackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return 0
- }
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63)))
- }
- return n + SizeVarint(uint64(n)) + tagsize
-}
-func sizeBoolValue(_ pointer, tagsize int) int {
- return 1 + tagsize
-}
-func sizeBoolValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toBool()
- if !v {
- return 0
- }
- return 1 + tagsize
-}
-func sizeBoolPtr(ptr pointer, tagsize int) int {
- p := *ptr.toBoolPtr()
- if p == nil {
- return 0
- }
- return 1 + tagsize
-}
-func sizeBoolSlice(ptr pointer, tagsize int) int {
- s := *ptr.toBoolSlice()
- return (1 + tagsize) * len(s)
-}
-func sizeBoolPackedSlice(ptr pointer, tagsize int) int {
- s := *ptr.toBoolSlice()
- if len(s) == 0 {
- return 0
- }
- return len(s) + SizeVarint(uint64(len(s))) + tagsize
-}
-func sizeStringValue(ptr pointer, tagsize int) int {
- v := *ptr.toString()
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeStringValueNoZero(ptr pointer, tagsize int) int {
- v := *ptr.toString()
- if v == "" {
- return 0
- }
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeStringPtr(ptr pointer, tagsize int) int {
- p := *ptr.toStringPtr()
- if p == nil {
- return 0
- }
- v := *p
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeStringSlice(ptr pointer, tagsize int) int {
- s := *ptr.toStringSlice()
- n := 0
- for _, v := range s {
- n += len(v) + SizeVarint(uint64(len(v))) + tagsize
- }
- return n
-}
-func sizeBytes(ptr pointer, tagsize int) int {
- v := *ptr.toBytes()
- if v == nil {
- return 0
- }
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeBytes3(ptr pointer, tagsize int) int {
- v := *ptr.toBytes()
- if len(v) == 0 {
- return 0
- }
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeBytesOneof(ptr pointer, tagsize int) int {
- v := *ptr.toBytes()
- return len(v) + SizeVarint(uint64(len(v))) + tagsize
-}
-func sizeBytesSlice(ptr pointer, tagsize int) int {
- s := *ptr.toBytesSlice()
- n := 0
- for _, v := range s {
- n += len(v) + SizeVarint(uint64(len(v))) + tagsize
- }
- return n
-}
-
-// appendFixed32 appends an encoded fixed32 to b.
-func appendFixed32(b []byte, v uint32) []byte {
- b = append(b,
- byte(v),
- byte(v>>8),
- byte(v>>16),
- byte(v>>24))
- return b
-}
-
-// appendFixed64 appends an encoded fixed64 to b.
-func appendFixed64(b []byte, v uint64) []byte {
- b = append(b,
- byte(v),
- byte(v>>8),
- byte(v>>16),
- byte(v>>24),
- byte(v>>32),
- byte(v>>40),
- byte(v>>48),
- byte(v>>56))
- return b
-}
-
-// appendVarint appends an encoded varint to b.
-func appendVarint(b []byte, v uint64) []byte {
- // TODO: make 1-byte (maybe 2-byte) case inline-able, once we
- // have non-leaf inliner.
- switch {
- case v < 1<<7:
- b = append(b, byte(v))
- case v < 1<<14:
- b = append(b,
- byte(v&0x7f|0x80),
- byte(v>>7))
- case v < 1<<21:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte(v>>14))
- case v < 1<<28:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte(v>>21))
- case v < 1<<35:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte(v>>28))
- case v < 1<<42:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte((v>>28)&0x7f|0x80),
- byte(v>>35))
- case v < 1<<49:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte((v>>28)&0x7f|0x80),
- byte((v>>35)&0x7f|0x80),
- byte(v>>42))
- case v < 1<<56:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte((v>>28)&0x7f|0x80),
- byte((v>>35)&0x7f|0x80),
- byte((v>>42)&0x7f|0x80),
- byte(v>>49))
- case v < 1<<63:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte((v>>28)&0x7f|0x80),
- byte((v>>35)&0x7f|0x80),
- byte((v>>42)&0x7f|0x80),
- byte((v>>49)&0x7f|0x80),
- byte(v>>56))
- default:
- b = append(b,
- byte(v&0x7f|0x80),
- byte((v>>7)&0x7f|0x80),
- byte((v>>14)&0x7f|0x80),
- byte((v>>21)&0x7f|0x80),
- byte((v>>28)&0x7f|0x80),
- byte((v>>35)&0x7f|0x80),
- byte((v>>42)&0x7f|0x80),
- byte((v>>49)&0x7f|0x80),
- byte((v>>56)&0x7f|0x80),
- 1)
- }
- return b
-}
-
-func appendFixed32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint32()
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, v)
- return b, nil
-}
-func appendFixed32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint32()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, v)
- return b, nil
-}
-func appendFixed32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toUint32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, *p)
- return b, nil
-}
-func appendFixed32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, v)
- }
- return b, nil
-}
-func appendFixed32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(4*len(s)))
- for _, v := range s {
- b = appendFixed32(b, v)
- }
- return b, nil
-}
-func appendFixedS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, uint32(v))
- return b, nil
-}
-func appendFixedS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, uint32(v))
- return b, nil
-}
-func appendFixedS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := ptr.getInt32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, uint32(*p))
- return b, nil
-}
-func appendFixedS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, uint32(v))
- }
- return b, nil
-}
-func appendFixedS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(4*len(s)))
- for _, v := range s {
- b = appendFixed32(b, uint32(v))
- }
- return b, nil
-}
-func appendFloat32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := math.Float32bits(*ptr.toFloat32())
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, v)
- return b, nil
-}
-func appendFloat32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := math.Float32bits(*ptr.toFloat32())
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, v)
- return b, nil
-}
-func appendFloat32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toFloat32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, math.Float32bits(*p))
- return b, nil
-}
-func appendFloat32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toFloat32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed32(b, math.Float32bits(v))
- }
- return b, nil
-}
-func appendFloat32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toFloat32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(4*len(s)))
- for _, v := range s {
- b = appendFixed32(b, math.Float32bits(v))
- }
- return b, nil
-}
-func appendFixed64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint64()
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, v)
- return b, nil
-}
-func appendFixed64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint64()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, v)
- return b, nil
-}
-func appendFixed64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toUint64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, *p)
- return b, nil
-}
-func appendFixed64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, v)
- }
- return b, nil
-}
-func appendFixed64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(8*len(s)))
- for _, v := range s {
- b = appendFixed64(b, v)
- }
- return b, nil
-}
-func appendFixedS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, uint64(v))
- return b, nil
-}
-func appendFixedS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, uint64(v))
- return b, nil
-}
-func appendFixedS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, uint64(*p))
- return b, nil
-}
-func appendFixedS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, uint64(v))
- }
- return b, nil
-}
-func appendFixedS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(8*len(s)))
- for _, v := range s {
- b = appendFixed64(b, uint64(v))
- }
- return b, nil
-}
-func appendFloat64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := math.Float64bits(*ptr.toFloat64())
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, v)
- return b, nil
-}
-func appendFloat64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := math.Float64bits(*ptr.toFloat64())
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, v)
- return b, nil
-}
-func appendFloat64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toFloat64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, math.Float64bits(*p))
- return b, nil
-}
-func appendFloat64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toFloat64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendFixed64(b, math.Float64bits(v))
- }
- return b, nil
-}
-func appendFloat64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toFloat64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(8*len(s)))
- for _, v := range s {
- b = appendFixed64(b, math.Float64bits(v))
- }
- return b, nil
-}
-func appendVarint32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint32()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarint32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint32()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarint32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toUint32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(*p))
- return b, nil
-}
-func appendVarint32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendVarint32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendVarintS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarintS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarintS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := ptr.getInt32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(*p))
- return b, nil
-}
-func appendVarintS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendVarintS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendVarint64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint64()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, v)
- return b, nil
-}
-func appendVarint64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toUint64()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, v)
- return b, nil
-}
-func appendVarint64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toUint64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, *p)
- return b, nil
-}
-func appendVarint64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, v)
- }
- return b, nil
-}
-func appendVarint64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toUint64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(v)
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, v)
- }
- return b, nil
-}
-func appendVarintS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarintS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- return b, nil
-}
-func appendVarintS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(*p))
- return b, nil
-}
-func appendVarintS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendVarintS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v))
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, uint64(v))
- }
- return b, nil
-}
-func appendZigzag32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
- return b, nil
-}
-func appendZigzag32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt32()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
- return b, nil
-}
-func appendZigzag32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := ptr.getInt32Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- v := *p
- b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
- return b, nil
-}
-func appendZigzag32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
- }
- return b, nil
-}
-func appendZigzag32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := ptr.getInt32Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
- }
- return b, nil
-}
-func appendZigzag64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
- return b, nil
-}
-func appendZigzag64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toInt64()
- if v == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
- return b, nil
-}
-func appendZigzag64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toInt64Ptr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- v := *p
- b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
- return b, nil
-}
-func appendZigzag64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
- }
- return b, nil
-}
-func appendZigzag64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toInt64Slice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- // compute size
- n := 0
- for _, v := range s {
- n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63)))
- }
- b = appendVarint(b, uint64(n))
- for _, v := range s {
- b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
- }
- return b, nil
-}
-func appendBoolValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toBool()
- b = appendVarint(b, wiretag)
- if v {
- b = append(b, 1)
- } else {
- b = append(b, 0)
- }
- return b, nil
-}
-func appendBoolValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toBool()
- if !v {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = append(b, 1)
- return b, nil
-}
-
-func appendBoolPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toBoolPtr()
- if p == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- if *p {
- b = append(b, 1)
- } else {
- b = append(b, 0)
- }
- return b, nil
-}
-func appendBoolSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toBoolSlice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- if v {
- b = append(b, 1)
- } else {
- b = append(b, 0)
- }
- }
- return b, nil
-}
-func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toBoolSlice()
- if len(s) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag&^7|WireBytes)
- b = appendVarint(b, uint64(len(s)))
- for _, v := range s {
- if v {
- b = append(b, 1)
- } else {
- b = append(b, 0)
- }
- }
- return b, nil
-}
-func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toString()
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toString()
- if v == "" {
- return b, nil
- }
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- p := *ptr.toStringPtr()
- if p == nil {
- return b, nil
- }
- v := *p
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toStringSlice()
- for _, v := range s {
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- }
- return b, nil
-}
-func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toBytes()
- if v == nil {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendBytes3(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toBytes()
- if len(v) == 0 {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendBytesOneof(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- v := *ptr.toBytes()
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- return b, nil
-}
-func appendBytesSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
- s := *ptr.toBytesSlice()
- for _, v := range s {
- b = appendVarint(b, wiretag)
- b = appendVarint(b, uint64(len(v)))
- b = append(b, v...)
- }
- return b, nil
-}
-
-// makeGroupMarshaler returns the sizer and marshaler for a group.
-// u is the marshal info of the underlying message.
-func makeGroupMarshaler(u *marshalInfo) (sizer, marshaler) {
- return func(ptr pointer, tagsize int) int {
- p := ptr.getPointer()
- if p.isNil() {
- return 0
- }
- return u.size(p) + 2*tagsize
- },
- func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
- p := ptr.getPointer()
- if p.isNil() {
- return b, nil
- }
- var err error
- b = appendVarint(b, wiretag) // start group
- b, err = u.marshal(b, p, deterministic)
- b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
- return b, err
- }
-}
-
-// makeGroupSliceMarshaler returns the sizer and marshaler for a group slice.
-// u is the marshal info of the underlying message.
-func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
- return func(ptr pointer, tagsize int) int {
- s := ptr.getPointerSlice()
- n := 0
- for _, v := range s {
- if v.isNil() {
- continue
- }
- n += u.size(v) + 2*tagsize
- }
- return n
- },
- func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
- s := ptr.getPointerSlice()
- var err, errreq error
- for _, v := range s {
- if v.isNil() {
- return b, errRepeatedHasNil
- }
- b = appendVarint(b, wiretag) // start group
- b, err = u.marshal(b, v, deterministic)
- b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
- if err != nil {
- if _, ok := err.(*RequiredNotSetError); ok {
- // Required field in submessage is not set.
- // We record the error but keep going, to give a complete marshaling.
- if errreq == nil {
- errreq = err
- }
- continue
- }
- if err == ErrNil {
- err = errRepeatedHasNil
- }
- return b, err
- }
- }
- return b, errreq
- }
-}
-
-// makeMessageMarshaler returns the sizer and marshaler for a message field.
-// u is the marshal info of the message.
-func makeMessageMarshaler(u *marshalInfo) (sizer, marshaler) {
- return func(ptr pointer, tagsize int) int {
- p := ptr.getPointer()
- if p.isNil() {
- return 0
- }
- siz := u.size(p)
- return siz + SizeVarint(uint64(siz)) + tagsize
- },
- func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
- p := ptr.getPointer()
- if p.isNil() {
- return b, nil
- }
- b = appendVarint(b, wiretag)
- siz := u.cachedsize(p)
- b = appendVarint(b, uint64(siz))
- return u.marshal(b, p, deterministic)
- }
-}
-
-// makeMessageSliceMarshaler returns the sizer and marshaler for a message slice.
-// u is the marshal info of the message.
-func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
- return func(ptr pointer, tagsize int) int {
- s := ptr.getPointerSlice()
- n := 0
- for _, v := range s {
- if v.isNil() {
- continue
- }
- siz := u.size(v)
- n += siz + SizeVarint(uint64(siz)) + tagsize
- }
- return n
- },
- func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
- s := ptr.getPointerSlice()
- var err, errreq error
- for _, v := range s {
- if v.isNil() {
- return b, errRepeatedHasNil
- }
- b = appendVarint(b, wiretag)
- siz := u.cachedsize(v)
- b = appendVarint(b, uint64(siz))
- b, err = u.marshal(b, v, deterministic)
-
- if err != nil {
- if _, ok := err.(*RequiredNotSetError); ok {
- // Required field in submessage is not set.
- // We record the error but keep going, to give a complete marshaling.
- if errreq == nil {
- errreq = err
- }
- continue
- }
- if err == ErrNil {
- err = errRepeatedHasNil
- }
- return b, err
- }
- }
- return b, errreq
- }
-}
-
-// makeMapMarshaler returns the sizer and marshaler for a map field.
-// f is the pointer to the reflect data structure of the field.
-func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) {
- // figure out key and value type
- t := f.Type
- keyType := t.Key()
- valType := t.Elem()
- keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",")
- valTags := strings.Split(f.Tag.Get("protobuf_val"), ",")
- keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map
- valSizer, valMarshaler := typeMarshaler(valType, valTags, false, false) // don't omit zero value in map
- keyWireTag := 1<<3 | wiretype(keyTags[0])
- valWireTag := 2<<3 | wiretype(valTags[0])
-
- // We create an interface to get the addresses of the map key and value.
- // If value is pointer-typed, the interface is a direct interface, the
- // idata itself is the value. Otherwise, the idata is the pointer to the
- // value.
- // Key cannot be pointer-typed.
- valIsPtr := valType.Kind() == reflect.Ptr
- return func(ptr pointer, tagsize int) int {
- m := ptr.asPointerTo(t).Elem() // the map
- n := 0
- for _, k := range m.MapKeys() {
- ki := k.Interface()
- vi := m.MapIndex(k).Interface()
- kaddr := toAddrPointer(&ki, false) // pointer to key
- vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
- siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
- n += siz + SizeVarint(uint64(siz)) + tagsize
- }
- return n
- },
- func(b []byte, ptr pointer, tag uint64, deterministic bool) ([]byte, error) {
- m := ptr.asPointerTo(t).Elem() // the map
- var err error
- keys := m.MapKeys()
- if len(keys) > 1 && deterministic {
- sort.Sort(mapKeys(keys))
- }
- for _, k := range keys {
- ki := k.Interface()
- vi := m.MapIndex(k).Interface()
- kaddr := toAddrPointer(&ki, false) // pointer to key
- vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
- b = appendVarint(b, tag)
- siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
- b = appendVarint(b, uint64(siz))
- b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic)
- if err != nil {
- return b, err
- }
- b, err = valMarshaler(b, vaddr, valWireTag, deterministic)
- if err != nil && err != ErrNil { // allow nil value in map
- return b, err
- }
- }
- return b, nil
- }
-}
-
-// makeOneOfMarshaler returns the sizer and marshaler for a oneof field.
-// fi is the marshal info of the field.
-// f is the pointer to the reflect data structure of the field.
-func makeOneOfMarshaler(fi *marshalFieldInfo, f *reflect.StructField) (sizer, marshaler) {
- // Oneof field is an interface. We need to get the actual data type on the fly.
- t := f.Type
- return func(ptr pointer, _ int) int {
- p := ptr.getInterfacePointer()
- if p.isNil() {
- return 0
- }
- v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct
- telem := v.Type()
- e := fi.oneofElems[telem]
- return e.sizer(p, e.tagsize)
- },
- func(b []byte, ptr pointer, _ uint64, deterministic bool) ([]byte, error) {
- p := ptr.getInterfacePointer()
- if p.isNil() {
- return b, nil
- }
- v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct
- telem := v.Type()
- if telem.Field(0).Type.Kind() == reflect.Ptr && p.getPointer().isNil() {
- return b, errOneofHasNil
- }
- e := fi.oneofElems[telem]
- return e.marshaler(b, p, e.wiretag, deterministic)
- }
-}
-
-// sizeExtensions computes the size of encoded data for a XXX_InternalExtensions field.
-func (u *marshalInfo) sizeExtensions(ext *XXX_InternalExtensions) int {
- m, mu := ext.extensionsRead()
- if m == nil {
- return 0
- }
- mu.Lock()
-
- n := 0
- for _, e := range m {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- n += len(e.enc)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- n += ei.sizer(p, ei.tagsize)
- }
- mu.Unlock()
- return n
-}
-
-// appendExtensions marshals a XXX_InternalExtensions field to the end of byte slice b.
-func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) {
- m, mu := ext.extensionsRead()
- if m == nil {
- return b, nil
- }
- mu.Lock()
- defer mu.Unlock()
-
- var err error
-
- // Fast-path for common cases: zero or one extensions.
- // Don't bother sorting the keys.
- if len(m) <= 1 {
- for _, e := range m {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- b = append(b, e.enc...)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
- if err != nil {
- return b, err
- }
- }
- return b, nil
- }
-
- // Sort the keys to provide a deterministic encoding.
- // Not sure this is required, but the old code does it.
- keys := make([]int, 0, len(m))
- for k := range m {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
-
- for _, k := range keys {
- e := m[int32(k)]
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- b = append(b, e.enc...)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
- if err != nil {
- return b, err
- }
- }
- return b, nil
-}
-
-// message set format is:
-// message MessageSet {
-// repeated group Item = 1 {
-// required int32 type_id = 2;
-// required string message = 3;
-// };
-// }
-
-// sizeMessageSet computes the size of encoded data for a XXX_InternalExtensions field
-// in message set format (above).
-func (u *marshalInfo) sizeMessageSet(ext *XXX_InternalExtensions) int {
- m, mu := ext.extensionsRead()
- if m == nil {
- return 0
- }
- mu.Lock()
-
- n := 0
- for id, e := range m {
- n += 2 // start group, end group. tag = 1 (size=1)
- n += SizeVarint(uint64(id)) + 1 // type_id, tag = 2 (size=1)
-
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
- siz := len(msgWithLen)
- n += siz + 1 // message, tag = 3 (size=1)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- n += ei.sizer(p, 1) // message, tag = 3 (size=1)
- }
- mu.Unlock()
- return n
-}
-
-// appendMessageSet marshals a XXX_InternalExtensions field in message set format (above)
-// to the end of byte slice b.
-func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) {
- m, mu := ext.extensionsRead()
- if m == nil {
- return b, nil
- }
- mu.Lock()
- defer mu.Unlock()
-
- var err error
-
- // Fast-path for common cases: zero or one extensions.
- // Don't bother sorting the keys.
- if len(m) <= 1 {
- for id, e := range m {
- b = append(b, 1<<3|WireStartGroup)
- b = append(b, 2<<3|WireVarint)
- b = appendVarint(b, uint64(id))
-
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
- b = append(b, 3<<3|WireBytes)
- b = append(b, msgWithLen...)
- b = append(b, 1<<3|WireEndGroup)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
- if err != nil {
- return b, err
- }
- b = append(b, 1<<3|WireEndGroup)
- }
- return b, nil
- }
-
- // Sort the keys to provide a deterministic encoding.
- keys := make([]int, 0, len(m))
- for k := range m {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
-
- for _, id := range keys {
- e := m[int32(id)]
- b = append(b, 1<<3|WireStartGroup)
- b = append(b, 2<<3|WireVarint)
- b = appendVarint(b, uint64(id))
-
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
- b = append(b, 3<<3|WireBytes)
- b = append(b, msgWithLen...)
- b = append(b, 1<<3|WireEndGroup)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
- b = append(b, 1<<3|WireEndGroup)
- if err != nil {
- return b, err
- }
- }
- return b, nil
-}
-
-// sizeV1Extensions computes the size of encoded data for a V1-API extension field.
-func (u *marshalInfo) sizeV1Extensions(m map[int32]Extension) int {
- if m == nil {
- return 0
- }
-
- n := 0
- for _, e := range m {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- n += len(e.enc)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- n += ei.sizer(p, ei.tagsize)
- }
- return n
-}
-
-// appendV1Extensions marshals a V1-API extension field to the end of byte slice b.
-func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, deterministic bool) ([]byte, error) {
- if m == nil {
- return b, nil
- }
-
- // Sort the keys to provide a deterministic encoding.
- keys := make([]int, 0, len(m))
- for k := range m {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
-
- var err error
- for _, k := range keys {
- e := m[int32(k)]
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- b = append(b, e.enc...)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- ei := u.getExtElemInfo(e.desc)
- v := e.value
- p := toAddrPointer(&v, ei.isptr)
- b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
- if err != nil {
- return b, err
- }
- }
- return b, nil
-}
-
-// newMarshaler is the interface representing objects that can marshal themselves.
-//
-// This exists to support protoc-gen-go generated messages.
-// The proto package will stop type-asserting to this interface in the future.
-//
-// DO NOT DEPEND ON THIS.
-type newMarshaler interface {
- XXX_Size() int
- XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
-}
-
-// Size returns the encoded size of a protocol buffer message.
-// This is the main entry point.
-func Size(pb Message) int {
- if m, ok := pb.(newMarshaler); ok {
- return m.XXX_Size()
- }
- if m, ok := pb.(Marshaler); ok {
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- b, _ := m.Marshal()
- return len(b)
- }
- // in case somehow we didn't generate the wrapper
- if pb == nil {
- return 0
- }
- var info InternalMessageInfo
- return info.Size(pb)
-}
-
-// Marshal takes a protocol buffer message
-// and encodes it into the wire format, returning the data.
-// This is the main entry point.
-func Marshal(pb Message) ([]byte, error) {
- if m, ok := pb.(newMarshaler); ok {
- siz := m.XXX_Size()
- b := make([]byte, 0, siz)
- return m.XXX_Marshal(b, false)
- }
- if m, ok := pb.(Marshaler); ok {
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- return m.Marshal()
- }
- // in case somehow we didn't generate the wrapper
- if pb == nil {
- return nil, ErrNil
- }
- var info InternalMessageInfo
- siz := info.Size(pb)
- b := make([]byte, 0, siz)
- return info.Marshal(b, pb, false)
-}
-
-// Marshal takes a protocol buffer message
-// and encodes it into the wire format, writing the result to the
-// Buffer.
-// This is an alternative entry point. It is not necessary to use
-// a Buffer for most applications.
-func (p *Buffer) Marshal(pb Message) error {
- var err error
- if m, ok := pb.(newMarshaler); ok {
- siz := m.XXX_Size()
- p.grow(siz) // make sure buf has enough capacity
- p.buf, err = m.XXX_Marshal(p.buf, p.deterministic)
- return err
- }
- if m, ok := pb.(Marshaler); ok {
- // If the message can marshal itself, let it do it, for compatibility.
- // NOTE: This is not efficient.
- b, err := m.Marshal()
- p.buf = append(p.buf, b...)
- return err
- }
- // in case somehow we didn't generate the wrapper
- if pb == nil {
- return ErrNil
- }
- var info InternalMessageInfo
- siz := info.Size(pb)
- p.grow(siz) // make sure buf has enough capacity
- p.buf, err = info.Marshal(p.buf, pb, p.deterministic)
- return err
-}
-
-// grow grows the buffer's capacity, if necessary, to guarantee space for
-// another n bytes. After grow(n), at least n bytes can be written to the
-// buffer without another allocation.
-func (p *Buffer) grow(n int) {
- need := len(p.buf) + n
- if need <= cap(p.buf) {
- return
- }
- newCap := len(p.buf) * 2
- if newCap < need {
- newCap = need
- }
- p.buf = append(make([]byte, 0, newCap), p.buf...)
-}
diff --git a/vendor/github.com/golang/protobuf/proto/table_merge.go b/vendor/github.com/golang/protobuf/proto/table_merge.go
deleted file mode 100644
index 5525def6..00000000
--- a/vendor/github.com/golang/protobuf/proto/table_merge.go
+++ /dev/null
@@ -1,654 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-import (
- "fmt"
- "reflect"
- "strings"
- "sync"
- "sync/atomic"
-)
-
-// Merge merges the src message into dst.
-// This assumes that dst and src of the same type and are non-nil.
-func (a *InternalMessageInfo) Merge(dst, src Message) {
- mi := atomicLoadMergeInfo(&a.merge)
- if mi == nil {
- mi = getMergeInfo(reflect.TypeOf(dst).Elem())
- atomicStoreMergeInfo(&a.merge, mi)
- }
- mi.merge(toPointer(&dst), toPointer(&src))
-}
-
-type mergeInfo struct {
- typ reflect.Type
-
- initialized int32 // 0: only typ is valid, 1: everything is valid
- lock sync.Mutex
-
- fields []mergeFieldInfo
- unrecognized field // Offset of XXX_unrecognized
-}
-
-type mergeFieldInfo struct {
- field field // Offset of field, guaranteed to be valid
-
- // isPointer reports whether the value in the field is a pointer.
- // This is true for the following situations:
- // * Pointer to struct
- // * Pointer to basic type (proto2 only)
- // * Slice (first value in slice header is a pointer)
- // * String (first value in string header is a pointer)
- isPointer bool
-
- // basicWidth reports the width of the field assuming that it is directly
- // embedded in the struct (as is the case for basic types in proto3).
- // The possible values are:
- // 0: invalid
- // 1: bool
- // 4: int32, uint32, float32
- // 8: int64, uint64, float64
- basicWidth int
-
- // Where dst and src are pointers to the types being merged.
- merge func(dst, src pointer)
-}
-
-var (
- mergeInfoMap = map[reflect.Type]*mergeInfo{}
- mergeInfoLock sync.Mutex
-)
-
-func getMergeInfo(t reflect.Type) *mergeInfo {
- mergeInfoLock.Lock()
- defer mergeInfoLock.Unlock()
- mi := mergeInfoMap[t]
- if mi == nil {
- mi = &mergeInfo{typ: t}
- mergeInfoMap[t] = mi
- }
- return mi
-}
-
-// merge merges src into dst assuming they are both of type *mi.typ.
-func (mi *mergeInfo) merge(dst, src pointer) {
- if dst.isNil() {
- panic("proto: nil destination")
- }
- if src.isNil() {
- return // Nothing to do.
- }
-
- if atomic.LoadInt32(&mi.initialized) == 0 {
- mi.computeMergeInfo()
- }
-
- for _, fi := range mi.fields {
- sfp := src.offset(fi.field)
-
- // As an optimization, we can avoid the merge function call cost
- // if we know for sure that the source will have no effect
- // by checking if it is the zero value.
- if unsafeAllowed {
- if fi.isPointer && sfp.getPointer().isNil() { // Could be slice or string
- continue
- }
- if fi.basicWidth > 0 {
- switch {
- case fi.basicWidth == 1 && !*sfp.toBool():
- continue
- case fi.basicWidth == 4 && *sfp.toUint32() == 0:
- continue
- case fi.basicWidth == 8 && *sfp.toUint64() == 0:
- continue
- }
- }
- }
-
- dfp := dst.offset(fi.field)
- fi.merge(dfp, sfp)
- }
-
- // TODO: Make this faster?
- out := dst.asPointerTo(mi.typ).Elem()
- in := src.asPointerTo(mi.typ).Elem()
- if emIn, err := extendable(in.Addr().Interface()); err == nil {
- emOut, _ := extendable(out.Addr().Interface())
- mIn, muIn := emIn.extensionsRead()
- if mIn != nil {
- mOut := emOut.extensionsWrite()
- muIn.Lock()
- mergeExtension(mOut, mIn)
- muIn.Unlock()
- }
- }
-
- if mi.unrecognized.IsValid() {
- if b := *src.offset(mi.unrecognized).toBytes(); len(b) > 0 {
- *dst.offset(mi.unrecognized).toBytes() = append([]byte(nil), b...)
- }
- }
-}
-
-func (mi *mergeInfo) computeMergeInfo() {
- mi.lock.Lock()
- defer mi.lock.Unlock()
- if mi.initialized != 0 {
- return
- }
- t := mi.typ
- n := t.NumField()
-
- props := GetProperties(t)
- for i := 0; i < n; i++ {
- f := t.Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
-
- mfi := mergeFieldInfo{field: toField(&f)}
- tf := f.Type
-
- // As an optimization, we can avoid the merge function call cost
- // if we know for sure that the source will have no effect
- // by checking if it is the zero value.
- if unsafeAllowed {
- switch tf.Kind() {
- case reflect.Ptr, reflect.Slice, reflect.String:
- // As a special case, we assume slices and strings are pointers
- // since we know that the first field in the SliceSlice or
- // StringHeader is a data pointer.
- mfi.isPointer = true
- case reflect.Bool:
- mfi.basicWidth = 1
- case reflect.Int32, reflect.Uint32, reflect.Float32:
- mfi.basicWidth = 4
- case reflect.Int64, reflect.Uint64, reflect.Float64:
- mfi.basicWidth = 8
- }
- }
-
- // Unwrap tf to get at its most basic type.
- var isPointer, isSlice bool
- if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
- isSlice = true
- tf = tf.Elem()
- }
- if tf.Kind() == reflect.Ptr {
- isPointer = true
- tf = tf.Elem()
- }
- if isPointer && isSlice && tf.Kind() != reflect.Struct {
- panic("both pointer and slice for basic type in " + tf.Name())
- }
-
- switch tf.Kind() {
- case reflect.Int32:
- switch {
- case isSlice: // E.g., []int32
- mfi.merge = func(dst, src pointer) {
- // NOTE: toInt32Slice is not defined (see pointer_reflect.go).
- /*
- sfsp := src.toInt32Slice()
- if *sfsp != nil {
- dfsp := dst.toInt32Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []int64{}
- }
- }
- */
- sfs := src.getInt32Slice()
- if sfs != nil {
- dfs := dst.getInt32Slice()
- dfs = append(dfs, sfs...)
- if dfs == nil {
- dfs = []int32{}
- }
- dst.setInt32Slice(dfs)
- }
- }
- case isPointer: // E.g., *int32
- mfi.merge = func(dst, src pointer) {
- // NOTE: toInt32Ptr is not defined (see pointer_reflect.go).
- /*
- sfpp := src.toInt32Ptr()
- if *sfpp != nil {
- dfpp := dst.toInt32Ptr()
- if *dfpp == nil {
- *dfpp = Int32(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- */
- sfp := src.getInt32Ptr()
- if sfp != nil {
- dfp := dst.getInt32Ptr()
- if dfp == nil {
- dst.setInt32Ptr(*sfp)
- } else {
- *dfp = *sfp
- }
- }
- }
- default: // E.g., int32
- mfi.merge = func(dst, src pointer) {
- if v := *src.toInt32(); v != 0 {
- *dst.toInt32() = v
- }
- }
- }
- case reflect.Int64:
- switch {
- case isSlice: // E.g., []int64
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toInt64Slice()
- if *sfsp != nil {
- dfsp := dst.toInt64Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []int64{}
- }
- }
- }
- case isPointer: // E.g., *int64
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toInt64Ptr()
- if *sfpp != nil {
- dfpp := dst.toInt64Ptr()
- if *dfpp == nil {
- *dfpp = Int64(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., int64
- mfi.merge = func(dst, src pointer) {
- if v := *src.toInt64(); v != 0 {
- *dst.toInt64() = v
- }
- }
- }
- case reflect.Uint32:
- switch {
- case isSlice: // E.g., []uint32
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toUint32Slice()
- if *sfsp != nil {
- dfsp := dst.toUint32Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []uint32{}
- }
- }
- }
- case isPointer: // E.g., *uint32
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toUint32Ptr()
- if *sfpp != nil {
- dfpp := dst.toUint32Ptr()
- if *dfpp == nil {
- *dfpp = Uint32(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., uint32
- mfi.merge = func(dst, src pointer) {
- if v := *src.toUint32(); v != 0 {
- *dst.toUint32() = v
- }
- }
- }
- case reflect.Uint64:
- switch {
- case isSlice: // E.g., []uint64
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toUint64Slice()
- if *sfsp != nil {
- dfsp := dst.toUint64Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []uint64{}
- }
- }
- }
- case isPointer: // E.g., *uint64
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toUint64Ptr()
- if *sfpp != nil {
- dfpp := dst.toUint64Ptr()
- if *dfpp == nil {
- *dfpp = Uint64(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., uint64
- mfi.merge = func(dst, src pointer) {
- if v := *src.toUint64(); v != 0 {
- *dst.toUint64() = v
- }
- }
- }
- case reflect.Float32:
- switch {
- case isSlice: // E.g., []float32
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toFloat32Slice()
- if *sfsp != nil {
- dfsp := dst.toFloat32Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []float32{}
- }
- }
- }
- case isPointer: // E.g., *float32
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toFloat32Ptr()
- if *sfpp != nil {
- dfpp := dst.toFloat32Ptr()
- if *dfpp == nil {
- *dfpp = Float32(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., float32
- mfi.merge = func(dst, src pointer) {
- if v := *src.toFloat32(); v != 0 {
- *dst.toFloat32() = v
- }
- }
- }
- case reflect.Float64:
- switch {
- case isSlice: // E.g., []float64
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toFloat64Slice()
- if *sfsp != nil {
- dfsp := dst.toFloat64Slice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []float64{}
- }
- }
- }
- case isPointer: // E.g., *float64
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toFloat64Ptr()
- if *sfpp != nil {
- dfpp := dst.toFloat64Ptr()
- if *dfpp == nil {
- *dfpp = Float64(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., float64
- mfi.merge = func(dst, src pointer) {
- if v := *src.toFloat64(); v != 0 {
- *dst.toFloat64() = v
- }
- }
- }
- case reflect.Bool:
- switch {
- case isSlice: // E.g., []bool
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toBoolSlice()
- if *sfsp != nil {
- dfsp := dst.toBoolSlice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []bool{}
- }
- }
- }
- case isPointer: // E.g., *bool
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toBoolPtr()
- if *sfpp != nil {
- dfpp := dst.toBoolPtr()
- if *dfpp == nil {
- *dfpp = Bool(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., bool
- mfi.merge = func(dst, src pointer) {
- if v := *src.toBool(); v {
- *dst.toBool() = v
- }
- }
- }
- case reflect.String:
- switch {
- case isSlice: // E.g., []string
- mfi.merge = func(dst, src pointer) {
- sfsp := src.toStringSlice()
- if *sfsp != nil {
- dfsp := dst.toStringSlice()
- *dfsp = append(*dfsp, *sfsp...)
- if *dfsp == nil {
- *dfsp = []string{}
- }
- }
- }
- case isPointer: // E.g., *string
- mfi.merge = func(dst, src pointer) {
- sfpp := src.toStringPtr()
- if *sfpp != nil {
- dfpp := dst.toStringPtr()
- if *dfpp == nil {
- *dfpp = String(**sfpp)
- } else {
- **dfpp = **sfpp
- }
- }
- }
- default: // E.g., string
- mfi.merge = func(dst, src pointer) {
- if v := *src.toString(); v != "" {
- *dst.toString() = v
- }
- }
- }
- case reflect.Slice:
- isProto3 := props.Prop[i].proto3
- switch {
- case isPointer:
- panic("bad pointer in byte slice case in " + tf.Name())
- case tf.Elem().Kind() != reflect.Uint8:
- panic("bad element kind in byte slice case in " + tf.Name())
- case isSlice: // E.g., [][]byte
- mfi.merge = func(dst, src pointer) {
- sbsp := src.toBytesSlice()
- if *sbsp != nil {
- dbsp := dst.toBytesSlice()
- for _, sb := range *sbsp {
- if sb == nil {
- *dbsp = append(*dbsp, nil)
- } else {
- *dbsp = append(*dbsp, append([]byte{}, sb...))
- }
- }
- if *dbsp == nil {
- *dbsp = [][]byte{}
- }
- }
- }
- default: // E.g., []byte
- mfi.merge = func(dst, src pointer) {
- sbp := src.toBytes()
- if *sbp != nil {
- dbp := dst.toBytes()
- if !isProto3 || len(*sbp) > 0 {
- *dbp = append([]byte{}, *sbp...)
- }
- }
- }
- }
- case reflect.Struct:
- switch {
- case !isPointer:
- panic(fmt.Sprintf("message field %s without pointer", tf))
- case isSlice: // E.g., []*pb.T
- mi := getMergeInfo(tf)
- mfi.merge = func(dst, src pointer) {
- sps := src.getPointerSlice()
- if sps != nil {
- dps := dst.getPointerSlice()
- for _, sp := range sps {
- var dp pointer
- if !sp.isNil() {
- dp = valToPointer(reflect.New(tf))
- mi.merge(dp, sp)
- }
- dps = append(dps, dp)
- }
- if dps == nil {
- dps = []pointer{}
- }
- dst.setPointerSlice(dps)
- }
- }
- default: // E.g., *pb.T
- mi := getMergeInfo(tf)
- mfi.merge = func(dst, src pointer) {
- sp := src.getPointer()
- if !sp.isNil() {
- dp := dst.getPointer()
- if dp.isNil() {
- dp = valToPointer(reflect.New(tf))
- dst.setPointer(dp)
- }
- mi.merge(dp, sp)
- }
- }
- }
- case reflect.Map:
- switch {
- case isPointer || isSlice:
- panic("bad pointer or slice in map case in " + tf.Name())
- default: // E.g., map[K]V
- mfi.merge = func(dst, src pointer) {
- sm := src.asPointerTo(tf).Elem()
- if sm.Len() == 0 {
- return
- }
- dm := dst.asPointerTo(tf).Elem()
- if dm.IsNil() {
- dm.Set(reflect.MakeMap(tf))
- }
-
- switch tf.Elem().Kind() {
- case reflect.Ptr: // Proto struct (e.g., *T)
- for _, key := range sm.MapKeys() {
- val := sm.MapIndex(key)
- val = reflect.ValueOf(Clone(val.Interface().(Message)))
- dm.SetMapIndex(key, val)
- }
- case reflect.Slice: // E.g. Bytes type (e.g., []byte)
- for _, key := range sm.MapKeys() {
- val := sm.MapIndex(key)
- val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
- dm.SetMapIndex(key, val)
- }
- default: // Basic type (e.g., string)
- for _, key := range sm.MapKeys() {
- val := sm.MapIndex(key)
- dm.SetMapIndex(key, val)
- }
- }
- }
- }
- case reflect.Interface:
- // Must be oneof field.
- switch {
- case isPointer || isSlice:
- panic("bad pointer or slice in interface case in " + tf.Name())
- default: // E.g., interface{}
- // TODO: Make this faster?
- mfi.merge = func(dst, src pointer) {
- su := src.asPointerTo(tf).Elem()
- if !su.IsNil() {
- du := dst.asPointerTo(tf).Elem()
- typ := su.Elem().Type()
- if du.IsNil() || du.Elem().Type() != typ {
- du.Set(reflect.New(typ.Elem())) // Initialize interface if empty
- }
- sv := su.Elem().Elem().Field(0)
- if sv.Kind() == reflect.Ptr && sv.IsNil() {
- return
- }
- dv := du.Elem().Elem().Field(0)
- if dv.Kind() == reflect.Ptr && dv.IsNil() {
- dv.Set(reflect.New(sv.Type().Elem())) // Initialize proto message if empty
- }
- switch sv.Type().Kind() {
- case reflect.Ptr: // Proto struct (e.g., *T)
- Merge(dv.Interface().(Message), sv.Interface().(Message))
- case reflect.Slice: // E.g. Bytes type (e.g., []byte)
- dv.Set(reflect.ValueOf(append([]byte{}, sv.Bytes()...)))
- default: // Basic type (e.g., string)
- dv.Set(sv)
- }
- }
- }
- }
- default:
- panic(fmt.Sprintf("merger not found for type:%s", tf))
- }
- mi.fields = append(mi.fields, mfi)
- }
-
- mi.unrecognized = invalidField
- if f, ok := t.FieldByName("XXX_unrecognized"); ok {
- if f.Type != reflect.TypeOf([]byte{}) {
- panic("expected XXX_unrecognized to be of type []byte")
- }
- mi.unrecognized = toField(&f)
- }
-
- atomic.StoreInt32(&mi.initialized, 1)
-}
diff --git a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
deleted file mode 100644
index 55f0340a..00000000
--- a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
+++ /dev/null
@@ -1,1967 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-import (
- "errors"
- "fmt"
- "io"
- "math"
- "reflect"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "unicode/utf8"
-)
-
-// Unmarshal is the entry point from the generated .pb.go files.
-// This function is not intended to be used by non-generated code.
-// This function is not subject to any compatibility guarantee.
-// msg contains a pointer to a protocol buffer struct.
-// b is the data to be unmarshaled into the protocol buffer.
-// a is a pointer to a place to store cached unmarshal information.
-func (a *InternalMessageInfo) Unmarshal(msg Message, b []byte) error {
- // Load the unmarshal information for this message type.
- // The atomic load ensures memory consistency.
- u := atomicLoadUnmarshalInfo(&a.unmarshal)
- if u == nil {
- // Slow path: find unmarshal info for msg, update a with it.
- u = getUnmarshalInfo(reflect.TypeOf(msg).Elem())
- atomicStoreUnmarshalInfo(&a.unmarshal, u)
- }
- // Then do the unmarshaling.
- err := u.unmarshal(toPointer(&msg), b)
- return err
-}
-
-type unmarshalInfo struct {
- typ reflect.Type // type of the protobuf struct
-
- // 0 = only typ field is initialized
- // 1 = completely initialized
- initialized int32
- lock sync.Mutex // prevents double initialization
- dense []unmarshalFieldInfo // fields indexed by tag #
- sparse map[uint64]unmarshalFieldInfo // fields indexed by tag #
- reqFields []string // names of required fields
- reqMask uint64 // 1< 0 {
- // Read tag and wire type.
- // Special case 1 and 2 byte varints.
- var x uint64
- if b[0] < 128 {
- x = uint64(b[0])
- b = b[1:]
- } else if len(b) >= 2 && b[1] < 128 {
- x = uint64(b[0]&0x7f) + uint64(b[1])<<7
- b = b[2:]
- } else {
- var n int
- x, n = decodeVarint(b)
- if n == 0 {
- return io.ErrUnexpectedEOF
- }
- b = b[n:]
- }
- tag := x >> 3
- wire := int(x) & 7
-
- // Dispatch on the tag to one of the unmarshal* functions below.
- var f unmarshalFieldInfo
- if tag < uint64(len(u.dense)) {
- f = u.dense[tag]
- } else {
- f = u.sparse[tag]
- }
- if fn := f.unmarshal; fn != nil {
- var err error
- b, err = fn(b, m.offset(f.field), wire)
- if err == nil {
- reqMask |= f.reqMask
- continue
- }
- if r, ok := err.(*RequiredNotSetError); ok {
- // Remember this error, but keep parsing. We need to produce
- // a full parse even if a required field is missing.
- rnse = r
- reqMask |= f.reqMask
- continue
- }
- if err != errInternalBadWireType {
- return err
- }
- // Fragments with bad wire type are treated as unknown fields.
- }
-
- // Unknown tag.
- if !u.unrecognized.IsValid() {
- // Don't keep unrecognized data; just skip it.
- var err error
- b, err = skipField(b, wire)
- if err != nil {
- return err
- }
- continue
- }
- // Keep unrecognized data around.
- // maybe in extensions, maybe in the unrecognized field.
- z := m.offset(u.unrecognized).toBytes()
- var emap map[int32]Extension
- var e Extension
- for _, r := range u.extensionRanges {
- if uint64(r.Start) <= tag && tag <= uint64(r.End) {
- if u.extensions.IsValid() {
- mp := m.offset(u.extensions).toExtensions()
- emap = mp.extensionsWrite()
- e = emap[int32(tag)]
- z = &e.enc
- break
- }
- if u.oldExtensions.IsValid() {
- p := m.offset(u.oldExtensions).toOldExtensions()
- emap = *p
- if emap == nil {
- emap = map[int32]Extension{}
- *p = emap
- }
- e = emap[int32(tag)]
- z = &e.enc
- break
- }
- panic("no extensions field available")
- }
- }
-
- // Use wire type to skip data.
- var err error
- b0 := b
- b, err = skipField(b, wire)
- if err != nil {
- return err
- }
- *z = encodeVarint(*z, tag<<3|uint64(wire))
- *z = append(*z, b0[:len(b0)-len(b)]...)
-
- if emap != nil {
- emap[int32(tag)] = e
- }
- }
- if rnse != nil {
- // A required field of a submessage/group is missing. Return that error.
- return rnse
- }
- if reqMask != u.reqMask {
- // A required field of this message is missing.
- for _, n := range u.reqFields {
- if reqMask&1 == 0 {
- return &RequiredNotSetError{n}
- }
- reqMask >>= 1
- }
- }
- return nil
-}
-
-// computeUnmarshalInfo fills in u with information for use
-// in unmarshaling protocol buffers of type u.typ.
-func (u *unmarshalInfo) computeUnmarshalInfo() {
- u.lock.Lock()
- defer u.lock.Unlock()
- if u.initialized != 0 {
- return
- }
- t := u.typ
- n := t.NumField()
-
- // Set up the "not found" value for the unrecognized byte buffer.
- // This is the default for proto3.
- u.unrecognized = invalidField
- u.extensions = invalidField
- u.oldExtensions = invalidField
-
- // List of the generated type and offset for each oneof field.
- type oneofField struct {
- ityp reflect.Type // interface type of oneof field
- field field // offset in containing message
- }
- var oneofFields []oneofField
-
- for i := 0; i < n; i++ {
- f := t.Field(i)
- if f.Name == "XXX_unrecognized" {
- // The byte slice used to hold unrecognized input is special.
- if f.Type != reflect.TypeOf(([]byte)(nil)) {
- panic("bad type for XXX_unrecognized field: " + f.Type.Name())
- }
- u.unrecognized = toField(&f)
- continue
- }
- if f.Name == "XXX_InternalExtensions" {
- // Ditto here.
- if f.Type != reflect.TypeOf(XXX_InternalExtensions{}) {
- panic("bad type for XXX_InternalExtensions field: " + f.Type.Name())
- }
- u.extensions = toField(&f)
- if f.Tag.Get("protobuf_messageset") == "1" {
- u.isMessageSet = true
- }
- continue
- }
- if f.Name == "XXX_extensions" {
- // An older form of the extensions field.
- if f.Type != reflect.TypeOf((map[int32]Extension)(nil)) {
- panic("bad type for XXX_extensions field: " + f.Type.Name())
- }
- u.oldExtensions = toField(&f)
- continue
- }
- if f.Name == "XXX_NoUnkeyedLiteral" || f.Name == "XXX_sizecache" {
- continue
- }
-
- oneof := f.Tag.Get("protobuf_oneof")
- if oneof != "" {
- oneofFields = append(oneofFields, oneofField{f.Type, toField(&f)})
- // The rest of oneof processing happens below.
- continue
- }
-
- tags := f.Tag.Get("protobuf")
- tagArray := strings.Split(tags, ",")
- if len(tagArray) < 2 {
- panic("protobuf tag not enough fields in " + t.Name() + "." + f.Name + ": " + tags)
- }
- tag, err := strconv.Atoi(tagArray[1])
- if err != nil {
- panic("protobuf tag field not an integer: " + tagArray[1])
- }
-
- name := ""
- for _, tag := range tagArray[3:] {
- if strings.HasPrefix(tag, "name=") {
- name = tag[5:]
- }
- }
-
- // Extract unmarshaling function from the field (its type and tags).
- unmarshal := fieldUnmarshaler(&f)
-
- // Required field?
- var reqMask uint64
- if tagArray[2] == "req" {
- bit := len(u.reqFields)
- u.reqFields = append(u.reqFields, name)
- reqMask = uint64(1) << uint(bit)
- // TODO: if we have more than 64 required fields, we end up
- // not verifying that all required fields are present.
- // Fix this, perhaps using a count of required fields?
- }
-
- // Store the info in the correct slot in the message.
- u.setTag(tag, toField(&f), unmarshal, reqMask)
- }
-
- // Find any types associated with oneof fields.
- // TODO: XXX_OneofFuncs returns more info than we need. Get rid of some of it?
- fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs")
- if fn.IsValid() {
- res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{}
- for i := res.Len() - 1; i >= 0; i-- {
- v := res.Index(i) // interface{}
- tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X
- typ := tptr.Elem() // Msg_X
-
- f := typ.Field(0) // oneof implementers have one field
- baseUnmarshal := fieldUnmarshaler(&f)
- tagstr := strings.Split(f.Tag.Get("protobuf"), ",")[1]
- tag, err := strconv.Atoi(tagstr)
- if err != nil {
- panic("protobuf tag field not an integer: " + tagstr)
- }
-
- // Find the oneof field that this struct implements.
- // Might take O(n^2) to process all of the oneofs, but who cares.
- for _, of := range oneofFields {
- if tptr.Implements(of.ityp) {
- // We have found the corresponding interface for this struct.
- // That lets us know where this struct should be stored
- // when we encounter it during unmarshaling.
- unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
- u.setTag(tag, of.field, unmarshal, 0)
- }
- }
- }
- }
-
- // Get extension ranges, if any.
- fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray")
- if fn.IsValid() {
- if !u.extensions.IsValid() && !u.oldExtensions.IsValid() {
- panic("a message with extensions, but no extensions field in " + t.Name())
- }
- u.extensionRanges = fn.Call(nil)[0].Interface().([]ExtensionRange)
- }
-
- // Explicitly disallow tag 0. This will ensure we flag an error
- // when decoding a buffer of all zeros. Without this code, we
- // would decode and skip an all-zero buffer of even length.
- // [0 0] is [tag=0/wiretype=varint varint-encoded-0].
- u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) {
- return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w)
- }, 0)
-
- // Set mask for required field check.
- u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here?
- for len(u.dense) <= tag {
- u.dense = append(u.dense, unmarshalFieldInfo{})
- }
- u.dense[tag] = i
- return
- }
- if u.sparse == nil {
- u.sparse = map[uint64]unmarshalFieldInfo{}
- }
- u.sparse[uint64(tag)] = i
-}
-
-// fieldUnmarshaler returns an unmarshaler for the given field.
-func fieldUnmarshaler(f *reflect.StructField) unmarshaler {
- if f.Type.Kind() == reflect.Map {
- return makeUnmarshalMap(f)
- }
- return typeUnmarshaler(f.Type, f.Tag.Get("protobuf"))
-}
-
-// typeUnmarshaler returns an unmarshaler for the given field type / field tag pair.
-func typeUnmarshaler(t reflect.Type, tags string) unmarshaler {
- tagArray := strings.Split(tags, ",")
- encoding := tagArray[0]
- name := "unknown"
- for _, tag := range tagArray[3:] {
- if strings.HasPrefix(tag, "name=") {
- name = tag[5:]
- }
- }
-
- // Figure out packaging (pointer, slice, or both)
- slice := false
- pointer := false
- if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 {
- slice = true
- t = t.Elem()
- }
- if t.Kind() == reflect.Ptr {
- pointer = true
- t = t.Elem()
- }
-
- // We'll never have both pointer and slice for basic types.
- if pointer && slice && t.Kind() != reflect.Struct {
- panic("both pointer and slice for basic type in " + t.Name())
- }
-
- switch t.Kind() {
- case reflect.Bool:
- if pointer {
- return unmarshalBoolPtr
- }
- if slice {
- return unmarshalBoolSlice
- }
- return unmarshalBoolValue
- case reflect.Int32:
- switch encoding {
- case "fixed32":
- if pointer {
- return unmarshalFixedS32Ptr
- }
- if slice {
- return unmarshalFixedS32Slice
- }
- return unmarshalFixedS32Value
- case "varint":
- // this could be int32 or enum
- if pointer {
- return unmarshalInt32Ptr
- }
- if slice {
- return unmarshalInt32Slice
- }
- return unmarshalInt32Value
- case "zigzag32":
- if pointer {
- return unmarshalSint32Ptr
- }
- if slice {
- return unmarshalSint32Slice
- }
- return unmarshalSint32Value
- }
- case reflect.Int64:
- switch encoding {
- case "fixed64":
- if pointer {
- return unmarshalFixedS64Ptr
- }
- if slice {
- return unmarshalFixedS64Slice
- }
- return unmarshalFixedS64Value
- case "varint":
- if pointer {
- return unmarshalInt64Ptr
- }
- if slice {
- return unmarshalInt64Slice
- }
- return unmarshalInt64Value
- case "zigzag64":
- if pointer {
- return unmarshalSint64Ptr
- }
- if slice {
- return unmarshalSint64Slice
- }
- return unmarshalSint64Value
- }
- case reflect.Uint32:
- switch encoding {
- case "fixed32":
- if pointer {
- return unmarshalFixed32Ptr
- }
- if slice {
- return unmarshalFixed32Slice
- }
- return unmarshalFixed32Value
- case "varint":
- if pointer {
- return unmarshalUint32Ptr
- }
- if slice {
- return unmarshalUint32Slice
- }
- return unmarshalUint32Value
- }
- case reflect.Uint64:
- switch encoding {
- case "fixed64":
- if pointer {
- return unmarshalFixed64Ptr
- }
- if slice {
- return unmarshalFixed64Slice
- }
- return unmarshalFixed64Value
- case "varint":
- if pointer {
- return unmarshalUint64Ptr
- }
- if slice {
- return unmarshalUint64Slice
- }
- return unmarshalUint64Value
- }
- case reflect.Float32:
- if pointer {
- return unmarshalFloat32Ptr
- }
- if slice {
- return unmarshalFloat32Slice
- }
- return unmarshalFloat32Value
- case reflect.Float64:
- if pointer {
- return unmarshalFloat64Ptr
- }
- if slice {
- return unmarshalFloat64Slice
- }
- return unmarshalFloat64Value
- case reflect.Map:
- panic("map type in typeUnmarshaler in " + t.Name())
- case reflect.Slice:
- if pointer {
- panic("bad pointer in slice case in " + t.Name())
- }
- if slice {
- return unmarshalBytesSlice
- }
- return unmarshalBytesValue
- case reflect.String:
- if pointer {
- return unmarshalStringPtr
- }
- if slice {
- return unmarshalStringSlice
- }
- return unmarshalStringValue
- case reflect.Struct:
- // message or group field
- if !pointer {
- panic(fmt.Sprintf("message/group field %s:%s without pointer", t, encoding))
- }
- switch encoding {
- case "bytes":
- if slice {
- return makeUnmarshalMessageSlicePtr(getUnmarshalInfo(t), name)
- }
- return makeUnmarshalMessagePtr(getUnmarshalInfo(t), name)
- case "group":
- if slice {
- return makeUnmarshalGroupSlicePtr(getUnmarshalInfo(t), name)
- }
- return makeUnmarshalGroupPtr(getUnmarshalInfo(t), name)
- }
- }
- panic(fmt.Sprintf("unmarshaler not found type:%s encoding:%s", t, encoding))
-}
-
-// Below are all the unmarshalers for individual fields of various types.
-
-func unmarshalInt64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x)
- *f.toInt64() = v
- return b, nil
-}
-
-func unmarshalInt64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x)
- *f.toInt64Ptr() = &v
- return b, nil
-}
-
-func unmarshalInt64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x)
- s := f.toInt64Slice()
- *s = append(*s, v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x)
- s := f.toInt64Slice()
- *s = append(*s, v)
- return b, nil
-}
-
-func unmarshalSint64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x>>1) ^ int64(x)<<63>>63
- *f.toInt64() = v
- return b, nil
-}
-
-func unmarshalSint64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x>>1) ^ int64(x)<<63>>63
- *f.toInt64Ptr() = &v
- return b, nil
-}
-
-func unmarshalSint64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x>>1) ^ int64(x)<<63>>63
- s := f.toInt64Slice()
- *s = append(*s, v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int64(x>>1) ^ int64(x)<<63>>63
- s := f.toInt64Slice()
- *s = append(*s, v)
- return b, nil
-}
-
-func unmarshalUint64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint64(x)
- *f.toUint64() = v
- return b, nil
-}
-
-func unmarshalUint64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint64(x)
- *f.toUint64Ptr() = &v
- return b, nil
-}
-
-func unmarshalUint64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint64(x)
- s := f.toUint64Slice()
- *s = append(*s, v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint64(x)
- s := f.toUint64Slice()
- *s = append(*s, v)
- return b, nil
-}
-
-func unmarshalInt32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x)
- *f.toInt32() = v
- return b, nil
-}
-
-func unmarshalInt32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x)
- f.setInt32Ptr(v)
- return b, nil
-}
-
-func unmarshalInt32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x)
- f.appendInt32Slice(v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x)
- f.appendInt32Slice(v)
- return b, nil
-}
-
-func unmarshalSint32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x>>1) ^ int32(x)<<31>>31
- *f.toInt32() = v
- return b, nil
-}
-
-func unmarshalSint32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x>>1) ^ int32(x)<<31>>31
- f.setInt32Ptr(v)
- return b, nil
-}
-
-func unmarshalSint32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x>>1) ^ int32(x)<<31>>31
- f.appendInt32Slice(v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := int32(x>>1) ^ int32(x)<<31>>31
- f.appendInt32Slice(v)
- return b, nil
-}
-
-func unmarshalUint32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint32(x)
- *f.toUint32() = v
- return b, nil
-}
-
-func unmarshalUint32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint32(x)
- *f.toUint32Ptr() = &v
- return b, nil
-}
-
-func unmarshalUint32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint32(x)
- s := f.toUint32Slice()
- *s = append(*s, v)
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- v := uint32(x)
- s := f.toUint32Slice()
- *s = append(*s, v)
- return b, nil
-}
-
-func unmarshalFixed64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
- *f.toUint64() = v
- return b[8:], nil
-}
-
-func unmarshalFixed64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
- *f.toUint64Ptr() = &v
- return b[8:], nil
-}
-
-func unmarshalFixed64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
- s := f.toUint64Slice()
- *s = append(*s, v)
- b = b[8:]
- }
- return res, nil
- }
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
- s := f.toUint64Slice()
- *s = append(*s, v)
- return b[8:], nil
-}
-
-func unmarshalFixedS64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
- *f.toInt64() = v
- return b[8:], nil
-}
-
-func unmarshalFixedS64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
- *f.toInt64Ptr() = &v
- return b[8:], nil
-}
-
-func unmarshalFixedS64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
- s := f.toInt64Slice()
- *s = append(*s, v)
- b = b[8:]
- }
- return res, nil
- }
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
- s := f.toInt64Slice()
- *s = append(*s, v)
- return b[8:], nil
-}
-
-func unmarshalFixed32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- *f.toUint32() = v
- return b[4:], nil
-}
-
-func unmarshalFixed32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- *f.toUint32Ptr() = &v
- return b[4:], nil
-}
-
-func unmarshalFixed32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- s := f.toUint32Slice()
- *s = append(*s, v)
- b = b[4:]
- }
- return res, nil
- }
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- s := f.toUint32Slice()
- *s = append(*s, v)
- return b[4:], nil
-}
-
-func unmarshalFixedS32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
- *f.toInt32() = v
- return b[4:], nil
-}
-
-func unmarshalFixedS32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
- f.setInt32Ptr(v)
- return b[4:], nil
-}
-
-func unmarshalFixedS32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
- f.appendInt32Slice(v)
- b = b[4:]
- }
- return res, nil
- }
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
- f.appendInt32Slice(v)
- return b[4:], nil
-}
-
-func unmarshalBoolValue(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- // Note: any length varint is allowed, even though any sane
- // encoder will use one byte.
- // See https://github.com/golang/protobuf/issues/76
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- // TODO: check if x>1? Tests seem to indicate no.
- v := x != 0
- *f.toBool() = v
- return b[n:], nil
-}
-
-func unmarshalBoolPtr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- v := x != 0
- *f.toBoolPtr() = &v
- return b[n:], nil
-}
-
-func unmarshalBoolSlice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- x, n = decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- v := x != 0
- s := f.toBoolSlice()
- *s = append(*s, v)
- b = b[n:]
- }
- return res, nil
- }
- if w != WireVarint {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- v := x != 0
- s := f.toBoolSlice()
- *s = append(*s, v)
- return b[n:], nil
-}
-
-func unmarshalFloat64Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
- *f.toFloat64() = v
- return b[8:], nil
-}
-
-func unmarshalFloat64Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
- *f.toFloat64Ptr() = &v
- return b[8:], nil
-}
-
-func unmarshalFloat64Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
- s := f.toFloat64Slice()
- *s = append(*s, v)
- b = b[8:]
- }
- return res, nil
- }
- if w != WireFixed64 {
- return b, errInternalBadWireType
- }
- if len(b) < 8 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
- s := f.toFloat64Slice()
- *s = append(*s, v)
- return b[8:], nil
-}
-
-func unmarshalFloat32Value(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
- *f.toFloat32() = v
- return b[4:], nil
-}
-
-func unmarshalFloat32Ptr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
- *f.toFloat32Ptr() = &v
- return b[4:], nil
-}
-
-func unmarshalFloat32Slice(b []byte, f pointer, w int) ([]byte, error) {
- if w == WireBytes { // packed
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- res := b[x:]
- b = b[:x]
- for len(b) > 0 {
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
- s := f.toFloat32Slice()
- *s = append(*s, v)
- b = b[4:]
- }
- return res, nil
- }
- if w != WireFixed32 {
- return b, errInternalBadWireType
- }
- if len(b) < 4 {
- return nil, io.ErrUnexpectedEOF
- }
- v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
- s := f.toFloat32Slice()
- *s = append(*s, v)
- return b[4:], nil
-}
-
-func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := string(b[:x])
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
- *f.toString() = v
- return b[x:], nil
-}
-
-func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := string(b[:x])
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
- *f.toStringPtr() = &v
- return b[x:], nil
-}
-
-func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := string(b[:x])
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
- s := f.toStringSlice()
- *s = append(*s, v)
- return b[x:], nil
-}
-
-var emptyBuf [0]byte
-
-func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- // The use of append here is a trick which avoids the zeroing
- // that would be required if we used a make/copy pair.
- // We append to emptyBuf instead of nil because we want
- // a non-nil result even when the length is 0.
- v := append(emptyBuf[:], b[:x]...)
- *f.toBytes() = v
- return b[x:], nil
-}
-
-func unmarshalBytesSlice(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := append(emptyBuf[:], b[:x]...)
- s := f.toBytesSlice()
- *s = append(*s, v)
- return b[x:], nil
-}
-
-func makeUnmarshalMessagePtr(sub *unmarshalInfo, name string) unmarshaler {
- return func(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- // First read the message field to see if something is there.
- // The semantics of multiple submessages are weird. Instead of
- // the last one winning (as it is for all other fields), multiple
- // submessages are merged.
- v := f.getPointer()
- if v.isNil() {
- v = valToPointer(reflect.New(sub.typ))
- f.setPointer(v)
- }
- err := sub.unmarshal(v, b[:x])
- if err != nil {
- if r, ok := err.(*RequiredNotSetError); ok {
- r.field = name + "." + r.field
- } else {
- return nil, err
- }
- }
- return b[x:], err
- }
-}
-
-func makeUnmarshalMessageSlicePtr(sub *unmarshalInfo, name string) unmarshaler {
- return func(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireBytes {
- return b, errInternalBadWireType
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- v := valToPointer(reflect.New(sub.typ))
- err := sub.unmarshal(v, b[:x])
- if err != nil {
- if r, ok := err.(*RequiredNotSetError); ok {
- r.field = name + "." + r.field
- } else {
- return nil, err
- }
- }
- f.appendPointer(v)
- return b[x:], err
- }
-}
-
-func makeUnmarshalGroupPtr(sub *unmarshalInfo, name string) unmarshaler {
- return func(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireStartGroup {
- return b, errInternalBadWireType
- }
- x, y := findEndGroup(b)
- if x < 0 {
- return nil, io.ErrUnexpectedEOF
- }
- v := f.getPointer()
- if v.isNil() {
- v = valToPointer(reflect.New(sub.typ))
- f.setPointer(v)
- }
- err := sub.unmarshal(v, b[:x])
- if err != nil {
- if r, ok := err.(*RequiredNotSetError); ok {
- r.field = name + "." + r.field
- } else {
- return nil, err
- }
- }
- return b[y:], err
- }
-}
-
-func makeUnmarshalGroupSlicePtr(sub *unmarshalInfo, name string) unmarshaler {
- return func(b []byte, f pointer, w int) ([]byte, error) {
- if w != WireStartGroup {
- return b, errInternalBadWireType
- }
- x, y := findEndGroup(b)
- if x < 0 {
- return nil, io.ErrUnexpectedEOF
- }
- v := valToPointer(reflect.New(sub.typ))
- err := sub.unmarshal(v, b[:x])
- if err != nil {
- if r, ok := err.(*RequiredNotSetError); ok {
- r.field = name + "." + r.field
- } else {
- return nil, err
- }
- }
- f.appendPointer(v)
- return b[y:], err
- }
-}
-
-func makeUnmarshalMap(f *reflect.StructField) unmarshaler {
- t := f.Type
- kt := t.Key()
- vt := t.Elem()
- unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key"))
- unmarshalVal := typeUnmarshaler(vt, f.Tag.Get("protobuf_val"))
- return func(b []byte, f pointer, w int) ([]byte, error) {
- // The map entry is a submessage. Figure out how big it is.
- if w != WireBytes {
- return nil, fmt.Errorf("proto: bad wiretype for map field: got %d want %d", w, WireBytes)
- }
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- b = b[n:]
- if x > uint64(len(b)) {
- return nil, io.ErrUnexpectedEOF
- }
- r := b[x:] // unused data to return
- b = b[:x] // data for map entry
-
- // Note: we could use #keys * #values ~= 200 functions
- // to do map decoding without reflection. Probably not worth it.
- // Maps will be somewhat slow. Oh well.
-
- // Read key and value from data.
- k := reflect.New(kt)
- v := reflect.New(vt)
- for len(b) > 0 {
- x, n := decodeVarint(b)
- if n == 0 {
- return nil, io.ErrUnexpectedEOF
- }
- wire := int(x) & 7
- b = b[n:]
-
- var err error
- switch x >> 3 {
- case 1:
- b, err = unmarshalKey(b, valToPointer(k), wire)
- case 2:
- b, err = unmarshalVal(b, valToPointer(v), wire)
- default:
- err = errInternalBadWireType // skip unknown tag
- }
-
- if err == nil {
- continue
- }
- if err != errInternalBadWireType {
- return nil, err
- }
-
- // Skip past unknown fields.
- b, err = skipField(b, wire)
- if err != nil {
- return nil, err
- }
- }
-
- // Get map, allocate if needed.
- m := f.asPointerTo(t).Elem() // an addressable map[K]T
- if m.IsNil() {
- m.Set(reflect.MakeMap(t))
- }
-
- // Insert into map.
- m.SetMapIndex(k.Elem(), v.Elem())
-
- return r, nil
- }
-}
-
-// makeUnmarshalOneof makes an unmarshaler for oneof fields.
-// for:
-// message Msg {
-// oneof F {
-// int64 X = 1;
-// float64 Y = 2;
-// }
-// }
-// typ is the type of the concrete entry for a oneof case (e.g. Msg_X).
-// ityp is the interface type of the oneof field (e.g. isMsg_F).
-// unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64).
-// Note that this function will be called once for each case in the oneof.
-func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshaler {
- sf := typ.Field(0)
- field0 := toField(&sf)
- return func(b []byte, f pointer, w int) ([]byte, error) {
- // Allocate holder for value.
- v := reflect.New(typ)
-
- // Unmarshal data into holder.
- // We unmarshal into the first field of the holder object.
- var err error
- b, err = unmarshal(b, valToPointer(v).offset(field0), w)
- if err != nil {
- return nil, err
- }
-
- // Write pointer to holder into target field.
- f.asPointerTo(ityp).Elem().Set(v)
-
- return b, nil
- }
-}
-
-// Error used by decode internally.
-var errInternalBadWireType = errors.New("proto: internal error: bad wiretype")
-
-// skipField skips past a field of type wire and returns the remaining bytes.
-func skipField(b []byte, wire int) ([]byte, error) {
- switch wire {
- case WireVarint:
- _, k := decodeVarint(b)
- if k == 0 {
- return b, io.ErrUnexpectedEOF
- }
- b = b[k:]
- case WireFixed32:
- if len(b) < 4 {
- return b, io.ErrUnexpectedEOF
- }
- b = b[4:]
- case WireFixed64:
- if len(b) < 8 {
- return b, io.ErrUnexpectedEOF
- }
- b = b[8:]
- case WireBytes:
- m, k := decodeVarint(b)
- if k == 0 || uint64(len(b)-k) < m {
- return b, io.ErrUnexpectedEOF
- }
- b = b[uint64(k)+m:]
- case WireStartGroup:
- _, i := findEndGroup(b)
- if i == -1 {
- return b, io.ErrUnexpectedEOF
- }
- b = b[i:]
- default:
- return b, fmt.Errorf("proto: can't skip unknown wire type %d", wire)
- }
- return b, nil
-}
-
-// findEndGroup finds the index of the next EndGroup tag.
-// Groups may be nested, so the "next" EndGroup tag is the first
-// unpaired EndGroup.
-// findEndGroup returns the indexes of the start and end of the EndGroup tag.
-// Returns (-1,-1) if it can't find one.
-func findEndGroup(b []byte) (int, int) {
- depth := 1
- i := 0
- for {
- x, n := decodeVarint(b[i:])
- if n == 0 {
- return -1, -1
- }
- j := i
- i += n
- switch x & 7 {
- case WireVarint:
- _, k := decodeVarint(b[i:])
- if k == 0 {
- return -1, -1
- }
- i += k
- case WireFixed32:
- if len(b)-4 < i {
- return -1, -1
- }
- i += 4
- case WireFixed64:
- if len(b)-8 < i {
- return -1, -1
- }
- i += 8
- case WireBytes:
- m, k := decodeVarint(b[i:])
- if k == 0 {
- return -1, -1
- }
- i += k
- if uint64(len(b)-i) < m {
- return -1, -1
- }
- i += int(m)
- case WireStartGroup:
- depth++
- case WireEndGroup:
- depth--
- if depth == 0 {
- return j, i
- }
- default:
- return -1, -1
- }
- }
-}
-
-// encodeVarint appends a varint-encoded integer to b and returns the result.
-func encodeVarint(b []byte, x uint64) []byte {
- for x >= 1<<7 {
- b = append(b, byte(x&0x7f|0x80))
- x >>= 7
- }
- return append(b, byte(x))
-}
-
-// decodeVarint reads a varint-encoded integer from b.
-// Returns the decoded integer and the number of bytes read.
-// If there is an error, it returns 0,0.
-func decodeVarint(b []byte) (uint64, int) {
- var x, y uint64
- if len(b) <= 0 {
- goto bad
- }
- x = uint64(b[0])
- if x < 0x80 {
- return x, 1
- }
- x -= 0x80
-
- if len(b) <= 1 {
- goto bad
- }
- y = uint64(b[1])
- x += y << 7
- if y < 0x80 {
- return x, 2
- }
- x -= 0x80 << 7
-
- if len(b) <= 2 {
- goto bad
- }
- y = uint64(b[2])
- x += y << 14
- if y < 0x80 {
- return x, 3
- }
- x -= 0x80 << 14
-
- if len(b) <= 3 {
- goto bad
- }
- y = uint64(b[3])
- x += y << 21
- if y < 0x80 {
- return x, 4
- }
- x -= 0x80 << 21
-
- if len(b) <= 4 {
- goto bad
- }
- y = uint64(b[4])
- x += y << 28
- if y < 0x80 {
- return x, 5
- }
- x -= 0x80 << 28
-
- if len(b) <= 5 {
- goto bad
- }
- y = uint64(b[5])
- x += y << 35
- if y < 0x80 {
- return x, 6
- }
- x -= 0x80 << 35
-
- if len(b) <= 6 {
- goto bad
- }
- y = uint64(b[6])
- x += y << 42
- if y < 0x80 {
- return x, 7
- }
- x -= 0x80 << 42
-
- if len(b) <= 7 {
- goto bad
- }
- y = uint64(b[7])
- x += y << 49
- if y < 0x80 {
- return x, 8
- }
- x -= 0x80 << 49
-
- if len(b) <= 8 {
- goto bad
- }
- y = uint64(b[8])
- x += y << 56
- if y < 0x80 {
- return x, 9
- }
- x -= 0x80 << 56
-
- if len(b) <= 9 {
- goto bad
- }
- y = uint64(b[9])
- x += y << 63
- if y < 2 {
- return x, 10
- }
-
-bad:
- return 0, 0
-}
diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go
deleted file mode 100644
index 2205fdaa..00000000
--- a/vendor/github.com/golang/protobuf/proto/text.go
+++ /dev/null
@@ -1,843 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-// Functions for writing the text protocol buffer format.
-
-import (
- "bufio"
- "bytes"
- "encoding"
- "errors"
- "fmt"
- "io"
- "log"
- "math"
- "reflect"
- "sort"
- "strings"
-)
-
-var (
- newline = []byte("\n")
- spaces = []byte(" ")
- endBraceNewline = []byte("}\n")
- backslashN = []byte{'\\', 'n'}
- backslashR = []byte{'\\', 'r'}
- backslashT = []byte{'\\', 't'}
- backslashDQ = []byte{'\\', '"'}
- backslashBS = []byte{'\\', '\\'}
- posInf = []byte("inf")
- negInf = []byte("-inf")
- nan = []byte("nan")
-)
-
-type writer interface {
- io.Writer
- WriteByte(byte) error
-}
-
-// textWriter is an io.Writer that tracks its indentation level.
-type textWriter struct {
- ind int
- complete bool // if the current position is a complete line
- compact bool // whether to write out as a one-liner
- w writer
-}
-
-func (w *textWriter) WriteString(s string) (n int, err error) {
- if !strings.Contains(s, "\n") {
- if !w.compact && w.complete {
- w.writeIndent()
- }
- w.complete = false
- return io.WriteString(w.w, s)
- }
- // WriteString is typically called without newlines, so this
- // codepath and its copy are rare. We copy to avoid
- // duplicating all of Write's logic here.
- return w.Write([]byte(s))
-}
-
-func (w *textWriter) Write(p []byte) (n int, err error) {
- newlines := bytes.Count(p, newline)
- if newlines == 0 {
- if !w.compact && w.complete {
- w.writeIndent()
- }
- n, err = w.w.Write(p)
- w.complete = false
- return n, err
- }
-
- frags := bytes.SplitN(p, newline, newlines+1)
- if w.compact {
- for i, frag := range frags {
- if i > 0 {
- if err := w.w.WriteByte(' '); err != nil {
- return n, err
- }
- n++
- }
- nn, err := w.w.Write(frag)
- n += nn
- if err != nil {
- return n, err
- }
- }
- return n, nil
- }
-
- for i, frag := range frags {
- if w.complete {
- w.writeIndent()
- }
- nn, err := w.w.Write(frag)
- n += nn
- if err != nil {
- return n, err
- }
- if i+1 < len(frags) {
- if err := w.w.WriteByte('\n'); err != nil {
- return n, err
- }
- n++
- }
- }
- w.complete = len(frags[len(frags)-1]) == 0
- return n, nil
-}
-
-func (w *textWriter) WriteByte(c byte) error {
- if w.compact && c == '\n' {
- c = ' '
- }
- if !w.compact && w.complete {
- w.writeIndent()
- }
- err := w.w.WriteByte(c)
- w.complete = c == '\n'
- return err
-}
-
-func (w *textWriter) indent() { w.ind++ }
-
-func (w *textWriter) unindent() {
- if w.ind == 0 {
- log.Print("proto: textWriter unindented too far")
- return
- }
- w.ind--
-}
-
-func writeName(w *textWriter, props *Properties) error {
- if _, err := w.WriteString(props.OrigName); err != nil {
- return err
- }
- if props.Wire != "group" {
- return w.WriteByte(':')
- }
- return nil
-}
-
-func requiresQuotes(u string) bool {
- // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted.
- for _, ch := range u {
- switch {
- case ch == '.' || ch == '/' || ch == '_':
- continue
- case '0' <= ch && ch <= '9':
- continue
- case 'A' <= ch && ch <= 'Z':
- continue
- case 'a' <= ch && ch <= 'z':
- continue
- default:
- return true
- }
- }
- return false
-}
-
-// isAny reports whether sv is a google.protobuf.Any message
-func isAny(sv reflect.Value) bool {
- type wkt interface {
- XXX_WellKnownType() string
- }
- t, ok := sv.Addr().Interface().(wkt)
- return ok && t.XXX_WellKnownType() == "Any"
-}
-
-// writeProto3Any writes an expanded google.protobuf.Any message.
-//
-// It returns (false, nil) if sv value can't be unmarshaled (e.g. because
-// required messages are not linked in).
-//
-// It returns (true, error) when sv was written in expanded format or an error
-// was encountered.
-func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) {
- turl := sv.FieldByName("TypeUrl")
- val := sv.FieldByName("Value")
- if !turl.IsValid() || !val.IsValid() {
- return true, errors.New("proto: invalid google.protobuf.Any message")
- }
-
- b, ok := val.Interface().([]byte)
- if !ok {
- return true, errors.New("proto: invalid google.protobuf.Any message")
- }
-
- parts := strings.Split(turl.String(), "/")
- mt := MessageType(parts[len(parts)-1])
- if mt == nil {
- return false, nil
- }
- m := reflect.New(mt.Elem())
- if err := Unmarshal(b, m.Interface().(Message)); err != nil {
- return false, nil
- }
- w.Write([]byte("["))
- u := turl.String()
- if requiresQuotes(u) {
- writeString(w, u)
- } else {
- w.Write([]byte(u))
- }
- if w.compact {
- w.Write([]byte("]:<"))
- } else {
- w.Write([]byte("]: <\n"))
- w.ind++
- }
- if err := tm.writeStruct(w, m.Elem()); err != nil {
- return true, err
- }
- if w.compact {
- w.Write([]byte("> "))
- } else {
- w.ind--
- w.Write([]byte(">\n"))
- }
- return true, nil
-}
-
-func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
- if tm.ExpandAny && isAny(sv) {
- if canExpand, err := tm.writeProto3Any(w, sv); canExpand {
- return err
- }
- }
- st := sv.Type()
- sprops := GetProperties(st)
- for i := 0; i < sv.NumField(); i++ {
- fv := sv.Field(i)
- props := sprops.Prop[i]
- name := st.Field(i).Name
-
- if name == "XXX_NoUnkeyedLiteral" {
- continue
- }
-
- if strings.HasPrefix(name, "XXX_") {
- // There are two XXX_ fields:
- // XXX_unrecognized []byte
- // XXX_extensions map[int32]proto.Extension
- // The first is handled here;
- // the second is handled at the bottom of this function.
- if name == "XXX_unrecognized" && !fv.IsNil() {
- if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil {
- return err
- }
- }
- continue
- }
- if fv.Kind() == reflect.Ptr && fv.IsNil() {
- // Field not filled in. This could be an optional field or
- // a required field that wasn't filled in. Either way, there
- // isn't anything we can show for it.
- continue
- }
- if fv.Kind() == reflect.Slice && fv.IsNil() {
- // Repeated field that is empty, or a bytes field that is unused.
- continue
- }
-
- if props.Repeated && fv.Kind() == reflect.Slice {
- // Repeated field.
- for j := 0; j < fv.Len(); j++ {
- if err := writeName(w, props); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- v := fv.Index(j)
- if v.Kind() == reflect.Ptr && v.IsNil() {
- // A nil message in a repeated field is not valid,
- // but we can handle that more gracefully than panicking.
- if _, err := w.Write([]byte("\n")); err != nil {
- return err
- }
- continue
- }
- if err := tm.writeAny(w, v, props); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- continue
- }
- if fv.Kind() == reflect.Map {
- // Map fields are rendered as a repeated struct with key/value fields.
- keys := fv.MapKeys()
- sort.Sort(mapKeys(keys))
- for _, key := range keys {
- val := fv.MapIndex(key)
- if err := writeName(w, props); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- // open struct
- if err := w.WriteByte('<'); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- w.indent()
- // key
- if _, err := w.WriteString("key:"); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- if err := tm.writeAny(w, key, props.mkeyprop); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- // nil values aren't legal, but we can avoid panicking because of them.
- if val.Kind() != reflect.Ptr || !val.IsNil() {
- // value
- if _, err := w.WriteString("value:"); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- if err := tm.writeAny(w, val, props.mvalprop); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- // close struct
- w.unindent()
- if err := w.WriteByte('>'); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- continue
- }
- if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 {
- // empty bytes field
- continue
- }
- if fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice {
- // proto3 non-repeated scalar field; skip if zero value
- if isProto3Zero(fv) {
- continue
- }
- }
-
- if fv.Kind() == reflect.Interface {
- // Check if it is a oneof.
- if st.Field(i).Tag.Get("protobuf_oneof") != "" {
- // fv is nil, or holds a pointer to generated struct.
- // That generated struct has exactly one field,
- // which has a protobuf struct tag.
- if fv.IsNil() {
- continue
- }
- inner := fv.Elem().Elem() // interface -> *T -> T
- tag := inner.Type().Field(0).Tag.Get("protobuf")
- props = new(Properties) // Overwrite the outer props var, but not its pointee.
- props.Parse(tag)
- // Write the value in the oneof, not the oneof itself.
- fv = inner.Field(0)
-
- // Special case to cope with malformed messages gracefully:
- // If the value in the oneof is a nil pointer, don't panic
- // in writeAny.
- if fv.Kind() == reflect.Ptr && fv.IsNil() {
- // Use errors.New so writeAny won't render quotes.
- msg := errors.New("/* nil */")
- fv = reflect.ValueOf(&msg).Elem()
- }
- }
- }
-
- if err := writeName(w, props); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
-
- // Enums have a String method, so writeAny will work fine.
- if err := tm.writeAny(w, fv, props); err != nil {
- return err
- }
-
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
-
- // Extensions (the XXX_extensions field).
- pv := sv.Addr()
- if _, err := extendable(pv.Interface()); err == nil {
- if err := tm.writeExtensions(w, pv); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-// writeAny writes an arbitrary field.
-func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error {
- v = reflect.Indirect(v)
-
- // Floats have special cases.
- if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 {
- x := v.Float()
- var b []byte
- switch {
- case math.IsInf(x, 1):
- b = posInf
- case math.IsInf(x, -1):
- b = negInf
- case math.IsNaN(x):
- b = nan
- }
- if b != nil {
- _, err := w.Write(b)
- return err
- }
- // Other values are handled below.
- }
-
- // We don't attempt to serialise every possible value type; only those
- // that can occur in protocol buffers.
- switch v.Kind() {
- case reflect.Slice:
- // Should only be a []byte; repeated fields are handled in writeStruct.
- if err := writeString(w, string(v.Bytes())); err != nil {
- return err
- }
- case reflect.String:
- if err := writeString(w, v.String()); err != nil {
- return err
- }
- case reflect.Struct:
- // Required/optional group/message.
- var bra, ket byte = '<', '>'
- if props != nil && props.Wire == "group" {
- bra, ket = '{', '}'
- }
- if err := w.WriteByte(bra); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- w.indent()
- if v.CanAddr() {
- // Calling v.Interface on a struct causes the reflect package to
- // copy the entire struct. This is racy with the new Marshaler
- // since we atomically update the XXX_sizecache.
- //
- // Thus, we retrieve a pointer to the struct if possible to avoid
- // a race since v.Interface on the pointer doesn't copy the struct.
- //
- // If v is not addressable, then we are not worried about a race
- // since it implies that the binary Marshaler cannot possibly be
- // mutating this value.
- v = v.Addr()
- }
- if etm, ok := v.Interface().(encoding.TextMarshaler); ok {
- text, err := etm.MarshalText()
- if err != nil {
- return err
- }
- if _, err = w.Write(text); err != nil {
- return err
- }
- } else {
- if v.Kind() == reflect.Ptr {
- v = v.Elem()
- }
- if err := tm.writeStruct(w, v); err != nil {
- return err
- }
- }
- w.unindent()
- if err := w.WriteByte(ket); err != nil {
- return err
- }
- default:
- _, err := fmt.Fprint(w, v.Interface())
- return err
- }
- return nil
-}
-
-// equivalent to C's isprint.
-func isprint(c byte) bool {
- return c >= 0x20 && c < 0x7f
-}
-
-// writeString writes a string in the protocol buffer text format.
-// It is similar to strconv.Quote except we don't use Go escape sequences,
-// we treat the string as a byte sequence, and we use octal escapes.
-// These differences are to maintain interoperability with the other
-// languages' implementations of the text format.
-func writeString(w *textWriter, s string) error {
- // use WriteByte here to get any needed indent
- if err := w.WriteByte('"'); err != nil {
- return err
- }
- // Loop over the bytes, not the runes.
- for i := 0; i < len(s); i++ {
- var err error
- // Divergence from C++: we don't escape apostrophes.
- // There's no need to escape them, and the C++ parser
- // copes with a naked apostrophe.
- switch c := s[i]; c {
- case '\n':
- _, err = w.w.Write(backslashN)
- case '\r':
- _, err = w.w.Write(backslashR)
- case '\t':
- _, err = w.w.Write(backslashT)
- case '"':
- _, err = w.w.Write(backslashDQ)
- case '\\':
- _, err = w.w.Write(backslashBS)
- default:
- if isprint(c) {
- err = w.w.WriteByte(c)
- } else {
- _, err = fmt.Fprintf(w.w, "\\%03o", c)
- }
- }
- if err != nil {
- return err
- }
- }
- return w.WriteByte('"')
-}
-
-func writeUnknownStruct(w *textWriter, data []byte) (err error) {
- if !w.compact {
- if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil {
- return err
- }
- }
- b := NewBuffer(data)
- for b.index < len(b.buf) {
- x, err := b.DecodeVarint()
- if err != nil {
- _, err := fmt.Fprintf(w, "/* %v */\n", err)
- return err
- }
- wire, tag := x&7, x>>3
- if wire == WireEndGroup {
- w.unindent()
- if _, err := w.Write(endBraceNewline); err != nil {
- return err
- }
- continue
- }
- if _, err := fmt.Fprint(w, tag); err != nil {
- return err
- }
- if wire != WireStartGroup {
- if err := w.WriteByte(':'); err != nil {
- return err
- }
- }
- if !w.compact || wire == WireStartGroup {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- switch wire {
- case WireBytes:
- buf, e := b.DecodeRawBytes(false)
- if e == nil {
- _, err = fmt.Fprintf(w, "%q", buf)
- } else {
- _, err = fmt.Fprintf(w, "/* %v */", e)
- }
- case WireFixed32:
- x, err = b.DecodeFixed32()
- err = writeUnknownInt(w, x, err)
- case WireFixed64:
- x, err = b.DecodeFixed64()
- err = writeUnknownInt(w, x, err)
- case WireStartGroup:
- err = w.WriteByte('{')
- w.indent()
- case WireVarint:
- x, err = b.DecodeVarint()
- err = writeUnknownInt(w, x, err)
- default:
- _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire)
- }
- if err != nil {
- return err
- }
- if err = w.WriteByte('\n'); err != nil {
- return err
- }
- }
- return nil
-}
-
-func writeUnknownInt(w *textWriter, x uint64, err error) error {
- if err == nil {
- _, err = fmt.Fprint(w, x)
- } else {
- _, err = fmt.Fprintf(w, "/* %v */", err)
- }
- return err
-}
-
-type int32Slice []int32
-
-func (s int32Slice) Len() int { return len(s) }
-func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] }
-func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-
-// writeExtensions writes all the extensions in pv.
-// pv is assumed to be a pointer to a protocol message struct that is extendable.
-func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error {
- emap := extensionMaps[pv.Type().Elem()]
- ep, _ := extendable(pv.Interface())
-
- // Order the extensions by ID.
- // This isn't strictly necessary, but it will give us
- // canonical output, which will also make testing easier.
- m, mu := ep.extensionsRead()
- if m == nil {
- return nil
- }
- mu.Lock()
- ids := make([]int32, 0, len(m))
- for id := range m {
- ids = append(ids, id)
- }
- sort.Sort(int32Slice(ids))
- mu.Unlock()
-
- for _, extNum := range ids {
- ext := m[extNum]
- var desc *ExtensionDesc
- if emap != nil {
- desc = emap[extNum]
- }
- if desc == nil {
- // Unknown extension.
- if err := writeUnknownStruct(w, ext.enc); err != nil {
- return err
- }
- continue
- }
-
- pb, err := GetExtension(ep, desc)
- if err != nil {
- return fmt.Errorf("failed getting extension: %v", err)
- }
-
- // Repeated extensions will appear as a slice.
- if !desc.repeated() {
- if err := tm.writeExtension(w, desc.Name, pb); err != nil {
- return err
- }
- } else {
- v := reflect.ValueOf(pb)
- for i := 0; i < v.Len(); i++ {
- if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil {
- return err
- }
- }
- }
- }
- return nil
-}
-
-func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error {
- if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- return nil
-}
-
-func (w *textWriter) writeIndent() {
- if !w.complete {
- return
- }
- remain := w.ind * 2
- for remain > 0 {
- n := remain
- if n > len(spaces) {
- n = len(spaces)
- }
- w.w.Write(spaces[:n])
- remain -= n
- }
- w.complete = false
-}
-
-// TextMarshaler is a configurable text format marshaler.
-type TextMarshaler struct {
- Compact bool // use compact text format (one line).
- ExpandAny bool // expand google.protobuf.Any messages of known types
-}
-
-// Marshal writes a given protocol buffer in text format.
-// The only errors returned are from w.
-func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error {
- val := reflect.ValueOf(pb)
- if pb == nil || val.IsNil() {
- w.Write([]byte(""))
- return nil
- }
- var bw *bufio.Writer
- ww, ok := w.(writer)
- if !ok {
- bw = bufio.NewWriter(w)
- ww = bw
- }
- aw := &textWriter{
- w: ww,
- complete: true,
- compact: tm.Compact,
- }
-
- if etm, ok := pb.(encoding.TextMarshaler); ok {
- text, err := etm.MarshalText()
- if err != nil {
- return err
- }
- if _, err = aw.Write(text); err != nil {
- return err
- }
- if bw != nil {
- return bw.Flush()
- }
- return nil
- }
- // Dereference the received pointer so we don't have outer < and >.
- v := reflect.Indirect(val)
- if err := tm.writeStruct(aw, v); err != nil {
- return err
- }
- if bw != nil {
- return bw.Flush()
- }
- return nil
-}
-
-// Text is the same as Marshal, but returns the string directly.
-func (tm *TextMarshaler) Text(pb Message) string {
- var buf bytes.Buffer
- tm.Marshal(&buf, pb)
- return buf.String()
-}
-
-var (
- defaultTextMarshaler = TextMarshaler{}
- compactTextMarshaler = TextMarshaler{Compact: true}
-)
-
-// TODO: consider removing some of the Marshal functions below.
-
-// MarshalText writes a given protocol buffer in text format.
-// The only errors returned are from w.
-func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) }
-
-// MarshalTextString is the same as MarshalText, but returns the string directly.
-func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) }
-
-// CompactText writes a given protocol buffer in compact text format (one line).
-func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) }
-
-// CompactTextString is the same as CompactText, but returns the string directly.
-func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) }
diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go
deleted file mode 100644
index 0685bae3..00000000
--- a/vendor/github.com/golang/protobuf/proto/text_parser.go
+++ /dev/null
@@ -1,880 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-// Functions for parsing the Text protocol buffer format.
-// TODO: message sets.
-
-import (
- "encoding"
- "errors"
- "fmt"
- "reflect"
- "strconv"
- "strings"
- "unicode/utf8"
-)
-
-// Error string emitted when deserializing Any and fields are already set
-const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set"
-
-type ParseError struct {
- Message string
- Line int // 1-based line number
- Offset int // 0-based byte offset from start of input
-}
-
-func (p *ParseError) Error() string {
- if p.Line == 1 {
- // show offset only for first line
- return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message)
- }
- return fmt.Sprintf("line %d: %v", p.Line, p.Message)
-}
-
-type token struct {
- value string
- err *ParseError
- line int // line number
- offset int // byte number from start of input, not start of line
- unquoted string // the unquoted version of value, if it was a quoted string
-}
-
-func (t *token) String() string {
- if t.err == nil {
- return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset)
- }
- return fmt.Sprintf("parse error: %v", t.err)
-}
-
-type textParser struct {
- s string // remaining input
- done bool // whether the parsing is finished (success or error)
- backed bool // whether back() was called
- offset, line int
- cur token
-}
-
-func newTextParser(s string) *textParser {
- p := new(textParser)
- p.s = s
- p.line = 1
- p.cur.line = 1
- return p
-}
-
-func (p *textParser) errorf(format string, a ...interface{}) *ParseError {
- pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset}
- p.cur.err = pe
- p.done = true
- return pe
-}
-
-// Numbers and identifiers are matched by [-+._A-Za-z0-9]
-func isIdentOrNumberChar(c byte) bool {
- switch {
- case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z':
- return true
- case '0' <= c && c <= '9':
- return true
- }
- switch c {
- case '-', '+', '.', '_':
- return true
- }
- return false
-}
-
-func isWhitespace(c byte) bool {
- switch c {
- case ' ', '\t', '\n', '\r':
- return true
- }
- return false
-}
-
-func isQuote(c byte) bool {
- switch c {
- case '"', '\'':
- return true
- }
- return false
-}
-
-func (p *textParser) skipWhitespace() {
- i := 0
- for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') {
- if p.s[i] == '#' {
- // comment; skip to end of line or input
- for i < len(p.s) && p.s[i] != '\n' {
- i++
- }
- if i == len(p.s) {
- break
- }
- }
- if p.s[i] == '\n' {
- p.line++
- }
- i++
- }
- p.offset += i
- p.s = p.s[i:len(p.s)]
- if len(p.s) == 0 {
- p.done = true
- }
-}
-
-func (p *textParser) advance() {
- // Skip whitespace
- p.skipWhitespace()
- if p.done {
- return
- }
-
- // Start of non-whitespace
- p.cur.err = nil
- p.cur.offset, p.cur.line = p.offset, p.line
- p.cur.unquoted = ""
- switch p.s[0] {
- case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/':
- // Single symbol
- p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)]
- case '"', '\'':
- // Quoted string
- i := 1
- for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' {
- if p.s[i] == '\\' && i+1 < len(p.s) {
- // skip escaped char
- i++
- }
- i++
- }
- if i >= len(p.s) || p.s[i] != p.s[0] {
- p.errorf("unmatched quote")
- return
- }
- unq, err := unquoteC(p.s[1:i], rune(p.s[0]))
- if err != nil {
- p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err)
- return
- }
- p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)]
- p.cur.unquoted = unq
- default:
- i := 0
- for i < len(p.s) && isIdentOrNumberChar(p.s[i]) {
- i++
- }
- if i == 0 {
- p.errorf("unexpected byte %#x", p.s[0])
- return
- }
- p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)]
- }
- p.offset += len(p.cur.value)
-}
-
-var (
- errBadUTF8 = errors.New("proto: bad UTF-8")
-)
-
-func unquoteC(s string, quote rune) (string, error) {
- // This is based on C++'s tokenizer.cc.
- // Despite its name, this is *not* parsing C syntax.
- // For instance, "\0" is an invalid quoted string.
-
- // Avoid allocation in trivial cases.
- simple := true
- for _, r := range s {
- if r == '\\' || r == quote {
- simple = false
- break
- }
- }
- if simple {
- return s, nil
- }
-
- buf := make([]byte, 0, 3*len(s)/2)
- for len(s) > 0 {
- r, n := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError && n == 1 {
- return "", errBadUTF8
- }
- s = s[n:]
- if r != '\\' {
- if r < utf8.RuneSelf {
- buf = append(buf, byte(r))
- } else {
- buf = append(buf, string(r)...)
- }
- continue
- }
-
- ch, tail, err := unescape(s)
- if err != nil {
- return "", err
- }
- buf = append(buf, ch...)
- s = tail
- }
- return string(buf), nil
-}
-
-func unescape(s string) (ch string, tail string, err error) {
- r, n := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError && n == 1 {
- return "", "", errBadUTF8
- }
- s = s[n:]
- switch r {
- case 'a':
- return "\a", s, nil
- case 'b':
- return "\b", s, nil
- case 'f':
- return "\f", s, nil
- case 'n':
- return "\n", s, nil
- case 'r':
- return "\r", s, nil
- case 't':
- return "\t", s, nil
- case 'v':
- return "\v", s, nil
- case '?':
- return "?", s, nil // trigraph workaround
- case '\'', '"', '\\':
- return string(r), s, nil
- case '0', '1', '2', '3', '4', '5', '6', '7':
- if len(s) < 2 {
- return "", "", fmt.Errorf(`\%c requires 2 following digits`, r)
- }
- ss := string(r) + s[:2]
- s = s[2:]
- i, err := strconv.ParseUint(ss, 8, 8)
- if err != nil {
- return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss)
- }
- return string([]byte{byte(i)}), s, nil
- case 'x', 'X', 'u', 'U':
- var n int
- switch r {
- case 'x', 'X':
- n = 2
- case 'u':
- n = 4
- case 'U':
- n = 8
- }
- if len(s) < n {
- return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n)
- }
- ss := s[:n]
- s = s[n:]
- i, err := strconv.ParseUint(ss, 16, 64)
- if err != nil {
- return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss)
- }
- if r == 'x' || r == 'X' {
- return string([]byte{byte(i)}), s, nil
- }
- if i > utf8.MaxRune {
- return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss)
- }
- return string(i), s, nil
- }
- return "", "", fmt.Errorf(`unknown escape \%c`, r)
-}
-
-// Back off the parser by one token. Can only be done between calls to next().
-// It makes the next advance() a no-op.
-func (p *textParser) back() { p.backed = true }
-
-// Advances the parser and returns the new current token.
-func (p *textParser) next() *token {
- if p.backed || p.done {
- p.backed = false
- return &p.cur
- }
- p.advance()
- if p.done {
- p.cur.value = ""
- } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) {
- // Look for multiple quoted strings separated by whitespace,
- // and concatenate them.
- cat := p.cur
- for {
- p.skipWhitespace()
- if p.done || !isQuote(p.s[0]) {
- break
- }
- p.advance()
- if p.cur.err != nil {
- return &p.cur
- }
- cat.value += " " + p.cur.value
- cat.unquoted += p.cur.unquoted
- }
- p.done = false // parser may have seen EOF, but we want to return cat
- p.cur = cat
- }
- return &p.cur
-}
-
-func (p *textParser) consumeToken(s string) error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != s {
- p.back()
- return p.errorf("expected %q, found %q", s, tok.value)
- }
- return nil
-}
-
-// Return a RequiredNotSetError indicating which required field was not set.
-func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError {
- st := sv.Type()
- sprops := GetProperties(st)
- for i := 0; i < st.NumField(); i++ {
- if !isNil(sv.Field(i)) {
- continue
- }
-
- props := sprops.Prop[i]
- if props.Required {
- return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)}
- }
- }
- return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen
-}
-
-// Returns the index in the struct for the named field, as well as the parsed tag properties.
-func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) {
- i, ok := sprops.decoderOrigNames[name]
- if ok {
- return i, sprops.Prop[i], true
- }
- return -1, nil, false
-}
-
-// Consume a ':' from the input stream (if the next token is a colon),
-// returning an error if a colon is needed but not present.
-func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != ":" {
- // Colon is optional when the field is a group or message.
- needColon := true
- switch props.Wire {
- case "group":
- needColon = false
- case "bytes":
- // A "bytes" field is either a message, a string, or a repeated field;
- // those three become *T, *string and []T respectively, so we can check for
- // this field being a pointer to a non-string.
- if typ.Kind() == reflect.Ptr {
- // *T or *string
- if typ.Elem().Kind() == reflect.String {
- break
- }
- } else if typ.Kind() == reflect.Slice {
- // []T or []*T
- if typ.Elem().Kind() != reflect.Ptr {
- break
- }
- } else if typ.Kind() == reflect.String {
- // The proto3 exception is for a string field,
- // which requires a colon.
- break
- }
- needColon = false
- }
- if needColon {
- return p.errorf("expected ':', found %q", tok.value)
- }
- p.back()
- }
- return nil
-}
-
-func (p *textParser) readStruct(sv reflect.Value, terminator string) error {
- st := sv.Type()
- sprops := GetProperties(st)
- reqCount := sprops.reqCount
- var reqFieldErr error
- fieldSet := make(map[string]bool)
- // A struct is a sequence of "name: value", terminated by one of
- // '>' or '}', or the end of the input. A name may also be
- // "[extension]" or "[type/url]".
- //
- // The whole struct can also be an expanded Any message, like:
- // [type/url] < ... struct contents ... >
- for {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == terminator {
- break
- }
- if tok.value == "[" {
- // Looks like an extension or an Any.
- //
- // TODO: Check whether we need to handle
- // namespace rooted names (e.g. ".something.Foo").
- extName, err := p.consumeExtName()
- if err != nil {
- return err
- }
-
- if s := strings.LastIndex(extName, "/"); s >= 0 {
- // If it contains a slash, it's an Any type URL.
- messageName := extName[s+1:]
- mt := MessageType(messageName)
- if mt == nil {
- return p.errorf("unrecognized message %q in google.protobuf.Any", messageName)
- }
- tok = p.next()
- if tok.err != nil {
- return tok.err
- }
- // consume an optional colon
- if tok.value == ":" {
- tok = p.next()
- if tok.err != nil {
- return tok.err
- }
- }
- var terminator string
- switch tok.value {
- case "<":
- terminator = ">"
- case "{":
- terminator = "}"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
- v := reflect.New(mt.Elem())
- if pe := p.readStruct(v.Elem(), terminator); pe != nil {
- return pe
- }
- b, err := Marshal(v.Interface().(Message))
- if err != nil {
- return p.errorf("failed to marshal message of type %q: %v", messageName, err)
- }
- if fieldSet["type_url"] {
- return p.errorf(anyRepeatedlyUnpacked, "type_url")
- }
- if fieldSet["value"] {
- return p.errorf(anyRepeatedlyUnpacked, "value")
- }
- sv.FieldByName("TypeUrl").SetString(extName)
- sv.FieldByName("Value").SetBytes(b)
- fieldSet["type_url"] = true
- fieldSet["value"] = true
- continue
- }
-
- var desc *ExtensionDesc
- // This could be faster, but it's functional.
- // TODO: Do something smarter than a linear scan.
- for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) {
- if d.Name == extName {
- desc = d
- break
- }
- }
- if desc == nil {
- return p.errorf("unrecognized extension %q", extName)
- }
-
- props := &Properties{}
- props.Parse(desc.Tag)
-
- typ := reflect.TypeOf(desc.ExtensionType)
- if err := p.checkForColon(props, typ); err != nil {
- return err
- }
-
- rep := desc.repeated()
-
- // Read the extension structure, and set it in
- // the value we're constructing.
- var ext reflect.Value
- if !rep {
- ext = reflect.New(typ).Elem()
- } else {
- ext = reflect.New(typ.Elem()).Elem()
- }
- if err := p.readAny(ext, props); err != nil {
- if _, ok := err.(*RequiredNotSetError); !ok {
- return err
- }
- reqFieldErr = err
- }
- ep := sv.Addr().Interface().(Message)
- if !rep {
- SetExtension(ep, desc, ext.Interface())
- } else {
- old, err := GetExtension(ep, desc)
- var sl reflect.Value
- if err == nil {
- sl = reflect.ValueOf(old) // existing slice
- } else {
- sl = reflect.MakeSlice(typ, 0, 1)
- }
- sl = reflect.Append(sl, ext)
- SetExtension(ep, desc, sl.Interface())
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- continue
- }
-
- // This is a normal, non-extension field.
- name := tok.value
- var dst reflect.Value
- fi, props, ok := structFieldByName(sprops, name)
- if ok {
- dst = sv.Field(fi)
- } else if oop, ok := sprops.OneofTypes[name]; ok {
- // It is a oneof.
- props = oop.Prop
- nv := reflect.New(oop.Type.Elem())
- dst = nv.Elem().Field(0)
- field := sv.Field(oop.Field)
- if !field.IsNil() {
- return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name)
- }
- field.Set(nv)
- }
- if !dst.IsValid() {
- return p.errorf("unknown field name %q in %v", name, st)
- }
-
- if dst.Kind() == reflect.Map {
- // Consume any colon.
- if err := p.checkForColon(props, dst.Type()); err != nil {
- return err
- }
-
- // Construct the map if it doesn't already exist.
- if dst.IsNil() {
- dst.Set(reflect.MakeMap(dst.Type()))
- }
- key := reflect.New(dst.Type().Key()).Elem()
- val := reflect.New(dst.Type().Elem()).Elem()
-
- // The map entry should be this sequence of tokens:
- // < key : KEY value : VALUE >
- // However, implementations may omit key or value, and technically
- // we should support them in any order. See b/28924776 for a time
- // this went wrong.
-
- tok := p.next()
- var terminator string
- switch tok.value {
- case "<":
- terminator = ">"
- case "{":
- terminator = "}"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
- for {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == terminator {
- break
- }
- switch tok.value {
- case "key":
- if err := p.consumeToken(":"); err != nil {
- return err
- }
- if err := p.readAny(key, props.mkeyprop); err != nil {
- return err
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- case "value":
- if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil {
- return err
- }
- if err := p.readAny(val, props.mvalprop); err != nil {
- return err
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- default:
- p.back()
- return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value)
- }
- }
-
- dst.SetMapIndex(key, val)
- continue
- }
-
- // Check that it's not already set if it's not a repeated field.
- if !props.Repeated && fieldSet[name] {
- return p.errorf("non-repeated field %q was repeated", name)
- }
-
- if err := p.checkForColon(props, dst.Type()); err != nil {
- return err
- }
-
- // Parse into the field.
- fieldSet[name] = true
- if err := p.readAny(dst, props); err != nil {
- if _, ok := err.(*RequiredNotSetError); !ok {
- return err
- }
- reqFieldErr = err
- }
- if props.Required {
- reqCount--
- }
-
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
-
- }
-
- if reqCount > 0 {
- return p.missingRequiredFieldError(sv)
- }
- return reqFieldErr
-}
-
-// consumeExtName consumes extension name or expanded Any type URL and the
-// following ']'. It returns the name or URL consumed.
-func (p *textParser) consumeExtName() (string, error) {
- tok := p.next()
- if tok.err != nil {
- return "", tok.err
- }
-
- // If extension name or type url is quoted, it's a single token.
- if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] {
- name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0]))
- if err != nil {
- return "", err
- }
- return name, p.consumeToken("]")
- }
-
- // Consume everything up to "]"
- var parts []string
- for tok.value != "]" {
- parts = append(parts, tok.value)
- tok = p.next()
- if tok.err != nil {
- return "", p.errorf("unrecognized type_url or extension name: %s", tok.err)
- }
- if p.done && tok.value != "]" {
- return "", p.errorf("unclosed type_url or extension name")
- }
- }
- return strings.Join(parts, ""), nil
-}
-
-// consumeOptionalSeparator consumes an optional semicolon or comma.
-// It is used in readStruct to provide backward compatibility.
-func (p *textParser) consumeOptionalSeparator() error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != ";" && tok.value != "," {
- p.back()
- }
- return nil
-}
-
-func (p *textParser) readAny(v reflect.Value, props *Properties) error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == "" {
- return p.errorf("unexpected EOF")
- }
-
- switch fv := v; fv.Kind() {
- case reflect.Slice:
- at := v.Type()
- if at.Elem().Kind() == reflect.Uint8 {
- // Special case for []byte
- if tok.value[0] != '"' && tok.value[0] != '\'' {
- // Deliberately written out here, as the error after
- // this switch statement would write "invalid []byte: ...",
- // which is not as user-friendly.
- return p.errorf("invalid string: %v", tok.value)
- }
- bytes := []byte(tok.unquoted)
- fv.Set(reflect.ValueOf(bytes))
- return nil
- }
- // Repeated field.
- if tok.value == "[" {
- // Repeated field with list notation, like [1,2,3].
- for {
- fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem()))
- err := p.readAny(fv.Index(fv.Len()-1), props)
- if err != nil {
- return err
- }
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == "]" {
- break
- }
- if tok.value != "," {
- return p.errorf("Expected ']' or ',' found %q", tok.value)
- }
- }
- return nil
- }
- // One value of the repeated field.
- p.back()
- fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem()))
- return p.readAny(fv.Index(fv.Len()-1), props)
- case reflect.Bool:
- // true/1/t/True or false/f/0/False.
- switch tok.value {
- case "true", "1", "t", "True":
- fv.SetBool(true)
- return nil
- case "false", "0", "f", "False":
- fv.SetBool(false)
- return nil
- }
- case reflect.Float32, reflect.Float64:
- v := tok.value
- // Ignore 'f' for compatibility with output generated by C++, but don't
- // remove 'f' when the value is "-inf" or "inf".
- if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" {
- v = v[:len(v)-1]
- }
- if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil {
- fv.SetFloat(f)
- return nil
- }
- case reflect.Int32:
- if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {
- fv.SetInt(x)
- return nil
- }
-
- if len(props.Enum) == 0 {
- break
- }
- m, ok := enumValueMaps[props.Enum]
- if !ok {
- break
- }
- x, ok := m[tok.value]
- if !ok {
- break
- }
- fv.SetInt(int64(x))
- return nil
- case reflect.Int64:
- if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil {
- fv.SetInt(x)
- return nil
- }
-
- case reflect.Ptr:
- // A basic field (indirected through pointer), or a repeated message/group
- p.back()
- fv.Set(reflect.New(fv.Type().Elem()))
- return p.readAny(fv.Elem(), props)
- case reflect.String:
- if tok.value[0] == '"' || tok.value[0] == '\'' {
- fv.SetString(tok.unquoted)
- return nil
- }
- case reflect.Struct:
- var terminator string
- switch tok.value {
- case "{":
- terminator = "}"
- case "<":
- terminator = ">"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
- // TODO: Handle nested messages which implement encoding.TextUnmarshaler.
- return p.readStruct(fv, terminator)
- case reflect.Uint32:
- if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
- fv.SetUint(uint64(x))
- return nil
- }
- case reflect.Uint64:
- if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil {
- fv.SetUint(x)
- return nil
- }
- }
- return p.errorf("invalid %v: %v", v.Type(), tok.value)
-}
-
-// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb
-// before starting to unmarshal, so any existing data in pb is always removed.
-// If a required field is not set and no other error occurs,
-// UnmarshalText returns *RequiredNotSetError.
-func UnmarshalText(s string, pb Message) error {
- if um, ok := pb.(encoding.TextUnmarshaler); ok {
- return um.UnmarshalText([]byte(s))
- }
- pb.Reset()
- v := reflect.ValueOf(pb)
- return newTextParser(s).readStruct(v.Elem(), "")
-}
diff --git a/vendor/github.com/gorilla/context/LICENSE b/vendor/github.com/gorilla/context/LICENSE
deleted file mode 100644
index 0e5fb872..00000000
--- a/vendor/github.com/gorilla/context/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012 Rodrigo Moraes. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/gorilla/context/context.go b/vendor/github.com/gorilla/context/context.go
deleted file mode 100644
index 81cb128b..00000000
--- a/vendor/github.com/gorilla/context/context.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package context
-
-import (
- "net/http"
- "sync"
- "time"
-)
-
-var (
- mutex sync.RWMutex
- data = make(map[*http.Request]map[interface{}]interface{})
- datat = make(map[*http.Request]int64)
-)
-
-// Set stores a value for a given key in a given request.
-func Set(r *http.Request, key, val interface{}) {
- mutex.Lock()
- if data[r] == nil {
- data[r] = make(map[interface{}]interface{})
- datat[r] = time.Now().Unix()
- }
- data[r][key] = val
- mutex.Unlock()
-}
-
-// Get returns a value stored for a given key in a given request.
-func Get(r *http.Request, key interface{}) interface{} {
- mutex.RLock()
- if ctx := data[r]; ctx != nil {
- value := ctx[key]
- mutex.RUnlock()
- return value
- }
- mutex.RUnlock()
- return nil
-}
-
-// GetOk returns stored value and presence state like multi-value return of map access.
-func GetOk(r *http.Request, key interface{}) (interface{}, bool) {
- mutex.RLock()
- if _, ok := data[r]; ok {
- value, ok := data[r][key]
- mutex.RUnlock()
- return value, ok
- }
- mutex.RUnlock()
- return nil, false
-}
-
-// GetAll returns all stored values for the request as a map. Nil is returned for invalid requests.
-func GetAll(r *http.Request) map[interface{}]interface{} {
- mutex.RLock()
- if context, ok := data[r]; ok {
- result := make(map[interface{}]interface{}, len(context))
- for k, v := range context {
- result[k] = v
- }
- mutex.RUnlock()
- return result
- }
- mutex.RUnlock()
- return nil
-}
-
-// GetAllOk returns all stored values for the request as a map and a boolean value that indicates if
-// the request was registered.
-func GetAllOk(r *http.Request) (map[interface{}]interface{}, bool) {
- mutex.RLock()
- context, ok := data[r]
- result := make(map[interface{}]interface{}, len(context))
- for k, v := range context {
- result[k] = v
- }
- mutex.RUnlock()
- return result, ok
-}
-
-// Delete removes a value stored for a given key in a given request.
-func Delete(r *http.Request, key interface{}) {
- mutex.Lock()
- if data[r] != nil {
- delete(data[r], key)
- }
- mutex.Unlock()
-}
-
-// Clear removes all values stored for a given request.
-//
-// This is usually called by a handler wrapper to clean up request
-// variables at the end of a request lifetime. See ClearHandler().
-func Clear(r *http.Request) {
- mutex.Lock()
- clear(r)
- mutex.Unlock()
-}
-
-// clear is Clear without the lock.
-func clear(r *http.Request) {
- delete(data, r)
- delete(datat, r)
-}
-
-// Purge removes request data stored for longer than maxAge, in seconds.
-// It returns the amount of requests removed.
-//
-// If maxAge <= 0, all request data is removed.
-//
-// This is only used for sanity check: in case context cleaning was not
-// properly set some request data can be kept forever, consuming an increasing
-// amount of memory. In case this is detected, Purge() must be called
-// periodically until the problem is fixed.
-func Purge(maxAge int) int {
- mutex.Lock()
- count := 0
- if maxAge <= 0 {
- count = len(data)
- data = make(map[*http.Request]map[interface{}]interface{})
- datat = make(map[*http.Request]int64)
- } else {
- min := time.Now().Unix() - int64(maxAge)
- for r := range data {
- if datat[r] < min {
- clear(r)
- count++
- }
- }
- }
- mutex.Unlock()
- return count
-}
-
-// ClearHandler wraps an http.Handler and clears request values at the end
-// of a request lifetime.
-func ClearHandler(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- defer Clear(r)
- h.ServeHTTP(w, r)
- })
-}
diff --git a/vendor/github.com/gorilla/context/doc.go b/vendor/github.com/gorilla/context/doc.go
deleted file mode 100644
index 448d1bfc..00000000
--- a/vendor/github.com/gorilla/context/doc.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-Package context stores values shared during a request lifetime.
-
-Note: gorilla/context, having been born well before `context.Context` existed,
-does not play well > with the shallow copying of the request that
-[`http.Request.WithContext`](https://golang.org/pkg/net/http/#Request.WithContext)
-(added to net/http Go 1.7 onwards) performs. You should either use *just*
-gorilla/context, or moving forward, the new `http.Request.Context()`.
-
-For example, a router can set variables extracted from the URL and later
-application handlers can access those values, or it can be used to store
-sessions values to be saved at the end of a request. There are several
-others common uses.
-
-The idea was posted by Brad Fitzpatrick to the go-nuts mailing list:
-
- http://groups.google.com/group/golang-nuts/msg/e2d679d303aa5d53
-
-Here's the basic usage: first define the keys that you will need. The key
-type is interface{} so a key can be of any type that supports equality.
-Here we define a key using a custom int type to avoid name collisions:
-
- package foo
-
- import (
- "github.com/gorilla/context"
- )
-
- type key int
-
- const MyKey key = 0
-
-Then set a variable. Variables are bound to an http.Request object, so you
-need a request instance to set a value:
-
- context.Set(r, MyKey, "bar")
-
-The application can later access the variable using the same key you provided:
-
- func MyHandler(w http.ResponseWriter, r *http.Request) {
- // val is "bar".
- val := context.Get(r, foo.MyKey)
-
- // returns ("bar", true)
- val, ok := context.GetOk(r, foo.MyKey)
- // ...
- }
-
-And that's all about the basic usage. We discuss some other ideas below.
-
-Any type can be stored in the context. To enforce a given type, make the key
-private and wrap Get() and Set() to accept and return values of a specific
-type:
-
- type key int
-
- const mykey key = 0
-
- // GetMyKey returns a value for this package from the request values.
- func GetMyKey(r *http.Request) SomeType {
- if rv := context.Get(r, mykey); rv != nil {
- return rv.(SomeType)
- }
- return nil
- }
-
- // SetMyKey sets a value for this package in the request values.
- func SetMyKey(r *http.Request, val SomeType) {
- context.Set(r, mykey, val)
- }
-
-Variables must be cleared at the end of a request, to remove all values
-that were stored. This can be done in an http.Handler, after a request was
-served. Just call Clear() passing the request:
-
- context.Clear(r)
-
-...or use ClearHandler(), which conveniently wraps an http.Handler to clear
-variables at the end of a request lifetime.
-
-The Routers from the packages gorilla/mux and gorilla/pat call Clear()
-so if you are using either of them you don't need to clear the context manually.
-*/
-package context
diff --git a/vendor/github.com/gorilla/mux/LICENSE b/vendor/github.com/gorilla/mux/LICENSE
index 0e5fb872..6903df63 100644
--- a/vendor/github.com/gorilla/mux/LICENSE
+++ b/vendor/github.com/gorilla/mux/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2012 Rodrigo Moraes. All rights reserved.
+Copyright (c) 2012-2018 The Gorilla Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
diff --git a/vendor/github.com/gorilla/mux/context_gorilla.go b/vendor/github.com/gorilla/mux/context_gorilla.go
deleted file mode 100644
index d7adaa8f..00000000
--- a/vendor/github.com/gorilla/mux/context_gorilla.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// +build !go1.7
-
-package mux
-
-import (
- "net/http"
-
- "github.com/gorilla/context"
-)
-
-func contextGet(r *http.Request, key interface{}) interface{} {
- return context.Get(r, key)
-}
-
-func contextSet(r *http.Request, key, val interface{}) *http.Request {
- if val == nil {
- return r
- }
-
- context.Set(r, key, val)
- return r
-}
-
-func contextClear(r *http.Request) {
- context.Clear(r)
-}
diff --git a/vendor/github.com/gorilla/mux/context_native.go b/vendor/github.com/gorilla/mux/context_native.go
deleted file mode 100644
index 209cbea7..00000000
--- a/vendor/github.com/gorilla/mux/context_native.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// +build go1.7
-
-package mux
-
-import (
- "context"
- "net/http"
-)
-
-func contextGet(r *http.Request, key interface{}) interface{} {
- return r.Context().Value(key)
-}
-
-func contextSet(r *http.Request, key, val interface{}) *http.Request {
- if val == nil {
- return r
- }
-
- return r.WithContext(context.WithValue(r.Context(), key, val))
-}
-
-func contextClear(r *http.Request) {
- return
-}
diff --git a/vendor/github.com/gorilla/mux/doc.go b/vendor/github.com/gorilla/mux/doc.go
index 38957dee..bd5a38b5 100644
--- a/vendor/github.com/gorilla/mux/doc.go
+++ b/vendor/github.com/gorilla/mux/doc.go
@@ -295,7 +295,7 @@ A more complex authentication middleware, which maps session token to users, cou
r := mux.NewRouter()
r.HandleFunc("/", handler)
- amw := authenticationMiddleware{}
+ amw := authenticationMiddleware{tokenUsers: make(map[string]string)}
amw.Populate()
r.Use(amw.Middleware)
diff --git a/vendor/github.com/gorilla/mux/middleware.go b/vendor/github.com/gorilla/mux/middleware.go
index ceb812ce..cb51c565 100644
--- a/vendor/github.com/gorilla/mux/middleware.go
+++ b/vendor/github.com/gorilla/mux/middleware.go
@@ -32,37 +32,19 @@ func (r *Router) useInterface(mw middleware) {
r.middlewares = append(r.middlewares, mw)
}
-// CORSMethodMiddleware sets the Access-Control-Allow-Methods response header
-// on a request, by matching routes based only on paths. It also handles
-// OPTIONS requests, by settings Access-Control-Allow-Methods, and then
-// returning without calling the next http handler.
+// CORSMethodMiddleware automatically sets the Access-Control-Allow-Methods response header
+// on requests for routes that have an OPTIONS method matcher to all the method matchers on
+// the route. Routes that do not explicitly handle OPTIONS requests will not be processed
+// by the middleware. See examples for usage.
func CORSMethodMiddleware(r *Router) MiddlewareFunc {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- var allMethods []string
-
- err := r.Walk(func(route *Route, _ *Router, _ []*Route) error {
- for _, m := range route.matchers {
- if _, ok := m.(*routeRegexp); ok {
- if m.Match(req, &RouteMatch{}) {
- methods, err := route.GetMethods()
- if err != nil {
- return err
- }
-
- allMethods = append(allMethods, methods...)
- }
- break
- }
- }
- return nil
- })
-
+ allMethods, err := getAllMethodsForRoute(r, req)
if err == nil {
- w.Header().Set("Access-Control-Allow-Methods", strings.Join(append(allMethods, "OPTIONS"), ","))
-
- if req.Method == "OPTIONS" {
- return
+ for _, v := range allMethods {
+ if v == http.MethodOptions {
+ w.Header().Set("Access-Control-Allow-Methods", strings.Join(allMethods, ","))
+ }
}
}
@@ -70,3 +52,23 @@ func CORSMethodMiddleware(r *Router) MiddlewareFunc {
})
}
}
+
+// getAllMethodsForRoute returns all the methods from method matchers matching a given
+// request.
+func getAllMethodsForRoute(r *Router, req *http.Request) ([]string, error) {
+ var allMethods []string
+
+ for _, route := range r.routes {
+ var match RouteMatch
+ if route.Match(req, &match) || match.MatchErr == ErrMethodMismatch {
+ methods, err := route.GetMethods()
+ if err != nil {
+ return nil, err
+ }
+
+ allMethods = append(allMethods, methods...)
+ }
+ }
+
+ return allMethods, nil
+}
diff --git a/vendor/github.com/gorilla/mux/mux.go b/vendor/github.com/gorilla/mux/mux.go
index 4bbafa51..c9ba6470 100644
--- a/vendor/github.com/gorilla/mux/mux.go
+++ b/vendor/github.com/gorilla/mux/mux.go
@@ -5,6 +5,7 @@
package mux
import (
+ "context"
"errors"
"fmt"
"net/http"
@@ -22,7 +23,7 @@ var (
// NewRouter returns a new router instance.
func NewRouter() *Router {
- return &Router{namedRoutes: make(map[string]*Route), KeepContext: false}
+ return &Router{namedRoutes: make(map[string]*Route)}
}
// Router registers routes to be matched and dispatches a handler.
@@ -50,24 +51,75 @@ type Router struct {
// Configurable Handler to be used when the request method does not match the route.
MethodNotAllowedHandler http.Handler
- // Parent route, if this is a subrouter.
- parent parentRoute
// Routes to be matched, in order.
routes []*Route
+
// Routes by name for URL building.
namedRoutes map[string]*Route
- // See Router.StrictSlash(). This defines the flag for new routes.
- strictSlash bool
- // See Router.SkipClean(). This defines the flag for new routes.
- skipClean bool
+
// If true, do not clear the request context after handling the request.
- // This has no effect when go1.7+ is used, since the context is stored
- // on the request itself.
+ //
+ // Deprecated: No effect, since the context is stored on the request itself.
KeepContext bool
- // see Router.UseEncodedPath(). This defines a flag for all routes.
- useEncodedPath bool
+
// Slice of middlewares to be called after a match is found
middlewares []middleware
+
+ // configuration shared with `Route`
+ routeConf
+}
+
+// common route configuration shared between `Router` and `Route`
+type routeConf struct {
+ // If true, "/path/foo%2Fbar/to" will match the path "/path/{var}/to"
+ useEncodedPath bool
+
+ // If true, when the path pattern is "/path/", accessing "/path" will
+ // redirect to the former and vice versa.
+ strictSlash bool
+
+ // If true, when the path pattern is "/path//to", accessing "/path//to"
+ // will not redirect
+ skipClean bool
+
+ // Manager for the variables from host and path.
+ regexp routeRegexpGroup
+
+ // List of matchers.
+ matchers []matcher
+
+ // The scheme used when building URLs.
+ buildScheme string
+
+ buildVarsFunc BuildVarsFunc
+}
+
+// returns an effective deep copy of `routeConf`
+func copyRouteConf(r routeConf) routeConf {
+ c := r
+
+ if r.regexp.path != nil {
+ c.regexp.path = copyRouteRegexp(r.regexp.path)
+ }
+
+ if r.regexp.host != nil {
+ c.regexp.host = copyRouteRegexp(r.regexp.host)
+ }
+
+ c.regexp.queries = make([]*routeRegexp, 0, len(r.regexp.queries))
+ for _, q := range r.regexp.queries {
+ c.regexp.queries = append(c.regexp.queries, copyRouteRegexp(q))
+ }
+
+ c.matchers = make([]matcher, len(r.matchers))
+ copy(c.matchers, r.matchers)
+
+ return c
+}
+
+func copyRouteRegexp(r *routeRegexp) *routeRegexp {
+ c := *r
+ return &c
}
// Match attempts to match the given request against the router's registered routes.
@@ -143,8 +195,8 @@ func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
var handler http.Handler
if r.Match(req, &match) {
handler = match.Handler
- req = setVars(req, match.Vars)
- req = setCurrentRoute(req, match.Route)
+ req = requestWithVars(req, match.Vars)
+ req = requestWithRoute(req, match.Route)
}
if handler == nil && match.MatchErr == ErrMethodMismatch {
@@ -155,22 +207,18 @@ func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
handler = http.NotFoundHandler()
}
- if !r.KeepContext {
- defer contextClear(req)
- }
-
handler.ServeHTTP(w, req)
}
// Get returns a route registered with the given name.
func (r *Router) Get(name string) *Route {
- return r.getNamedRoutes()[name]
+ return r.namedRoutes[name]
}
// GetRoute returns a route registered with the given name. This method
// was renamed to Get() and remains here for backwards compatibility.
func (r *Router) GetRoute(name string) *Route {
- return r.getNamedRoutes()[name]
+ return r.namedRoutes[name]
}
// StrictSlash defines the trailing slash behavior for new routes. The initial
@@ -221,55 +269,24 @@ func (r *Router) UseEncodedPath() *Router {
return r
}
-// ----------------------------------------------------------------------------
-// parentRoute
-// ----------------------------------------------------------------------------
-
-func (r *Router) getBuildScheme() string {
- if r.parent != nil {
- return r.parent.getBuildScheme()
- }
- return ""
-}
-
-// getNamedRoutes returns the map where named routes are registered.
-func (r *Router) getNamedRoutes() map[string]*Route {
- if r.namedRoutes == nil {
- if r.parent != nil {
- r.namedRoutes = r.parent.getNamedRoutes()
- } else {
- r.namedRoutes = make(map[string]*Route)
- }
- }
- return r.namedRoutes
-}
-
-// getRegexpGroup returns regexp definitions from the parent route, if any.
-func (r *Router) getRegexpGroup() *routeRegexpGroup {
- if r.parent != nil {
- return r.parent.getRegexpGroup()
- }
- return nil
-}
-
-func (r *Router) buildVars(m map[string]string) map[string]string {
- if r.parent != nil {
- m = r.parent.buildVars(m)
- }
- return m
-}
-
// ----------------------------------------------------------------------------
// Route factories
// ----------------------------------------------------------------------------
// NewRoute registers an empty route.
func (r *Router) NewRoute() *Route {
- route := &Route{parent: r, strictSlash: r.strictSlash, skipClean: r.skipClean, useEncodedPath: r.useEncodedPath}
+ // initialize a route with a copy of the parent router's configuration
+ route := &Route{routeConf: copyRouteConf(r.routeConf), namedRoutes: r.namedRoutes}
r.routes = append(r.routes, route)
return route
}
+// Name registers a new route with a name.
+// See Route.Name().
+func (r *Router) Name(name string) *Route {
+ return r.NewRoute().Name(name)
+}
+
// Handle registers a new route with a matcher for the URL path.
// See Route.Path() and Route.Handler().
func (r *Router) Handle(path string, handler http.Handler) *Route {
@@ -409,7 +426,7 @@ const (
// Vars returns the route variables for the current request, if any.
func Vars(r *http.Request) map[string]string {
- if rv := contextGet(r, varsKey); rv != nil {
+ if rv := r.Context().Value(varsKey); rv != nil {
return rv.(map[string]string)
}
return nil
@@ -421,18 +438,20 @@ func Vars(r *http.Request) map[string]string {
// after the handler returns, unless the KeepContext option is set on the
// Router.
func CurrentRoute(r *http.Request) *Route {
- if rv := contextGet(r, routeKey); rv != nil {
+ if rv := r.Context().Value(routeKey); rv != nil {
return rv.(*Route)
}
return nil
}
-func setVars(r *http.Request, val interface{}) *http.Request {
- return contextSet(r, varsKey, val)
+func requestWithVars(r *http.Request, vars map[string]string) *http.Request {
+ ctx := context.WithValue(r.Context(), varsKey, vars)
+ return r.WithContext(ctx)
}
-func setCurrentRoute(r *http.Request, val interface{}) *http.Request {
- return contextSet(r, routeKey, val)
+func requestWithRoute(r *http.Request, route *Route) *http.Request {
+ ctx := context.WithValue(r.Context(), routeKey, route)
+ return r.WithContext(ctx)
}
// ----------------------------------------------------------------------------
diff --git a/vendor/github.com/gorilla/mux/regexp.go b/vendor/github.com/gorilla/mux/regexp.go
index 2b57e562..96dd94ad 100644
--- a/vendor/github.com/gorilla/mux/regexp.go
+++ b/vendor/github.com/gorilla/mux/regexp.go
@@ -113,6 +113,13 @@ func newRouteRegexp(tpl string, typ regexpType, options routeRegexpOptions) (*ro
if typ != regexpTypePrefix {
pattern.WriteByte('$')
}
+
+ var wildcardHostPort bool
+ if typ == regexpTypeHost {
+ if !strings.Contains(pattern.String(), ":") {
+ wildcardHostPort = true
+ }
+ }
reverse.WriteString(raw)
if endSlash {
reverse.WriteByte('/')
@@ -131,13 +138,14 @@ func newRouteRegexp(tpl string, typ regexpType, options routeRegexpOptions) (*ro
// Done!
return &routeRegexp{
- template: template,
- regexpType: typ,
- options: options,
- regexp: reg,
- reverse: reverse.String(),
- varsN: varsN,
- varsR: varsR,
+ template: template,
+ regexpType: typ,
+ options: options,
+ regexp: reg,
+ reverse: reverse.String(),
+ varsN: varsN,
+ varsR: varsR,
+ wildcardHostPort: wildcardHostPort,
}, nil
}
@@ -158,27 +166,36 @@ type routeRegexp struct {
varsN []string
// Variable regexps (validators).
varsR []*regexp.Regexp
+ // Wildcard host-port (no strict port match in hostname)
+ wildcardHostPort bool
}
// Match matches the regexp against the URL host or path.
func (r *routeRegexp) Match(req *http.Request, match *RouteMatch) bool {
- if r.regexpType != regexpTypeHost {
- if r.regexpType == regexpTypeQuery {
- return r.matchQueryString(req)
- }
- path := req.URL.Path
- if r.options.useEncodedPath {
- path = req.URL.EscapedPath()
+ if r.regexpType == regexpTypeHost {
+ host := getHost(req)
+ if r.wildcardHostPort {
+ // Don't be strict on the port match
+ if i := strings.Index(host, ":"); i != -1 {
+ host = host[:i]
+ }
}
- return r.regexp.MatchString(path)
+ return r.regexp.MatchString(host)
}
- return r.regexp.MatchString(getHost(req))
+ if r.regexpType == regexpTypeQuery {
+ return r.matchQueryString(req)
+ }
+ path := req.URL.Path
+ if r.options.useEncodedPath {
+ path = req.URL.EscapedPath()
+ }
+ return r.regexp.MatchString(path)
}
// url builds a URL part using the given values.
func (r *routeRegexp) url(values map[string]string) (string, error) {
- urlValues := make([]interface{}, len(r.varsN))
+ urlValues := make([]interface{}, len(r.varsN), len(r.varsN))
for k, v := range r.varsN {
value, ok := values[v]
if !ok {
@@ -213,14 +230,51 @@ func (r *routeRegexp) getURLQuery(req *http.Request) string {
return ""
}
templateKey := strings.SplitN(r.template, "=", 2)[0]
- for key, vals := range req.URL.Query() {
- if key == templateKey && len(vals) > 0 {
- return key + "=" + vals[0]
- }
+ val, ok := findFirstQueryKey(req.URL.RawQuery, templateKey)
+ if ok {
+ return templateKey + "=" + val
}
return ""
}
+// findFirstQueryKey returns the same result as (*url.URL).Query()[key][0].
+// If key was not found, empty string and false is returned.
+func findFirstQueryKey(rawQuery, key string) (value string, ok bool) {
+ query := []byte(rawQuery)
+ for len(query) > 0 {
+ foundKey := query
+ if i := bytes.IndexAny(foundKey, "&;"); i >= 0 {
+ foundKey, query = foundKey[:i], foundKey[i+1:]
+ } else {
+ query = query[:0]
+ }
+ if len(foundKey) == 0 {
+ continue
+ }
+ var value []byte
+ if i := bytes.IndexByte(foundKey, '='); i >= 0 {
+ foundKey, value = foundKey[:i], foundKey[i+1:]
+ }
+ if len(foundKey) < len(key) {
+ // Cannot possibly be key.
+ continue
+ }
+ keyString, err := url.QueryUnescape(string(foundKey))
+ if err != nil {
+ continue
+ }
+ if keyString != key {
+ continue
+ }
+ valueString, err := url.QueryUnescape(string(value))
+ if err != nil {
+ continue
+ }
+ return valueString, true
+ }
+ return "", false
+}
+
func (r *routeRegexp) matchQueryString(req *http.Request) bool {
return r.regexp.MatchString(r.getURLQuery(req))
}
@@ -267,7 +321,7 @@ type routeRegexpGroup struct {
}
// setMatch extracts the variables from the URL once a route matches.
-func (v *routeRegexpGroup) setMatch(req *http.Request, m *RouteMatch, r *Route) {
+func (v routeRegexpGroup) setMatch(req *http.Request, m *RouteMatch, r *Route) {
// Store host variables.
if v.host != nil {
host := getHost(req)
@@ -296,7 +350,7 @@ func (v *routeRegexpGroup) setMatch(req *http.Request, m *RouteMatch, r *Route)
} else {
u.Path += "/"
}
- m.Handler = http.RedirectHandler(u.String(), 301)
+ m.Handler = http.RedirectHandler(u.String(), http.StatusMovedPermanently)
}
}
}
@@ -312,17 +366,13 @@ func (v *routeRegexpGroup) setMatch(req *http.Request, m *RouteMatch, r *Route)
}
// getHost tries its best to return the request host.
+// According to section 14.23 of RFC 2616 the Host header
+// can include the port number if the default value of 80 is not used.
func getHost(r *http.Request) string {
if r.URL.IsAbs() {
return r.URL.Host
}
- host := r.Host
- // Slice off any port information.
- if i := strings.Index(host, ":"); i != -1 {
- host = host[:i]
- }
- return host
-
+ return r.Host
}
func extractVars(input string, matches []int, names []string, output map[string]string) {
diff --git a/vendor/github.com/gorilla/mux/route.go b/vendor/github.com/gorilla/mux/route.go
index a591d735..750afe57 100644
--- a/vendor/github.com/gorilla/mux/route.go
+++ b/vendor/github.com/gorilla/mux/route.go
@@ -15,24 +15,8 @@ import (
// Route stores information to match a request and build URLs.
type Route struct {
- // Parent where the route was registered (a Router).
- parent parentRoute
// Request handler for the route.
handler http.Handler
- // List of matchers.
- matchers []matcher
- // Manager for the variables from host and path.
- regexp *routeRegexpGroup
- // If true, when the path pattern is "/path/", accessing "/path" will
- // redirect to the former and vice versa.
- strictSlash bool
- // If true, when the path pattern is "/path//to", accessing "/path//to"
- // will not redirect
- skipClean bool
- // If true, "/path/foo%2Fbar/to" will match the path "/path/{var}/to"
- useEncodedPath bool
- // The scheme used when building URLs.
- buildScheme string
// If true, this route never matches: it is only used to build URLs.
buildOnly bool
// The name used to build URLs.
@@ -40,7 +24,11 @@ type Route struct {
// Error resulted from building a route.
err error
- buildVarsFunc BuildVarsFunc
+ // "global" reference to all named routes
+ namedRoutes map[string]*Route
+
+ // config possibly passed in from `Router`
+ routeConf
}
// SkipClean reports whether path cleaning is enabled for this route via
@@ -64,6 +52,18 @@ func (r *Route) Match(req *http.Request, match *RouteMatch) bool {
matchErr = ErrMethodMismatch
continue
}
+
+ // Ignore ErrNotFound errors. These errors arise from match call
+ // to Subrouters.
+ //
+ // This prevents subsequent matching subrouters from failing to
+ // run middleware. If not ignored, the middleware would see a
+ // non-nil MatchErr and be skipped, even when there was a
+ // matching route.
+ if match.MatchErr == ErrNotFound {
+ match.MatchErr = nil
+ }
+
matchErr = nil
return false
}
@@ -74,7 +74,7 @@ func (r *Route) Match(req *http.Request, match *RouteMatch) bool {
return false
}
- if match.MatchErr == ErrMethodMismatch {
+ if match.MatchErr == ErrMethodMismatch && r.handler != nil {
// We found a route which matches request method, clear MatchErr
match.MatchErr = nil
// Then override the mis-matched handler
@@ -93,9 +93,7 @@ func (r *Route) Match(req *http.Request, match *RouteMatch) bool {
}
// Set variables.
- if r.regexp != nil {
- r.regexp.setMatch(req, match, r)
- }
+ r.regexp.setMatch(req, match, r)
return true
}
@@ -137,7 +135,7 @@ func (r *Route) GetHandler() http.Handler {
// Name -----------------------------------------------------------------------
// Name sets the name for the route, used to build URLs.
-// If the name was registered already it will be overwritten.
+// It is an error to call Name more than once on a route.
func (r *Route) Name(name string) *Route {
if r.name != "" {
r.err = fmt.Errorf("mux: route already has name %q, can't set %q",
@@ -145,7 +143,7 @@ func (r *Route) Name(name string) *Route {
}
if r.err == nil {
r.name = name
- r.getNamedRoutes()[name] = r
+ r.namedRoutes[name] = r
}
return r
}
@@ -177,7 +175,6 @@ func (r *Route) addRegexpMatcher(tpl string, typ regexpType) error {
if r.err != nil {
return r.err
}
- r.regexp = r.getRegexpGroup()
if typ == regexpTypePath || typ == regexpTypePrefix {
if len(tpl) > 0 && tpl[0] != '/' {
return fmt.Errorf("mux: path must start with a slash, got %q", tpl)
@@ -386,7 +383,7 @@ func (r *Route) PathPrefix(tpl string) *Route {
// The above route will only match if the URL contains the defined queries
// values, e.g.: ?foo=bar&id=42.
//
-// It the value is an empty string, it will match any value if the key is set.
+// If the value is an empty string, it will match any value if the key is set.
//
// Variables can define an optional regexp pattern to be matched:
//
@@ -415,16 +412,35 @@ func (r *Route) Queries(pairs ...string) *Route {
type schemeMatcher []string
func (m schemeMatcher) Match(r *http.Request, match *RouteMatch) bool {
- return matchInArray(m, r.URL.Scheme)
+ scheme := r.URL.Scheme
+ // https://golang.org/pkg/net/http/#Request
+ // "For [most] server requests, fields other than Path and RawQuery will be
+ // empty."
+ // Since we're an http muxer, the scheme is either going to be http or https
+ // though, so we can just set it based on the tls termination state.
+ if scheme == "" {
+ if r.TLS == nil {
+ scheme = "http"
+ } else {
+ scheme = "https"
+ }
+ }
+ return matchInArray(m, scheme)
}
// Schemes adds a matcher for URL schemes.
// It accepts a sequence of schemes to be matched, e.g.: "http", "https".
+// If the request's URL has a scheme set, it will be matched against.
+// Generally, the URL scheme will only be set if a previous handler set it,
+// such as the ProxyHeaders handler from gorilla/handlers.
+// If unset, the scheme will be determined based on the request's TLS
+// termination state.
+// The first argument to Schemes will be used when constructing a route URL.
func (r *Route) Schemes(schemes ...string) *Route {
for k, v := range schemes {
schemes[k] = strings.ToLower(v)
}
- if r.buildScheme == "" && len(schemes) > 0 {
+ if len(schemes) > 0 {
r.buildScheme = schemes[0]
}
return r.addMatcher(schemeMatcher(schemes))
@@ -439,7 +455,15 @@ type BuildVarsFunc func(map[string]string) map[string]string
// BuildVarsFunc adds a custom function to be used to modify build variables
// before a route's URL is built.
func (r *Route) BuildVarsFunc(f BuildVarsFunc) *Route {
- r.buildVarsFunc = f
+ if r.buildVarsFunc != nil {
+ // compose the old and new functions
+ old := r.buildVarsFunc
+ r.buildVarsFunc = func(m map[string]string) map[string]string {
+ return f(old(m))
+ }
+ } else {
+ r.buildVarsFunc = f
+ }
return r
}
@@ -458,7 +482,8 @@ func (r *Route) BuildVarsFunc(f BuildVarsFunc) *Route {
// Here, the routes registered in the subrouter won't be tested if the host
// doesn't match.
func (r *Route) Subrouter() *Router {
- router := &Router{parent: r, strictSlash: r.strictSlash}
+ // initialize a subrouter with a copy of the parent route's configuration
+ router := &Router{routeConf: copyRouteConf(r.routeConf), namedRoutes: r.namedRoutes}
r.addMatcher(router)
return router
}
@@ -487,8 +512,8 @@ func (r *Route) Subrouter() *Router {
// This also works for host variables:
//
// r := mux.NewRouter()
-// r.Host("{subdomain}.domain.com").
-// HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler).
+// r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler).
+// Host("{subdomain}.domain.com").
// Name("article")
//
// // url.String() will be "http://news.domain.com/articles/technology/42"
@@ -496,15 +521,19 @@ func (r *Route) Subrouter() *Router {
// "category", "technology",
// "id", "42")
//
+// The scheme of the resulting url will be the first argument that was passed to Schemes:
+//
+// // url.String() will be "https://example.com"
+// r := mux.NewRouter()
+// url, err := r.Host("example.com")
+// .Schemes("https", "http").URL()
+//
// All variables defined in the route are required, and their values must
// conform to the corresponding patterns.
func (r *Route) URL(pairs ...string) (*url.URL, error) {
if r.err != nil {
return nil, r.err
}
- if r.regexp == nil {
- return nil, errors.New("mux: route doesn't have a host or path")
- }
values, err := r.prepareVars(pairs...)
if err != nil {
return nil, err
@@ -516,8 +545,8 @@ func (r *Route) URL(pairs ...string) (*url.URL, error) {
return nil, err
}
scheme = "http"
- if s := r.getBuildScheme(); s != "" {
- scheme = s
+ if r.buildScheme != "" {
+ scheme = r.buildScheme
}
}
if r.regexp.path != nil {
@@ -547,7 +576,7 @@ func (r *Route) URLHost(pairs ...string) (*url.URL, error) {
if r.err != nil {
return nil, r.err
}
- if r.regexp == nil || r.regexp.host == nil {
+ if r.regexp.host == nil {
return nil, errors.New("mux: route doesn't have a host")
}
values, err := r.prepareVars(pairs...)
@@ -562,8 +591,8 @@ func (r *Route) URLHost(pairs ...string) (*url.URL, error) {
Scheme: "http",
Host: host,
}
- if s := r.getBuildScheme(); s != "" {
- u.Scheme = s
+ if r.buildScheme != "" {
+ u.Scheme = r.buildScheme
}
return u, nil
}
@@ -575,7 +604,7 @@ func (r *Route) URLPath(pairs ...string) (*url.URL, error) {
if r.err != nil {
return nil, r.err
}
- if r.regexp == nil || r.regexp.path == nil {
+ if r.regexp.path == nil {
return nil, errors.New("mux: route doesn't have a path")
}
values, err := r.prepareVars(pairs...)
@@ -600,7 +629,7 @@ func (r *Route) GetPathTemplate() (string, error) {
if r.err != nil {
return "", r.err
}
- if r.regexp == nil || r.regexp.path == nil {
+ if r.regexp.path == nil {
return "", errors.New("mux: route doesn't have a path")
}
return r.regexp.path.template, nil
@@ -614,7 +643,7 @@ func (r *Route) GetPathRegexp() (string, error) {
if r.err != nil {
return "", r.err
}
- if r.regexp == nil || r.regexp.path == nil {
+ if r.regexp.path == nil {
return "", errors.New("mux: route does not have a path")
}
return r.regexp.path.regexp.String(), nil
@@ -629,10 +658,10 @@ func (r *Route) GetQueriesRegexp() ([]string, error) {
if r.err != nil {
return nil, r.err
}
- if r.regexp == nil || r.regexp.queries == nil {
+ if r.regexp.queries == nil {
return nil, errors.New("mux: route doesn't have queries")
}
- var queries []string
+ queries := make([]string, 0, len(r.regexp.queries))
for _, query := range r.regexp.queries {
queries = append(queries, query.regexp.String())
}
@@ -648,10 +677,10 @@ func (r *Route) GetQueriesTemplates() ([]string, error) {
if r.err != nil {
return nil, r.err
}
- if r.regexp == nil || r.regexp.queries == nil {
+ if r.regexp.queries == nil {
return nil, errors.New("mux: route doesn't have queries")
}
- var queries []string
+ queries := make([]string, 0, len(r.regexp.queries))
for _, query := range r.regexp.queries {
queries = append(queries, query.template)
}
@@ -683,7 +712,7 @@ func (r *Route) GetHostTemplate() (string, error) {
if r.err != nil {
return "", r.err
}
- if r.regexp == nil || r.regexp.host == nil {
+ if r.regexp.host == nil {
return "", errors.New("mux: route doesn't have a host")
}
return r.regexp.host.template, nil
@@ -700,64 +729,8 @@ func (r *Route) prepareVars(pairs ...string) (map[string]string, error) {
}
func (r *Route) buildVars(m map[string]string) map[string]string {
- if r.parent != nil {
- m = r.parent.buildVars(m)
- }
if r.buildVarsFunc != nil {
m = r.buildVarsFunc(m)
}
return m
}
-
-// ----------------------------------------------------------------------------
-// parentRoute
-// ----------------------------------------------------------------------------
-
-// parentRoute allows routes to know about parent host and path definitions.
-type parentRoute interface {
- getBuildScheme() string
- getNamedRoutes() map[string]*Route
- getRegexpGroup() *routeRegexpGroup
- buildVars(map[string]string) map[string]string
-}
-
-func (r *Route) getBuildScheme() string {
- if r.buildScheme != "" {
- return r.buildScheme
- }
- if r.parent != nil {
- return r.parent.getBuildScheme()
- }
- return ""
-}
-
-// getNamedRoutes returns the map where named routes are registered.
-func (r *Route) getNamedRoutes() map[string]*Route {
- if r.parent == nil {
- // During tests router is not always set.
- r.parent = NewRouter()
- }
- return r.parent.getNamedRoutes()
-}
-
-// getRegexpGroup returns regexp definitions from this route.
-func (r *Route) getRegexpGroup() *routeRegexpGroup {
- if r.regexp == nil {
- if r.parent == nil {
- // During tests router is not always set.
- r.parent = NewRouter()
- }
- regexp := r.parent.getRegexpGroup()
- if regexp == nil {
- r.regexp = new(routeRegexpGroup)
- } else {
- // Copy.
- r.regexp = &routeRegexpGroup{
- host: regexp.host,
- path: regexp.path,
- queries: regexp.queries,
- }
- }
- }
- return r.regexp
-}
diff --git a/vendor/github.com/gorilla/mux/test_helpers.go b/vendor/github.com/gorilla/mux/test_helpers.go
index 32ecffde..5f5c496d 100644
--- a/vendor/github.com/gorilla/mux/test_helpers.go
+++ b/vendor/github.com/gorilla/mux/test_helpers.go
@@ -15,5 +15,5 @@ import "net/http"
// can be set by making a route that captures the required variables,
// starting a server and sending the request to that server.
func SetURLVars(r *http.Request, val map[string]string) *http.Request {
- return setVars(r, val)
+ return requestWithVars(r, val)
}
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/bind.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/bind.go
index 574c7380..4b837858 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/bind.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/bind.go
@@ -75,6 +75,11 @@ func (c *client) Bind(r *BindRequest) (*BindResponse, error) {
return nil, err
}
+ defer func() {
+ drainReader(response.Body)
+ response.Body.Close()
+ }()
+
switch response.StatusCode {
case http.StatusOK, http.StatusCreated:
userResponse := &BindResponse{}
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/client.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/client.go
index 829e906f..429bf659 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/client.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/client.go
@@ -10,6 +10,7 @@ import (
"fmt"
"io"
"io/ioutil"
+ "net"
"net/http"
"strings"
"time"
@@ -38,7 +39,21 @@ func NewClient(config *ClientConfiguration) (Client, error) {
httpClient := &http.Client{
Timeout: time.Duration(config.TimeoutSeconds) * time.Second,
}
- transport := &http.Transport{}
+
+ // use default values lifted from DefaultTransport
+ transport := &http.Transport{
+ Proxy: http.ProxyFromEnvironment,
+ DialContext: (&net.Dialer{
+ Timeout: 30 * time.Second,
+ KeepAlive: 30 * time.Second,
+ DualStack: true,
+ }).DialContext,
+ MaxIdleConns: 100,
+ IdleConnTimeout: 90 * time.Second,
+ TLSHandshakeTimeout: 10 * time.Second,
+ ExpectContinueTimeout: 1 * time.Second,
+ }
+
if config.TLSConfig != nil {
transport.TLSClientConfig = config.TLSConfig
} else {
@@ -271,6 +286,20 @@ func (c *client) validateAlphaAPIMethodsAllowed() error {
return nil
}
+// drainReader reads and discards the remaining data in reader (for example
+// response body data) For HTTP this ensures that the http connection
+// could be reused for another request if the keepalive is enabled.
+// see https://gist.github.com/mholt/eba0f2cc96658be0f717#gistcomment-2605879
+// Not certain this is really needed here for the Broker vs a http server
+// but seems safe and worth including at this point
+func drainReader(reader io.Reader) error {
+ if reader == nil {
+ return nil
+ }
+ _, drainError := io.Copy(ioutil.Discard, io.LimitReader(reader, 4096))
+ return drainError
+}
+
// internal message body types
type asyncSuccessResponseBody struct {
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/deprovision_instance.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/deprovision_instance.go
index 730149ba..d8f32901 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/deprovision_instance.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/deprovision_instance.go
@@ -25,6 +25,11 @@ func (c *client) DeprovisionInstance(r *DeprovisionRequest) (*DeprovisionRespons
return nil, err
}
+ defer func() {
+ drainReader(response.Body)
+ response.Body.Close()
+ }()
+
switch response.StatusCode {
case http.StatusOK, http.StatusGone:
return &DeprovisionResponse{}, nil
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_binding.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_binding.go
index ef413e45..4ced34bd 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_binding.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_binding.go
@@ -19,6 +19,11 @@ func (c *client) GetBinding(r *GetBindingRequest) (*GetBindingResponse, error) {
return nil, err
}
+ defer func() {
+ drainReader(response.Body)
+ response.Body.Close()
+ }()
+
switch response.StatusCode {
case http.StatusOK:
userResponse := &GetBindingResponse{}
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_catalog.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_catalog.go
index b4d87029..12418cb5 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_catalog.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_catalog.go
@@ -13,6 +13,11 @@ func (c *client) GetCatalog() (*CatalogResponse, error) {
return nil, err
}
+ defer func() {
+ drainReader(response.Body)
+ response.Body.Close()
+ }()
+
switch response.StatusCode {
case http.StatusOK:
catalogResponse := &CatalogResponse{}
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/poll_binding_last_operation.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/poll_binding_last_operation.go
index dfd39a4a..7a9eee48 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/poll_binding_last_operation.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/poll_binding_last_operation.go
@@ -36,6 +36,11 @@ func (c *client) PollBindingLastOperation(r *BindingLastOperationRequest) (*Last
return nil, err
}
+ defer func() {
+ drainReader(response.Body)
+ response.Body.Close()
+ }()
+
switch response.StatusCode {
case http.StatusOK:
userResponse := &LastOperationResponse{}
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/poll_last_operation.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/poll_last_operation.go
index 27e19ffa..092877e1 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/poll_last_operation.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/poll_last_operation.go
@@ -30,6 +30,11 @@ func (c *client) PollLastOperation(r *LastOperationRequest) (*LastOperationRespo
return nil, err
}
+ defer func() {
+ drainReader(response.Body)
+ response.Body.Close()
+ }()
+
switch response.StatusCode {
case http.StatusOK:
userResponse := &LastOperationResponse{}
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/provision_instance.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/provision_instance.go
index 3fe75776..e6bc856d 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/provision_instance.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/provision_instance.go
@@ -52,6 +52,11 @@ func (c *client) ProvisionInstance(r *ProvisionRequest) (*ProvisionResponse, err
return nil, err
}
+ defer func() {
+ drainReader(response.Body)
+ response.Body.Close()
+ }()
+
switch response.StatusCode {
case http.StatusCreated, http.StatusOK:
userResponse := &ProvisionResponse{}
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/types.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/types.go
index fca37b0f..33ce1faf 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/types.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/types.go
@@ -13,10 +13,10 @@ type Service struct {
// printing by a CLI.
Description string `json:"description"`
// A list of 'tags' describing different classification referents or
- // attributes of the service. CF-specific.
+ // attributes of the service. CF-specific.
Tags []string `json:"tags,omitempty"`
// A list of permissions the user must give instances of this service.
- // CF-specific. Current valid values are:
+ // CF-specific. Current valid values are:
//
// - syslog_drain
// - route_forwarding
@@ -24,40 +24,38 @@ type Service struct {
//
// See the Open Service Broker API spec for information on permissions.
Requires []string `json:"requires,omitempty"`
- // Bindable represents whether a service is bindable. May be overridden
+ // Bindable represents whether a service is bindable. May be overridden
// on a per-plan basis by the Plan.Bindable field.
Bindable bool `json:"bindable"`
// BindingsRetrievable is ALPHA and may change or disappear at any time.
- // BindingsRetrievable will only be provided if alpha features are
- // enabled.
+ // BindingsRetrievable will only be provided if alpha features are enabled.
//
- // BindingsRetrievable represents whether fetching a service binding via
- // a GET on the binding resource's endpoint
+ // BindingsRetrievable represents whether fetching a service binding via a
+ // GET on the binding resource's endpoint
// (/v2/service_instances/instance-id/service_bindings/binding-id) is
// supported for all plans.
BindingsRetrievable bool `json:"bindings_retrievable,omitempty"`
// PlanUpdatable represents whether instances of this service may be
- // updated to a different plan. The serialized form 'plan_updateable' is
+ // updated to a different plan. The serialized form 'plan_updateable' is
// a mistake that has become written into the API for backward
- // compatibility reasons and is intentional. Optional; defaults to false.
+ // compatibility reasons and is intentional. Optional; defaults to false.
PlanUpdatable *bool `json:"plan_updateable,omitempty"`
- // Plans is the list of the Plans for a service. Plans represent
+ // Plans is the list of the Plans for a service. Plans represent
// different tiers.
Plans []Plan `json:"plans"`
// DashboardClient holds information about the OAuth SSO for the service's
- // dashboard. Optional.
+ // dashboard. Optional.
DashboardClient *DashboardClient `json:"dashboard_client,omitempty"`
// Metadata is a blob of information about the plan, meant to be user-
- // facing content and display instructions. Metadata may contain
- // platform-conventional values. Optional.
+ // facing content and display instructions. Metadata may contain
+ // platform-conventional values. Optional.
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
// DashboardClient contains information about the OAuth SSO
// flow for a Service's dashboard.
type DashboardClient struct {
- // ID is the ID to use for the dashboard SSO OAuth client for this
- // service.
+ // ID is the ID to use for the dashboard SSO OAuth client for this service.
ID string `json:"id"`
// Secret is a secret for the dashboard SSO OAuth client.
Secret string `json:"secret"`
@@ -72,18 +70,18 @@ type Plan struct {
ID string `json:"id"`
// Name is the plan's display name.
Name string `json:"name"`
- // Description is a brief description of the plan, suitable for
- // printing by a CLI.
+ // Description is a brief description of the plan, suitable for printing by
+ // a CLI.
Description string `json:"description"`
- // Free indicates whether the plan is available without charge. Optional;
+ // Free indicates whether the plan is available without charge. Optional;
// defaults to true.
Free *bool `json:"free,omitempty"`
// Bindable indicates whether the plan is bindable and overrides the value
- // of the Service.Bindable field if set. Optional, defaults to unset.
+ // of the Service.Bindable field if set. Optional; defaults to unset.
Bindable *bool `json:"bindable,omitempty"`
// Metadata is a blob of information about the plan, meant to be user-
- // facing content and display instructions. Metadata may contain
- // platform-conventional values. Optional.
+ // facing content and display instructions. Metadata may contain
+ // platform-conventional values. Optional.
Metadata map[string]interface{} `json:"metadata,omitempty"`
// Schemas requires a client API version >=2.13.
//
@@ -96,11 +94,13 @@ type Plan struct {
// Schemas requires a client API version >=2.13.
//
// Schemas is a set of optional JSONSchemas that describe
-// the expected parameters for creation and update of instances and
+// schema associated with creation and update of instances and
// creation of bindings.
type Schemas struct {
+ // ServiceInstance hold schemas for operations on service instances.
ServiceInstance *ServiceInstanceSchema `json:"service_instance,omitempty"`
- ServiceBinding *ServiceBindingSchema `json:"service_binding,omitempty"`
+ // ServiceBinding holds schemas for operations on service bindings.
+ ServiceBinding *ServiceBindingSchema `json:"service_binding,omitempty"`
}
// ServiceInstanceSchema requires a client API version >=2.13.
@@ -108,15 +108,21 @@ type Schemas struct {
// ServiceInstanceSchema represents a plan's schemas for creation and
// update of an API resource.
type ServiceInstanceSchema struct {
+ // Create is the schema for the parameters accepted for provisioning an
+ // instance of a service.
Create *InputParametersSchema `json:"create,omitempty"`
+ // Update is the schema for the parameters accepted for updating an
+ // instance.
Update *InputParametersSchema `json:"update,omitempty"`
}
// ServiceBindingSchema requires a client API version >=2.13.
//
-// ServiceBindingSchema represents a plan's schemas for the parameters
-// accepted for binding creation.
+// ServiceBindingSchema represents a plan's schemas associated with bindings.
type ServiceBindingSchema struct {
+ // Create holds the schemas for the parameters accepted when a new binding
+ // is created and for the credentials returned when a new binding is
+ // created.
Create *RequestResponseSchema `json:"create,omitempty"`
}
@@ -130,7 +136,7 @@ type InputParametersSchema struct {
Parameters interface{} `json:"parameters,omitempty"`
}
-// RequestResponseSchema requires a client API version >=2.14.
+// RequestResponseSchema requires a client API version >=2.13.
//
// RequestResponseSchema contains a schema for input parameters for creation or
// update of an API resource, and a schema for the credentials returned by the
@@ -138,6 +144,9 @@ type InputParametersSchema struct {
type RequestResponseSchema struct {
InputParametersSchema
// The schema definition for the broker's response to the bind request.
+ // Response is an ALPHA API attribute and may change. Alpha features must be
+ // enabled and the client must be using the latest API Version in order to
+ // use this.
Response interface{} `json:"response,omitempty"`
}
@@ -158,9 +167,10 @@ type CatalogResponse struct {
Services []Service `json:"services"`
}
-// ProvisionRequest encompasses the request and body parameters
+// ProvisionRequest represents a request to provision a new instance of a
+// service and plan.
type ProvisionRequest struct {
- // InstanceID is the ID of the new instance to provision. The Open
+ // InstanceID is the ID of the new instance to provision. The Open
// Service Broker API specification recommends using a GUID for this
// field.
InstanceID string `json:"instance_id"`
@@ -175,10 +185,10 @@ type ProvisionRequest struct {
// PlanID is the ID of the plan to use for the new instance.
PlanID string `json:"plan_id"`
// OrganizationGUID is the platform GUID for the organization under which
- // the service is to be provisioned. CF-specific.
+ // the service is to be provisioned. CF-specific.
OrganizationGUID string `json:"organization_guid"`
// SpaceGUID is the identifier for the project space within the platform
- // organization. CF-specific.
+ // organization. CF-specific.
SpaceGUID string `json:"space_guid"`
// Parameters is a set of configuration options for the service instance.
// Optional.
@@ -188,11 +198,14 @@ type ProvisionRequest struct {
// Context is platform-specific contextual information under which the
// service instance is to be provisioned.
Context map[string]interface{} `json:"context,omitempty"`
- // OriginatingIdentity is the identity on the platform of the user making this request.
+ // OriginatingIdentity requires a client API version >= 2.13.
+ //
+ // OriginatingIdentity is the identity on the platform of the user making
+ // this request.
OriginatingIdentity *OriginatingIdentity `json:"originatingIdentity,omitempty"`
}
-// ProvisionResponse is sent in response to a provision call
+// ProvisionResponse is sent in response to a provision call.
type ProvisionResponse struct {
// Async indicates whether the broker is handling the provision request
// asynchronously.
@@ -253,45 +266,52 @@ type UpdateInstanceRequest struct {
InstanceID string `json:"instance_id"`
// AcceptsIncomplete indicates whether the client can accept asynchronous
// updating of an instance. If the broker cannot fulfill a request
- // synchronously and AcceptsIncomplete is set to false, the broker will reject
- // the request. A broker may choose to response to a request with
+ // synchronously and AcceptsIncomplete is set to false, the broker will
+ // reject the request. A broker may choose to response to a request with
// AcceptsIncomplete set to true either synchronously or asynchronously.
AcceptsIncomplete bool `json:"accepts_incomplete"`
// ServiceID is the ID of the service the instance is provisioned from.
ServiceID string `json:"service_id"`
- // PlanID is the ID the plan to update the instance to. The service must
- // support plan updates. If unspecified, indicates that the client does
- // not wish to update the plan of the instance.
+ // PlanID is the ID the plan to update the instance to. The service must
+ // support plan updates. If unspecified, indicates that the client does not
+ // wish to update the plan of the instance.
PlanID *string `json:"plan_id,omitempty"`
- // Parameters is a set of configuration options for the instance. If
+ // Parameters is a set of configuration options for the instance. If
// unset, indicates that the client does not wish to update the parameters
// for an instance.
Parameters map[string]interface{} `json:"parameters,omitempty"`
- // Previous values contains information about the service instance prior to the update.
+ // Previous values contains information about the service instance prior to
+ // the update.
PreviousValues *PreviousValues `json:"previous_values,omitempty"`
// Context requires a client API version >= 2.12.
//
// Context is platform-specific contextual information under which the
// service instance was created.
Context map[string]interface{} `json:"context,omitempty"`
- // OriginatingIdentity is the identity on the platform of the user making this request.
+ // OriginatingIdentity requires a client API version >= 2.13.
+ //
+ // OriginatingIdentity is the identity on the platform of the user making
+ // this request.
OriginatingIdentity *OriginatingIdentity `json:"originatingIdentity,omitempty"`
}
// PreviousValues represents information about the service instance prior to the update.
type PreviousValues struct {
- // ID of the plan prior to the update. If present, MUST be a non-empty string.
+ // ID of the plan prior to the update. If present, MUST be a non-empty
+ // string.
PlanID string `json:"plan_id,omitempty"`
- // Deprecated; determined to be unnecessary as the value is immutable. ID of the service
- // for the service instance. If present, MUST be a non-empty string.
+ // Deprecated; determined to be unnecessary as the value is immutable. ID of
+ // the service for the service instance. If present, MUST be a non-empty
+ // string.
ServiceID string `json:"service_id,omitempty"`
- // Deprecated; Organization for the service instance MUST be provided by platforms in the
- // top-level field context. ID of the organization specified for the service instance.
- // If present, MUST be a non-empty string.
+ // Deprecated; Organization for the service instance MUST be provided by
+ // platforms in the top-level field context. ID of the organization
+ // specified for the service instance. If present, MUST be a non-empty
+ // string.
OrgID string `json:"organization_id,omitempty"`
- // Deprecated; Space for the service instance MUST be provided by platforms in the top-level
- // field context. ID of the space specified for the service instance. If present, MUST be
- // a non-empty string.
+ // Deprecated; Space for the service instance MUST be provided by platforms
+ // in the top-level field context. ID of the space specified for the service
+ // instance. If present, MUST be a non-empty string.
SpaceID string `json:"space_id,omitempty"`
}
@@ -328,7 +348,10 @@ type DeprovisionRequest struct {
ServiceID string `json:"service_id"`
// PlanID is the ID of the plan the instance is provisioned from.
PlanID string `json:"plan_id"`
- // OriginatingIdentity is the identity on the platform of the user making this request.
+ // OriginatingIdentity requires a client API version >= 2.13.
+ //
+ // OriginatingIdentity is the identity on the platform of the user making
+ // this request.
OriginatingIdentity *OriginatingIdentity `json:"originatingIdentity,omitempty"`
}
@@ -354,11 +377,14 @@ type LastOperationRequest struct {
// PlanID is the ID of the plan the instance is provisioned from.
// Optional, but recommended.
PlanID *string `json:"plan_id,omitempty"`
- // OperationKey is the operation key provided by the broker in the
- // response to the initial request. Optional, but must be sent if
- // supplied in the response to the original request.
+ // OperationKey is the operation key provided by the broker in the response
+ // to the initial request. Optional, but must be sent if supplied in the
+ // response to the original request.
OperationKey *OperationKey `json:"operation,omitempty"`
- // OriginatingIdentity is the identity on the platform of the user making this request.
+ // OriginatingIdentity requires a client API version >= 2.13.
+ //
+ // OriginatingIdentity is the identity on the platform of the user making
+ // this request.
OriginatingIdentity *OriginatingIdentity `json:"originatingIdentity,omitempty"`
}
@@ -376,11 +402,14 @@ type BindingLastOperationRequest struct {
// PlanID is the ID of the plan the instance is provisioned from.
// Optional, but recommended.
PlanID *string `json:"plan_id,omitempty"`
- // OperationKey is the operation key provided by the broker in the
- // response to the initial request. Optional, but must be sent if
- // supplied in the response to the original request.
+ // OperationKey is the operation key provided by the broker in the response
+ // to the initial request. Optional, but must be sent if supplied in the
+ // response to the original request.
OperationKey *OperationKey `json:"operation,omitempty"`
- // OriginatingIdentity is the identity on the platform of the user making this request.
+ // OriginatingIdentity requires a client API version >= 2.13.
+ //
+ // OriginatingIdentity is the identity on the platform of the user making
+ // this request.
OriginatingIdentity *OriginatingIdentity `json:"originatingIdentity,omitempty"`
}
@@ -408,20 +437,20 @@ const (
// BindRequest represents a request to create a new binding to an instance of
// a service.
type BindRequest struct {
- // BindingID is the ID of the new binding to create. The Open Service
+ // BindingID is the ID of the new binding to create. The Open Service
// Broker API specification recommends using a GUID for this field.
BindingID string `json:"binding_id"`
// InstanceID is the ID of the instance to bind to.
InstanceID string `json:"instance_id"`
// AcceptsIncomplete is an ALPHA API attribute and may change. Alpha
- // features must be enabled and the client must be using the
- // latest API Version in order to use this.
+ // features must be enabled and the client must be using the latest API
+ // Version in order to use this.
//
// AcceptsIncomplete indicates whether the client can accept asynchronous
// binding. If the broker cannot fulfill a request synchronously and
- // AcceptsIncomplete is set to false, the broker will reject the request.
- // A broker may choose to response to a request with AcceptsIncomplete set
- // to true either synchronously or asynchronously.
+ // AcceptsIncomplete is set to false, the broker will reject the request. A
+ // broker may choose to response to a request with AcceptsIncomplete set to
+ // true either synchronously or asynchronously.
AcceptsIncomplete bool `json:"accepts_incomplete"`
// ServiceID is the ID of the service the instance was provisioned from.
ServiceID string `json:"service_id"`
@@ -429,17 +458,20 @@ type BindRequest struct {
PlanID string `json:"plan_id"`
// Deprecated; use bind_resource.app_guid to send this value instead.
AppGUID *string `json:"app_guid,omitempty"`
- // BindResource holds extra information about a binding. Optional, but
+ // BindResource holds extra information about a binding. Optional, but
// it's complicated. TODO: clarify
BindResource *BindResource `json:"bind_resource,omitempty"`
- // Parameters is configuration parameters for the binding. Optional.
+ // Parameters is configuration parameters for the binding. Optional.
Parameters map[string]interface{} `json:"parameters,omitempty"`
// Context requires a client API version >= 2.13.
//
// Context is platform-specific contextual information under which the
// service binding is to be created.
Context map[string]interface{} `json:"context,omitempty"`
- // OriginatingIdentity is the identity on the platform of the user making this request.
+ // OriginatingIdentity requires a client API version >= 2.13.
+ //
+ // OriginatingIdentity is the identity on the platform of the user making
+ // this request.
OriginatingIdentity *OriginatingIdentity `json:"originatingIdentity,omitempty"`
}
@@ -462,17 +494,17 @@ type BindResponse struct {
// Credentials is a free-form hash of credentials that can be used by
// applications or users to access the service.
Credentials map[string]interface{} `json:"credentials,omitempty"`
- // SyslogDrainURl is a URL to which logs must be streamed. CF-specific.
+ // SyslogDrainURl is a URL to which logs must be streamed. CF-specific.
// May only be supplied by a service that declares a requirement for the
// 'syslog_drain' permission.
SyslogDrainURL *string `json:"syslog_drain_url,omitempty"`
// RouteServiceURL is a URL to which the platform must proxy requests to
- // the application the binding is for. CF-specific. May only be supplied
+ // the application the binding is for. CF-specific. May only be supplied
// by a service that declares a requirement for the 'route_service'
// permission.
RouteServiceURL *string `json:"route_service_url,omitempty"`
// VolumeMounts is an array of configuration string for mounting volumes.
- // CF-specific. May only be supplied by a service that declares a
+ // CF-specific. May only be supplied by a service that declares a
// requirement for the 'volume_mount' permission.
VolumeMounts []interface{} `json:"volume_mounts,omitempty"`
// OperationKey is an ALPHA API attribute and may change. Alpha
@@ -491,35 +523,38 @@ type UnbindRequest struct {
// BindingID is the ID of the binding to delete.
BindingID string `json:"binding_id"`
// AcceptsIncomplete is an ALPHA API attribute and may change. Alpha
- // features must be enabled and the client must be using the
- // latest API Version in order to use this.
+ // features must be enabled and the client must be using the latest API
+ // Version in order to use this.
//
// AcceptsIncomplete indicates whether the client can accept asynchronous
// unbinding. If the broker cannot fulfill a request synchronously and
- // AcceptsIncomplete is set to false, the broker will reject the request.
- // A broker may choose to response to a request with AcceptsIncomplete set
- // to true either synchronously or asynchronously.
+ // AcceptsIncomplete is set to false, the broker will reject the request. A
+ // broker may choose to response to a request with AcceptsIncomplete set to
+ // true either synchronously or asynchronously.
AcceptsIncomplete bool `json:"accepts_incomplete"`
// ServiceID is the ID of the service the instance was provisioned from.
ServiceID string `json:"service_id"`
// PlanID is the ID of the plan the instance was provisioned from.
PlanID string `json:"plan_id"`
- // OriginatingIdentity is the identity on the platform of the user making this request.
+ // OriginatingIdentity requires a client API version >= 2.13.
+ //
+ // OriginatingIdentity is the identity on the platform of the user making
+ // this request.
OriginatingIdentity *OriginatingIdentity `json:"originatingIdentity,omitempty"`
}
// UnbindResponse represents a broker's response to an UnbindRequest.
type UnbindResponse struct {
- // Async is an ALPHA API attribute and may change. Alpha
- // features must be enabled and the client must be using the
- // latest API Version in order to use this.
+ // Async is an ALPHA API attribute and may change. Alpha features must be
+ // enabled and the client must be using the latest API Version in order to
+ // use this.
//
// Async indicates whether the broker is handling the unbind request
// asynchronously.
Async bool `json:"async"`
- // OperationKey is an ALPHA API attribute and may change. Alpha
- // features must be enabled and the client must be using the
- // latest API Version in order to use this.
+ // OperationKey is an ALPHA API attribute and may change. Alpha features
+ // must be enabled and the client must be using the latest API Version in
+ // order to use this.
//
// OperationKey is an extra identifier supplied by the broker to identify
// asynchronous operations.
@@ -540,17 +575,16 @@ type GetBindingResponse struct {
// Credentials is a free-form hash of credentials that can be used by
// applications or users to access the service.
Credentials map[string]interface{} `json:"credentials,omitempty"`
- // SyslogDrainURl is a URL to which logs must be streamed. CF-specific.
- // May only be supplied by a service that declares a requirement for the
+ // SyslogDrainURl is a URL to which logs must be streamed. CF-specific. May
+ // only be supplied by a service that declares a requirement for the
// 'syslog_drain' permission.
SyslogDrainURL *string `json:"syslog_drain_url,omitempty"`
- // RouteServiceURL is a URL to which the platform must proxy requests to
- // the application the binding is for. CF-specific. May only be supplied
- // by a service that declares a requirement for the 'route_service'
- // permission.
+ // RouteServiceURL is a URL to which the platform must proxy requests to the
+ // application the binding is for. CF-specific. May only be supplied by a
+ // service that declares a requirement for the 'route_service' permission.
RouteServiceURL *string `json:"route_service_url,omitempty"`
// VolumeMounts is an array of configuration string for mounting volumes.
- // CF-specific. May only be supplied by a service that declares a
+ // CF-specific. May only be supplied by a service that declares a
// requirement for the 'volume_mount' permission.
VolumeMounts []interface{} `json:"volume_mounts,omitempty"`
// Parameters is configuration parameters for the binding.
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/unbind.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/unbind.go
index 30a0998b..62e6a5ef 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/unbind.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/unbind.go
@@ -37,6 +37,11 @@ func (c *client) Unbind(r *UnbindRequest) (*UnbindResponse, error) {
return nil, err
}
+ defer func() {
+ drainReader(response.Body)
+ response.Body.Close()
+ }()
+
switch response.StatusCode {
case http.StatusOK, http.StatusGone:
userResponse := &UnbindResponse{}
diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/update_instance.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/update_instance.go
index 4863587e..280d6197 100644
--- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/update_instance.go
+++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/update_instance.go
@@ -46,6 +46,12 @@ func (c *client) UpdateInstance(r *UpdateInstanceRequest) (*UpdateInstanceRespon
if err != nil {
return nil, err
}
+
+ defer func() {
+ drainReader(response.Body)
+ response.Body.Close()
+ }()
+
switch response.StatusCode {
case http.StatusOK:
responseBodyObj := &updateInstanceResponseBody{}
diff --git a/vendor/github.com/prometheus/client_model/go/metrics.pb.go b/vendor/github.com/prometheus/client_model/go/metrics.pb.go
index b065f868..2f4930d9 100644
--- a/vendor/github.com/prometheus/client_model/go/metrics.pb.go
+++ b/vendor/github.com/prometheus/client_model/go/metrics.pb.go
@@ -1,34 +1,26 @@
-// Code generated by protoc-gen-go.
+// Code generated by protoc-gen-go. DO NOT EDIT.
// source: metrics.proto
-// DO NOT EDIT!
-
-/*
-Package io_prometheus_client is a generated protocol buffer package.
-
-It is generated from these files:
- metrics.proto
-
-It has these top-level messages:
- LabelPair
- Gauge
- Counter
- Quantile
- Summary
- Untyped
- Histogram
- Bucket
- Metric
- MetricFamily
-*/
+
package io_prometheus_client
-import proto "github.com/golang/protobuf/proto"
-import math "math"
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ timestamp "github.com/golang/protobuf/ptypes/timestamp"
+ math "math"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
+var _ = fmt.Errorf
var _ = math.Inf
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
type MetricType int32
const (
@@ -46,6 +38,7 @@ var MetricType_name = map[int32]string{
3: "UNTYPED",
4: "HISTOGRAM",
}
+
var MetricType_value = map[string]int32{
"COUNTER": 0,
"GAUGE": 1,
@@ -59,9 +52,11 @@ func (x MetricType) Enum() *MetricType {
*p = x
return p
}
+
func (x MetricType) String() string {
return proto.EnumName(MetricType_name, int32(x))
}
+
func (x *MetricType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(MetricType_value, data, "MetricType")
if err != nil {
@@ -71,15 +66,42 @@ func (x *MetricType) UnmarshalJSON(data []byte) error {
return nil
}
+func (MetricType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{0}
+}
+
type LabelPair struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *LabelPair) Reset() { *m = LabelPair{} }
func (m *LabelPair) String() string { return proto.CompactTextString(m) }
func (*LabelPair) ProtoMessage() {}
+func (*LabelPair) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{0}
+}
+
+func (m *LabelPair) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LabelPair.Unmarshal(m, b)
+}
+func (m *LabelPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LabelPair.Marshal(b, m, deterministic)
+}
+func (m *LabelPair) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LabelPair.Merge(m, src)
+}
+func (m *LabelPair) XXX_Size() int {
+ return xxx_messageInfo_LabelPair.Size(m)
+}
+func (m *LabelPair) XXX_DiscardUnknown() {
+ xxx_messageInfo_LabelPair.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LabelPair proto.InternalMessageInfo
func (m *LabelPair) GetName() string {
if m != nil && m.Name != nil {
@@ -96,13 +118,36 @@ func (m *LabelPair) GetValue() string {
}
type Gauge struct {
- Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Gauge) Reset() { *m = Gauge{} }
func (m *Gauge) String() string { return proto.CompactTextString(m) }
func (*Gauge) ProtoMessage() {}
+func (*Gauge) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{1}
+}
+
+func (m *Gauge) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Gauge.Unmarshal(m, b)
+}
+func (m *Gauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Gauge.Marshal(b, m, deterministic)
+}
+func (m *Gauge) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Gauge.Merge(m, src)
+}
+func (m *Gauge) XXX_Size() int {
+ return xxx_messageInfo_Gauge.Size(m)
+}
+func (m *Gauge) XXX_DiscardUnknown() {
+ xxx_messageInfo_Gauge.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Gauge proto.InternalMessageInfo
func (m *Gauge) GetValue() float64 {
if m != nil && m.Value != nil {
@@ -112,13 +157,37 @@ func (m *Gauge) GetValue() float64 {
}
type Counter struct {
- Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
+ Exemplar *Exemplar `protobuf:"bytes,2,opt,name=exemplar" json:"exemplar,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Counter) Reset() { *m = Counter{} }
func (m *Counter) String() string { return proto.CompactTextString(m) }
func (*Counter) ProtoMessage() {}
+func (*Counter) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{2}
+}
+
+func (m *Counter) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Counter.Unmarshal(m, b)
+}
+func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Counter.Marshal(b, m, deterministic)
+}
+func (m *Counter) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Counter.Merge(m, src)
+}
+func (m *Counter) XXX_Size() int {
+ return xxx_messageInfo_Counter.Size(m)
+}
+func (m *Counter) XXX_DiscardUnknown() {
+ xxx_messageInfo_Counter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Counter proto.InternalMessageInfo
func (m *Counter) GetValue() float64 {
if m != nil && m.Value != nil {
@@ -127,15 +196,45 @@ func (m *Counter) GetValue() float64 {
return 0
}
+func (m *Counter) GetExemplar() *Exemplar {
+ if m != nil {
+ return m.Exemplar
+ }
+ return nil
+}
+
type Quantile struct {
- Quantile *float64 `protobuf:"fixed64,1,opt,name=quantile" json:"quantile,omitempty"`
- Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Quantile *float64 `protobuf:"fixed64,1,opt,name=quantile" json:"quantile,omitempty"`
+ Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Quantile) Reset() { *m = Quantile{} }
func (m *Quantile) String() string { return proto.CompactTextString(m) }
func (*Quantile) ProtoMessage() {}
+func (*Quantile) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{3}
+}
+
+func (m *Quantile) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Quantile.Unmarshal(m, b)
+}
+func (m *Quantile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Quantile.Marshal(b, m, deterministic)
+}
+func (m *Quantile) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Quantile.Merge(m, src)
+}
+func (m *Quantile) XXX_Size() int {
+ return xxx_messageInfo_Quantile.Size(m)
+}
+func (m *Quantile) XXX_DiscardUnknown() {
+ xxx_messageInfo_Quantile.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Quantile proto.InternalMessageInfo
func (m *Quantile) GetQuantile() float64 {
if m != nil && m.Quantile != nil {
@@ -152,15 +251,38 @@ func (m *Quantile) GetValue() float64 {
}
type Summary struct {
- SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count" json:"sample_count,omitempty"`
- SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum" json:"sample_sum,omitempty"`
- Quantile []*Quantile `protobuf:"bytes,3,rep,name=quantile" json:"quantile,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount" json:"sample_count,omitempty"`
+ SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum" json:"sample_sum,omitempty"`
+ Quantile []*Quantile `protobuf:"bytes,3,rep,name=quantile" json:"quantile,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Summary) Reset() { *m = Summary{} }
func (m *Summary) String() string { return proto.CompactTextString(m) }
func (*Summary) ProtoMessage() {}
+func (*Summary) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{4}
+}
+
+func (m *Summary) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Summary.Unmarshal(m, b)
+}
+func (m *Summary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Summary.Marshal(b, m, deterministic)
+}
+func (m *Summary) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Summary.Merge(m, src)
+}
+func (m *Summary) XXX_Size() int {
+ return xxx_messageInfo_Summary.Size(m)
+}
+func (m *Summary) XXX_DiscardUnknown() {
+ xxx_messageInfo_Summary.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Summary proto.InternalMessageInfo
func (m *Summary) GetSampleCount() uint64 {
if m != nil && m.SampleCount != nil {
@@ -184,13 +306,36 @@ func (m *Summary) GetQuantile() []*Quantile {
}
type Untyped struct {
- Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Untyped) Reset() { *m = Untyped{} }
func (m *Untyped) String() string { return proto.CompactTextString(m) }
func (*Untyped) ProtoMessage() {}
+func (*Untyped) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{5}
+}
+
+func (m *Untyped) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Untyped.Unmarshal(m, b)
+}
+func (m *Untyped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Untyped.Marshal(b, m, deterministic)
+}
+func (m *Untyped) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Untyped.Merge(m, src)
+}
+func (m *Untyped) XXX_Size() int {
+ return xxx_messageInfo_Untyped.Size(m)
+}
+func (m *Untyped) XXX_DiscardUnknown() {
+ xxx_messageInfo_Untyped.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Untyped proto.InternalMessageInfo
func (m *Untyped) GetValue() float64 {
if m != nil && m.Value != nil {
@@ -200,15 +345,38 @@ func (m *Untyped) GetValue() float64 {
}
type Histogram struct {
- SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count" json:"sample_count,omitempty"`
- SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum" json:"sample_sum,omitempty"`
- Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket" json:"bucket,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount" json:"sample_count,omitempty"`
+ SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum" json:"sample_sum,omitempty"`
+ Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket" json:"bucket,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Histogram) Reset() { *m = Histogram{} }
func (m *Histogram) String() string { return proto.CompactTextString(m) }
func (*Histogram) ProtoMessage() {}
+func (*Histogram) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{6}
+}
+
+func (m *Histogram) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Histogram.Unmarshal(m, b)
+}
+func (m *Histogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Histogram.Marshal(b, m, deterministic)
+}
+func (m *Histogram) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Histogram.Merge(m, src)
+}
+func (m *Histogram) XXX_Size() int {
+ return xxx_messageInfo_Histogram.Size(m)
+}
+func (m *Histogram) XXX_DiscardUnknown() {
+ xxx_messageInfo_Histogram.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Histogram proto.InternalMessageInfo
func (m *Histogram) GetSampleCount() uint64 {
if m != nil && m.SampleCount != nil {
@@ -232,14 +400,38 @@ func (m *Histogram) GetBucket() []*Bucket {
}
type Bucket struct {
- CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count" json:"cumulative_count,omitempty"`
- UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound" json:"upper_bound,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count,json=cumulativeCount" json:"cumulative_count,omitempty"`
+ UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound,json=upperBound" json:"upper_bound,omitempty"`
+ Exemplar *Exemplar `protobuf:"bytes,3,opt,name=exemplar" json:"exemplar,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Bucket) Reset() { *m = Bucket{} }
func (m *Bucket) String() string { return proto.CompactTextString(m) }
func (*Bucket) ProtoMessage() {}
+func (*Bucket) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{7}
+}
+
+func (m *Bucket) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Bucket.Unmarshal(m, b)
+}
+func (m *Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Bucket.Marshal(b, m, deterministic)
+}
+func (m *Bucket) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Bucket.Merge(m, src)
+}
+func (m *Bucket) XXX_Size() int {
+ return xxx_messageInfo_Bucket.Size(m)
+}
+func (m *Bucket) XXX_DiscardUnknown() {
+ xxx_messageInfo_Bucket.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Bucket proto.InternalMessageInfo
func (m *Bucket) GetCumulativeCount() uint64 {
if m != nil && m.CumulativeCount != nil {
@@ -255,20 +447,105 @@ func (m *Bucket) GetUpperBound() float64 {
return 0
}
+func (m *Bucket) GetExemplar() *Exemplar {
+ if m != nil {
+ return m.Exemplar
+ }
+ return nil
+}
+
+type Exemplar struct {
+ Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"`
+ Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"`
+ Timestamp *timestamp.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Exemplar) Reset() { *m = Exemplar{} }
+func (m *Exemplar) String() string { return proto.CompactTextString(m) }
+func (*Exemplar) ProtoMessage() {}
+func (*Exemplar) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{8}
+}
+
+func (m *Exemplar) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Exemplar.Unmarshal(m, b)
+}
+func (m *Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Exemplar.Marshal(b, m, deterministic)
+}
+func (m *Exemplar) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Exemplar.Merge(m, src)
+}
+func (m *Exemplar) XXX_Size() int {
+ return xxx_messageInfo_Exemplar.Size(m)
+}
+func (m *Exemplar) XXX_DiscardUnknown() {
+ xxx_messageInfo_Exemplar.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Exemplar proto.InternalMessageInfo
+
+func (m *Exemplar) GetLabel() []*LabelPair {
+ if m != nil {
+ return m.Label
+ }
+ return nil
+}
+
+func (m *Exemplar) GetValue() float64 {
+ if m != nil && m.Value != nil {
+ return *m.Value
+ }
+ return 0
+}
+
+func (m *Exemplar) GetTimestamp() *timestamp.Timestamp {
+ if m != nil {
+ return m.Timestamp
+ }
+ return nil
+}
+
type Metric struct {
- Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"`
- Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"`
- Counter *Counter `protobuf:"bytes,3,opt,name=counter" json:"counter,omitempty"`
- Summary *Summary `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"`
- Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped" json:"untyped,omitempty"`
- Histogram *Histogram `protobuf:"bytes,7,opt,name=histogram" json:"histogram,omitempty"`
- TimestampMs *int64 `protobuf:"varint,6,opt,name=timestamp_ms" json:"timestamp_ms,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"`
+ Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"`
+ Counter *Counter `protobuf:"bytes,3,opt,name=counter" json:"counter,omitempty"`
+ Summary *Summary `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"`
+ Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped" json:"untyped,omitempty"`
+ Histogram *Histogram `protobuf:"bytes,7,opt,name=histogram" json:"histogram,omitempty"`
+ TimestampMs *int64 `protobuf:"varint,6,opt,name=timestamp_ms,json=timestampMs" json:"timestamp_ms,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Metric) Reset() { *m = Metric{} }
func (m *Metric) String() string { return proto.CompactTextString(m) }
func (*Metric) ProtoMessage() {}
+func (*Metric) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{9}
+}
+
+func (m *Metric) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Metric.Unmarshal(m, b)
+}
+func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Metric.Marshal(b, m, deterministic)
+}
+func (m *Metric) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Metric.Merge(m, src)
+}
+func (m *Metric) XXX_Size() int {
+ return xxx_messageInfo_Metric.Size(m)
+}
+func (m *Metric) XXX_DiscardUnknown() {
+ xxx_messageInfo_Metric.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Metric proto.InternalMessageInfo
func (m *Metric) GetLabel() []*LabelPair {
if m != nil {
@@ -320,16 +597,39 @@ func (m *Metric) GetTimestampMs() int64 {
}
type MetricFamily struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Help *string `protobuf:"bytes,2,opt,name=help" json:"help,omitempty"`
- Type *MetricType `protobuf:"varint,3,opt,name=type,enum=io.prometheus.client.MetricType" json:"type,omitempty"`
- Metric []*Metric `protobuf:"bytes,4,rep,name=metric" json:"metric,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ Help *string `protobuf:"bytes,2,opt,name=help" json:"help,omitempty"`
+ Type *MetricType `protobuf:"varint,3,opt,name=type,enum=io.prometheus.client.MetricType" json:"type,omitempty"`
+ Metric []*Metric `protobuf:"bytes,4,rep,name=metric" json:"metric,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *MetricFamily) Reset() { *m = MetricFamily{} }
func (m *MetricFamily) String() string { return proto.CompactTextString(m) }
func (*MetricFamily) ProtoMessage() {}
+func (*MetricFamily) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{10}
+}
+
+func (m *MetricFamily) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_MetricFamily.Unmarshal(m, b)
+}
+func (m *MetricFamily) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_MetricFamily.Marshal(b, m, deterministic)
+}
+func (m *MetricFamily) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MetricFamily.Merge(m, src)
+}
+func (m *MetricFamily) XXX_Size() int {
+ return xxx_messageInfo_MetricFamily.Size(m)
+}
+func (m *MetricFamily) XXX_DiscardUnknown() {
+ xxx_messageInfo_MetricFamily.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MetricFamily proto.InternalMessageInfo
func (m *MetricFamily) GetName() string {
if m != nil && m.Name != nil {
@@ -361,4 +661,63 @@ func (m *MetricFamily) GetMetric() []*Metric {
func init() {
proto.RegisterEnum("io.prometheus.client.MetricType", MetricType_name, MetricType_value)
+ proto.RegisterType((*LabelPair)(nil), "io.prometheus.client.LabelPair")
+ proto.RegisterType((*Gauge)(nil), "io.prometheus.client.Gauge")
+ proto.RegisterType((*Counter)(nil), "io.prometheus.client.Counter")
+ proto.RegisterType((*Quantile)(nil), "io.prometheus.client.Quantile")
+ proto.RegisterType((*Summary)(nil), "io.prometheus.client.Summary")
+ proto.RegisterType((*Untyped)(nil), "io.prometheus.client.Untyped")
+ proto.RegisterType((*Histogram)(nil), "io.prometheus.client.Histogram")
+ proto.RegisterType((*Bucket)(nil), "io.prometheus.client.Bucket")
+ proto.RegisterType((*Exemplar)(nil), "io.prometheus.client.Exemplar")
+ proto.RegisterType((*Metric)(nil), "io.prometheus.client.Metric")
+ proto.RegisterType((*MetricFamily)(nil), "io.prometheus.client.MetricFamily")
+}
+
+func init() { proto.RegisterFile("metrics.proto", fileDescriptor_6039342a2ba47b72) }
+
+var fileDescriptor_6039342a2ba47b72 = []byte{
+ // 665 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xd3, 0x4c,
+ 0x14, 0xfd, 0xdc, 0x38, 0x3f, 0xbe, 0x69, 0x3f, 0xa2, 0x51, 0x17, 0x56, 0xa1, 0x24, 0x78, 0x55,
+ 0x58, 0x38, 0xa2, 0x6a, 0x05, 0x2a, 0xb0, 0x68, 0x4b, 0x48, 0x91, 0x48, 0x5b, 0x26, 0xc9, 0xa2,
+ 0xb0, 0x88, 0x1c, 0x77, 0x70, 0x2c, 0x3c, 0xb1, 0xb1, 0x67, 0x2a, 0xb2, 0x66, 0xc1, 0x16, 0x5e,
+ 0x81, 0x17, 0x05, 0xcd, 0x8f, 0x6d, 0x2a, 0xb9, 0x95, 0x40, 0xec, 0x66, 0xee, 0x3d, 0xe7, 0xfa,
+ 0xcc, 0xf8, 0x9c, 0x81, 0x0d, 0x4a, 0x58, 0x1a, 0xfa, 0x99, 0x9b, 0xa4, 0x31, 0x8b, 0xd1, 0x66,
+ 0x18, 0x8b, 0x15, 0x25, 0x6c, 0x41, 0x78, 0xe6, 0xfa, 0x51, 0x48, 0x96, 0x6c, 0xab, 0x1b, 0xc4,
+ 0x71, 0x10, 0x91, 0xbe, 0xc4, 0xcc, 0xf9, 0x87, 0x3e, 0x0b, 0x29, 0xc9, 0x98, 0x47, 0x13, 0x45,
+ 0x73, 0xf6, 0xc1, 0x7a, 0xe3, 0xcd, 0x49, 0x74, 0xee, 0x85, 0x29, 0x42, 0x60, 0x2e, 0x3d, 0x4a,
+ 0x6c, 0xa3, 0x67, 0xec, 0x58, 0x58, 0xae, 0xd1, 0x26, 0xd4, 0xaf, 0xbc, 0x88, 0x13, 0x7b, 0x4d,
+ 0x16, 0xd5, 0xc6, 0xd9, 0x86, 0xfa, 0xd0, 0xe3, 0xc1, 0x6f, 0x6d, 0xc1, 0x31, 0xf2, 0xf6, 0x7b,
+ 0x68, 0x1e, 0xc7, 0x7c, 0xc9, 0x48, 0x5a, 0x0d, 0x40, 0x07, 0xd0, 0x22, 0x9f, 0x09, 0x4d, 0x22,
+ 0x2f, 0x95, 0x83, 0xdb, 0xbb, 0xf7, 0xdd, 0xaa, 0x03, 0xb8, 0x03, 0x8d, 0xc2, 0x05, 0xde, 0x79,
+ 0x0e, 0xad, 0xb7, 0xdc, 0x5b, 0xb2, 0x30, 0x22, 0x68, 0x0b, 0x5a, 0x9f, 0xf4, 0x5a, 0x7f, 0xa0,
+ 0xd8, 0x5f, 0x57, 0x5e, 0x48, 0xfb, 0x6a, 0x40, 0x73, 0xcc, 0x29, 0xf5, 0xd2, 0x15, 0x7a, 0x00,
+ 0xeb, 0x99, 0x47, 0x93, 0x88, 0xcc, 0x7c, 0xa1, 0x56, 0x4e, 0x30, 0x71, 0x5b, 0xd5, 0xe4, 0x01,
+ 0xd0, 0x36, 0x80, 0x86, 0x64, 0x9c, 0xea, 0x49, 0x96, 0xaa, 0x8c, 0x39, 0x15, 0xe7, 0x28, 0xbe,
+ 0x5f, 0xeb, 0xd5, 0x6e, 0x3e, 0x47, 0xae, 0xb8, 0xd4, 0xe7, 0x74, 0xa1, 0x39, 0x5d, 0xb2, 0x55,
+ 0x42, 0x2e, 0x6f, 0xb8, 0xc5, 0x2f, 0x06, 0x58, 0x27, 0x61, 0xc6, 0xe2, 0x20, 0xf5, 0xe8, 0x3f,
+ 0x10, 0xbb, 0x07, 0x8d, 0x39, 0xf7, 0x3f, 0x12, 0xa6, 0xa5, 0xde, 0xab, 0x96, 0x7a, 0x24, 0x31,
+ 0x58, 0x63, 0x9d, 0x6f, 0x06, 0x34, 0x54, 0x09, 0x3d, 0x84, 0x8e, 0xcf, 0x29, 0x8f, 0x3c, 0x16,
+ 0x5e, 0x5d, 0x97, 0x71, 0xa7, 0xac, 0x2b, 0x29, 0x5d, 0x68, 0xf3, 0x24, 0x21, 0xe9, 0x6c, 0x1e,
+ 0xf3, 0xe5, 0xa5, 0xd6, 0x02, 0xb2, 0x74, 0x24, 0x2a, 0xd7, 0x1c, 0x50, 0xfb, 0x43, 0x07, 0x7c,
+ 0x37, 0xa0, 0x95, 0x97, 0xd1, 0x3e, 0xd4, 0x23, 0xe1, 0x60, 0xdb, 0x90, 0x87, 0xea, 0x56, 0x4f,
+ 0x29, 0x4c, 0x8e, 0x15, 0xba, 0xda, 0x1d, 0xe8, 0x29, 0x58, 0x45, 0x42, 0xb4, 0xac, 0x2d, 0x57,
+ 0x65, 0xc8, 0xcd, 0x33, 0xe4, 0x4e, 0x72, 0x04, 0x2e, 0xc1, 0xce, 0xcf, 0x35, 0x68, 0x8c, 0x64,
+ 0x22, 0xff, 0x56, 0xd1, 0x63, 0xa8, 0x07, 0x22, 0x53, 0x3a, 0x10, 0x77, 0xab, 0x69, 0x32, 0x76,
+ 0x58, 0x21, 0xd1, 0x13, 0x68, 0xfa, 0x2a, 0x67, 0x5a, 0xec, 0x76, 0x35, 0x49, 0x87, 0x11, 0xe7,
+ 0x68, 0x41, 0xcc, 0x54, 0x08, 0x6c, 0xf3, 0x36, 0xa2, 0x4e, 0x0a, 0xce, 0xd1, 0x82, 0xc8, 0x95,
+ 0x69, 0xed, 0xfa, 0x6d, 0x44, 0xed, 0x6c, 0x9c, 0xa3, 0xd1, 0x0b, 0xb0, 0x16, 0xb9, 0x97, 0xed,
+ 0xa6, 0xa4, 0xde, 0x70, 0x31, 0x85, 0xe5, 0x71, 0xc9, 0x10, 0xee, 0x2f, 0xee, 0x7a, 0x46, 0x33,
+ 0xbb, 0xd1, 0x33, 0x76, 0x6a, 0xb8, 0x5d, 0xd4, 0x46, 0x99, 0xf3, 0xc3, 0x80, 0x75, 0xf5, 0x07,
+ 0x5e, 0x79, 0x34, 0x8c, 0x56, 0x95, 0xcf, 0x19, 0x02, 0x73, 0x41, 0xa2, 0x44, 0xbf, 0x66, 0x72,
+ 0x8d, 0xf6, 0xc0, 0x14, 0x1a, 0xe5, 0x15, 0xfe, 0xbf, 0xdb, 0xab, 0x56, 0xa5, 0x26, 0x4f, 0x56,
+ 0x09, 0xc1, 0x12, 0x2d, 0xd2, 0xa4, 0x5e, 0x60, 0xdb, 0xbc, 0x2d, 0x4d, 0x8a, 0x87, 0x35, 0xf6,
+ 0xd1, 0x08, 0xa0, 0x9c, 0x84, 0xda, 0xd0, 0x3c, 0x3e, 0x9b, 0x9e, 0x4e, 0x06, 0xb8, 0xf3, 0x1f,
+ 0xb2, 0xa0, 0x3e, 0x3c, 0x9c, 0x0e, 0x07, 0x1d, 0x43, 0xd4, 0xc7, 0xd3, 0xd1, 0xe8, 0x10, 0x5f,
+ 0x74, 0xd6, 0xc4, 0x66, 0x7a, 0x3a, 0xb9, 0x38, 0x1f, 0xbc, 0xec, 0xd4, 0xd0, 0x06, 0x58, 0x27,
+ 0xaf, 0xc7, 0x93, 0xb3, 0x21, 0x3e, 0x1c, 0x75, 0xcc, 0x23, 0x0c, 0x95, 0xef, 0xfe, 0xbb, 0x83,
+ 0x20, 0x64, 0x0b, 0x3e, 0x77, 0xfd, 0x98, 0xf6, 0xcb, 0x6e, 0x5f, 0x75, 0x67, 0x34, 0xbe, 0x24,
+ 0x51, 0x3f, 0x88, 0x9f, 0x85, 0xf1, 0xac, 0xec, 0xce, 0x54, 0xf7, 0x57, 0x00, 0x00, 0x00, 0xff,
+ 0xff, 0xd0, 0x84, 0x91, 0x73, 0x59, 0x06, 0x00, 0x00,
}
diff --git a/vendor/github.com/prometheus/client_model/ruby/LICENSE b/vendor/github.com/prometheus/client_model/ruby/LICENSE
deleted file mode 100644
index 11069edd..00000000
--- a/vendor/github.com/prometheus/client_model/ruby/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/vendor/github.com/prometheus/common/expfmt/encode.go b/vendor/github.com/prometheus/common/expfmt/encode.go
index 11839ed6..bd4e3474 100644
--- a/vendor/github.com/prometheus/common/expfmt/encode.go
+++ b/vendor/github.com/prometheus/common/expfmt/encode.go
@@ -30,17 +30,38 @@ type Encoder interface {
Encode(*dto.MetricFamily) error
}
-type encoder func(*dto.MetricFamily) error
+// Closer is implemented by Encoders that need to be closed to finalize
+// encoding. (For example, OpenMetrics needs a final `# EOF` line.)
+//
+// Note that all Encoder implementations returned from this package implement
+// Closer, too, even if the Close call is a no-op. This happens in preparation
+// for adding a Close method to the Encoder interface directly in a (mildly
+// breaking) release in the future.
+type Closer interface {
+ Close() error
+}
+
+type encoderCloser struct {
+ encode func(*dto.MetricFamily) error
+ close func() error
+}
-func (e encoder) Encode(v *dto.MetricFamily) error {
- return e(v)
+func (ec encoderCloser) Encode(v *dto.MetricFamily) error {
+ return ec.encode(v)
}
-// Negotiate returns the Content-Type based on the given Accept header.
-// If no appropriate accepted type is found, FmtText is returned.
+func (ec encoderCloser) Close() error {
+ return ec.close()
+}
+
+// Negotiate returns the Content-Type based on the given Accept header. If no
+// appropriate accepted type is found, FmtText is returned (which is the
+// Prometheus text format). This function will never negotiate FmtOpenMetrics,
+// as the support is still experimental. To include the option to negotiate
+// FmtOpenMetrics, use NegotiateOpenMetrics.
func Negotiate(h http.Header) Format {
for _, ac := range goautoneg.ParseAccept(h.Get(hdrAccept)) {
- // Check for protocol buffer
+ ver := ac.Params["version"]
if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol {
switch ac.Params["encoding"] {
case "delimited":
@@ -51,38 +72,91 @@ func Negotiate(h http.Header) Format {
return FmtProtoCompact
}
}
- // Check for text format.
+ if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") {
+ return FmtText
+ }
+ }
+ return FmtText
+}
+
+// NegotiateIncludingOpenMetrics works like Negotiate but includes
+// FmtOpenMetrics as an option for the result. Note that this function is
+// temporary and will disappear once FmtOpenMetrics is fully supported and as
+// such may be negotiated by the normal Negotiate function.
+func NegotiateIncludingOpenMetrics(h http.Header) Format {
+ for _, ac := range goautoneg.ParseAccept(h.Get(hdrAccept)) {
ver := ac.Params["version"]
+ if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol {
+ switch ac.Params["encoding"] {
+ case "delimited":
+ return FmtProtoDelim
+ case "text":
+ return FmtProtoText
+ case "compact-text":
+ return FmtProtoCompact
+ }
+ }
if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") {
return FmtText
}
+ if ac.Type+"/"+ac.SubType == OpenMetricsType && (ver == OpenMetricsVersion || ver == "") {
+ return FmtOpenMetrics
+ }
}
return FmtText
}
-// NewEncoder returns a new encoder based on content type negotiation.
+// NewEncoder returns a new encoder based on content type negotiation. All
+// Encoder implementations returned by NewEncoder also implement Closer, and
+// callers should always call the Close method. It is currently only required
+// for FmtOpenMetrics, but a future (breaking) release will add the Close method
+// to the Encoder interface directly. The current version of the Encoder
+// interface is kept for backwards compatibility.
func NewEncoder(w io.Writer, format Format) Encoder {
switch format {
case FmtProtoDelim:
- return encoder(func(v *dto.MetricFamily) error {
- _, err := pbutil.WriteDelimited(w, v)
- return err
- })
+ return encoderCloser{
+ encode: func(v *dto.MetricFamily) error {
+ _, err := pbutil.WriteDelimited(w, v)
+ return err
+ },
+ close: func() error { return nil },
+ }
case FmtProtoCompact:
- return encoder(func(v *dto.MetricFamily) error {
- _, err := fmt.Fprintln(w, v.String())
- return err
- })
+ return encoderCloser{
+ encode: func(v *dto.MetricFamily) error {
+ _, err := fmt.Fprintln(w, v.String())
+ return err
+ },
+ close: func() error { return nil },
+ }
case FmtProtoText:
- return encoder(func(v *dto.MetricFamily) error {
- _, err := fmt.Fprintln(w, proto.MarshalTextString(v))
- return err
- })
+ return encoderCloser{
+ encode: func(v *dto.MetricFamily) error {
+ _, err := fmt.Fprintln(w, proto.MarshalTextString(v))
+ return err
+ },
+ close: func() error { return nil },
+ }
case FmtText:
- return encoder(func(v *dto.MetricFamily) error {
- _, err := MetricFamilyToText(w, v)
- return err
- })
+ return encoderCloser{
+ encode: func(v *dto.MetricFamily) error {
+ _, err := MetricFamilyToText(w, v)
+ return err
+ },
+ close: func() error { return nil },
+ }
+ case FmtOpenMetrics:
+ return encoderCloser{
+ encode: func(v *dto.MetricFamily) error {
+ _, err := MetricFamilyToOpenMetrics(w, v)
+ return err
+ },
+ close: func() error {
+ _, err := FinalizeOpenMetrics(w)
+ return err
+ },
+ }
}
- panic("expfmt.NewEncoder: unknown format")
+ panic(fmt.Errorf("expfmt.NewEncoder: unknown format %q", format))
}
diff --git a/vendor/github.com/prometheus/common/expfmt/expfmt.go b/vendor/github.com/prometheus/common/expfmt/expfmt.go
index c71bcb98..0f176fa6 100644
--- a/vendor/github.com/prometheus/common/expfmt/expfmt.go
+++ b/vendor/github.com/prometheus/common/expfmt/expfmt.go
@@ -19,10 +19,12 @@ type Format string
// Constants to assemble the Content-Type values for the different wire protocols.
const (
- TextVersion = "0.0.4"
- ProtoType = `application/vnd.google.protobuf`
- ProtoProtocol = `io.prometheus.client.MetricFamily`
- ProtoFmt = ProtoType + "; proto=" + ProtoProtocol + ";"
+ TextVersion = "0.0.4"
+ ProtoType = `application/vnd.google.protobuf`
+ ProtoProtocol = `io.prometheus.client.MetricFamily`
+ ProtoFmt = ProtoType + "; proto=" + ProtoProtocol + ";"
+ OpenMetricsType = `application/openmetrics-text`
+ OpenMetricsVersion = "0.0.1"
// The Content-Type values for the different wire protocols.
FmtUnknown Format = ``
@@ -30,6 +32,7 @@ const (
FmtProtoDelim Format = ProtoFmt + ` encoding=delimited`
FmtProtoText Format = ProtoFmt + ` encoding=text`
FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text`
+ FmtOpenMetrics Format = OpenMetricsType + `; version=` + OpenMetricsVersion + `; charset=utf-8`
)
const (
diff --git a/vendor/github.com/prometheus/common/expfmt/text_create.go b/vendor/github.com/prometheus/common/expfmt/text_create.go
index f11321cd..5ba503b0 100644
--- a/vendor/github.com/prometheus/common/expfmt/text_create.go
+++ b/vendor/github.com/prometheus/common/expfmt/text_create.go
@@ -14,13 +14,45 @@
package expfmt
import (
+ "bufio"
"fmt"
"io"
+ "io/ioutil"
"math"
+ "strconv"
"strings"
+ "sync"
- dto "github.com/prometheus/client_model/go"
"github.com/prometheus/common/model"
+
+ dto "github.com/prometheus/client_model/go"
+)
+
+// enhancedWriter has all the enhanced write functions needed here. bufio.Writer
+// implements it.
+type enhancedWriter interface {
+ io.Writer
+ WriteRune(r rune) (n int, err error)
+ WriteString(s string) (n int, err error)
+ WriteByte(c byte) error
+}
+
+const (
+ initialNumBufSize = 24
+)
+
+var (
+ bufPool = sync.Pool{
+ New: func() interface{} {
+ return bufio.NewWriter(ioutil.Discard)
+ },
+ }
+ numBufPool = sync.Pool{
+ New: func() interface{} {
+ b := make([]byte, 0, initialNumBufSize)
+ return &b
+ },
+ }
)
// MetricFamilyToText converts a MetricFamily proto message into text format and
@@ -32,37 +64,90 @@ import (
// will result in invalid text format output.
//
// This method fulfills the type 'prometheus.encoder'.
-func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (int, error) {
- var written int
-
+func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err error) {
// Fail-fast checks.
if len(in.Metric) == 0 {
- return written, fmt.Errorf("MetricFamily has no metrics: %s", in)
+ return 0, fmt.Errorf("MetricFamily has no metrics: %s", in)
}
name := in.GetName()
if name == "" {
- return written, fmt.Errorf("MetricFamily has no name: %s", in)
+ return 0, fmt.Errorf("MetricFamily has no name: %s", in)
+ }
+
+ // Try the interface upgrade. If it doesn't work, we'll use a
+ // bufio.Writer from the sync.Pool.
+ w, ok := out.(enhancedWriter)
+ if !ok {
+ b := bufPool.Get().(*bufio.Writer)
+ b.Reset(out)
+ w = b
+ defer func() {
+ bErr := b.Flush()
+ if err == nil {
+ err = bErr
+ }
+ bufPool.Put(b)
+ }()
}
+ var n int
+
// Comments, first HELP, then TYPE.
if in.Help != nil {
- n, err := fmt.Fprintf(
- out, "# HELP %s %s\n",
- name, escapeString(*in.Help, false),
- )
+ n, err = w.WriteString("# HELP ")
written += n
if err != nil {
- return written, err
+ return
+ }
+ n, err = w.WriteString(name)
+ written += n
+ if err != nil {
+ return
+ }
+ err = w.WriteByte(' ')
+ written++
+ if err != nil {
+ return
}
+ n, err = writeEscapedString(w, *in.Help, false)
+ written += n
+ if err != nil {
+ return
+ }
+ err = w.WriteByte('\n')
+ written++
+ if err != nil {
+ return
+ }
+ }
+ n, err = w.WriteString("# TYPE ")
+ written += n
+ if err != nil {
+ return
+ }
+ n, err = w.WriteString(name)
+ written += n
+ if err != nil {
+ return
}
metricType := in.GetType()
- n, err := fmt.Fprintf(
- out, "# TYPE %s %s\n",
- name, strings.ToLower(metricType.String()),
- )
+ switch metricType {
+ case dto.MetricType_COUNTER:
+ n, err = w.WriteString(" counter\n")
+ case dto.MetricType_GAUGE:
+ n, err = w.WriteString(" gauge\n")
+ case dto.MetricType_SUMMARY:
+ n, err = w.WriteString(" summary\n")
+ case dto.MetricType_UNTYPED:
+ n, err = w.WriteString(" untyped\n")
+ case dto.MetricType_HISTOGRAM:
+ n, err = w.WriteString(" histogram\n")
+ default:
+ return written, fmt.Errorf("unknown metric type %s", metricType.String())
+ }
written += n
if err != nil {
- return written, err
+ return
}
// Finally the samples, one line for each.
@@ -75,9 +160,8 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (int, error) {
)
}
n, err = writeSample(
- name, metric, "", "",
+ w, name, "", metric, "", 0,
metric.Counter.GetValue(),
- out,
)
case dto.MetricType_GAUGE:
if metric.Gauge == nil {
@@ -86,9 +170,8 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (int, error) {
)
}
n, err = writeSample(
- name, metric, "", "",
+ w, name, "", metric, "", 0,
metric.Gauge.GetValue(),
- out,
)
case dto.MetricType_UNTYPED:
if metric.Untyped == nil {
@@ -97,9 +180,8 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (int, error) {
)
}
n, err = writeSample(
- name, metric, "", "",
+ w, name, "", metric, "", 0,
metric.Untyped.GetValue(),
- out,
)
case dto.MetricType_SUMMARY:
if metric.Summary == nil {
@@ -109,29 +191,26 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (int, error) {
}
for _, q := range metric.Summary.Quantile {
n, err = writeSample(
- name, metric,
- model.QuantileLabel, fmt.Sprint(q.GetQuantile()),
+ w, name, "", metric,
+ model.QuantileLabel, q.GetQuantile(),
q.GetValue(),
- out,
)
written += n
if err != nil {
- return written, err
+ return
}
}
n, err = writeSample(
- name+"_sum", metric, "", "",
+ w, name, "_sum", metric, "", 0,
metric.Summary.GetSampleSum(),
- out,
)
+ written += n
if err != nil {
- return written, err
+ return
}
- written += n
n, err = writeSample(
- name+"_count", metric, "", "",
+ w, name, "_count", metric, "", 0,
float64(metric.Summary.GetSampleCount()),
- out,
)
case dto.MetricType_HISTOGRAM:
if metric.Histogram == nil {
@@ -140,46 +219,42 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (int, error) {
)
}
infSeen := false
- for _, q := range metric.Histogram.Bucket {
+ for _, b := range metric.Histogram.Bucket {
n, err = writeSample(
- name+"_bucket", metric,
- model.BucketLabel, fmt.Sprint(q.GetUpperBound()),
- float64(q.GetCumulativeCount()),
- out,
+ w, name, "_bucket", metric,
+ model.BucketLabel, b.GetUpperBound(),
+ float64(b.GetCumulativeCount()),
)
written += n
if err != nil {
- return written, err
+ return
}
- if math.IsInf(q.GetUpperBound(), +1) {
+ if math.IsInf(b.GetUpperBound(), +1) {
infSeen = true
}
}
if !infSeen {
n, err = writeSample(
- name+"_bucket", metric,
- model.BucketLabel, "+Inf",
+ w, name, "_bucket", metric,
+ model.BucketLabel, math.Inf(+1),
float64(metric.Histogram.GetSampleCount()),
- out,
)
+ written += n
if err != nil {
- return written, err
+ return
}
- written += n
}
n, err = writeSample(
- name+"_sum", metric, "", "",
+ w, name, "_sum", metric, "", 0,
metric.Histogram.GetSampleSum(),
- out,
)
+ written += n
if err != nil {
- return written, err
+ return
}
- written += n
n, err = writeSample(
- name+"_count", metric, "", "",
+ w, name, "_count", metric, "", 0,
float64(metric.Histogram.GetSampleCount()),
- out,
)
default:
return written, fmt.Errorf(
@@ -188,116 +263,203 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (int, error) {
}
written += n
if err != nil {
- return written, err
+ return
}
}
- return written, nil
+ return
}
-// writeSample writes a single sample in text format to out, given the metric
+// writeSample writes a single sample in text format to w, given the metric
// name, the metric proto message itself, optionally an additional label name
-// and value (use empty strings if not required), and the value. The function
-// returns the number of bytes written and any error encountered.
+// with a float64 value (use empty string as label name if not required), and
+// the value. The function returns the number of bytes written and any error
+// encountered.
func writeSample(
- name string,
+ w enhancedWriter,
+ name, suffix string,
metric *dto.Metric,
- additionalLabelName, additionalLabelValue string,
+ additionalLabelName string, additionalLabelValue float64,
value float64,
- out io.Writer,
) (int, error) {
var written int
- n, err := fmt.Fprint(out, name)
+ n, err := w.WriteString(name)
written += n
if err != nil {
return written, err
}
- n, err = labelPairsToText(
- metric.Label,
- additionalLabelName, additionalLabelValue,
- out,
+ if suffix != "" {
+ n, err = w.WriteString(suffix)
+ written += n
+ if err != nil {
+ return written, err
+ }
+ }
+ n, err = writeLabelPairs(
+ w, metric.Label, additionalLabelName, additionalLabelValue,
)
written += n
if err != nil {
return written, err
}
- n, err = fmt.Fprintf(out, " %v", value)
+ err = w.WriteByte(' ')
+ written++
+ if err != nil {
+ return written, err
+ }
+ n, err = writeFloat(w, value)
written += n
if err != nil {
return written, err
}
if metric.TimestampMs != nil {
- n, err = fmt.Fprintf(out, " %v", *metric.TimestampMs)
+ err = w.WriteByte(' ')
+ written++
+ if err != nil {
+ return written, err
+ }
+ n, err = writeInt(w, *metric.TimestampMs)
written += n
if err != nil {
return written, err
}
}
- n, err = out.Write([]byte{'\n'})
- written += n
+ err = w.WriteByte('\n')
+ written++
if err != nil {
return written, err
}
return written, nil
}
-// labelPairsToText converts a slice of LabelPair proto messages plus the
+// writeLabelPairs converts a slice of LabelPair proto messages plus the
// explicitly given additional label pair into text formatted as required by the
-// text format and writes it to 'out'. An empty slice in combination with an
-// empty string 'additionalLabelName' results in nothing being
-// written. Otherwise, the label pairs are written, escaped as required by the
-// text format, and enclosed in '{...}'. The function returns the number of
-// bytes written and any error encountered.
-func labelPairsToText(
+// text format and writes it to 'w'. An empty slice in combination with an empty
+// string 'additionalLabelName' results in nothing being written. Otherwise, the
+// label pairs are written, escaped as required by the text format, and enclosed
+// in '{...}'. The function returns the number of bytes written and any error
+// encountered.
+func writeLabelPairs(
+ w enhancedWriter,
in []*dto.LabelPair,
- additionalLabelName, additionalLabelValue string,
- out io.Writer,
+ additionalLabelName string, additionalLabelValue float64,
) (int, error) {
if len(in) == 0 && additionalLabelName == "" {
return 0, nil
}
- var written int
- separator := '{'
+ var (
+ written int
+ separator byte = '{'
+ )
for _, lp := range in {
- n, err := fmt.Fprintf(
- out, `%c%s="%s"`,
- separator, lp.GetName(), escapeString(lp.GetValue(), true),
- )
+ err := w.WriteByte(separator)
+ written++
+ if err != nil {
+ return written, err
+ }
+ n, err := w.WriteString(lp.GetName())
+ written += n
+ if err != nil {
+ return written, err
+ }
+ n, err = w.WriteString(`="`)
+ written += n
+ if err != nil {
+ return written, err
+ }
+ n, err = writeEscapedString(w, lp.GetValue(), true)
written += n
if err != nil {
return written, err
}
+ err = w.WriteByte('"')
+ written++
+ if err != nil {
+ return written, err
+ }
separator = ','
}
if additionalLabelName != "" {
- n, err := fmt.Fprintf(
- out, `%c%s="%s"`,
- separator, additionalLabelName,
- escapeString(additionalLabelValue, true),
- )
+ err := w.WriteByte(separator)
+ written++
+ if err != nil {
+ return written, err
+ }
+ n, err := w.WriteString(additionalLabelName)
+ written += n
+ if err != nil {
+ return written, err
+ }
+ n, err = w.WriteString(`="`)
+ written += n
+ if err != nil {
+ return written, err
+ }
+ n, err = writeFloat(w, additionalLabelValue)
written += n
if err != nil {
return written, err
}
+ err = w.WriteByte('"')
+ written++
+ if err != nil {
+ return written, err
+ }
}
- n, err := out.Write([]byte{'}'})
- written += n
+ err := w.WriteByte('}')
+ written++
if err != nil {
return written, err
}
return written, nil
}
+// writeEscapedString replaces '\' by '\\', new line character by '\n', and - if
+// includeDoubleQuote is true - '"' by '\"'.
var (
- escape = strings.NewReplacer("\\", `\\`, "\n", `\n`)
- escapeWithDoubleQuote = strings.NewReplacer("\\", `\\`, "\n", `\n`, "\"", `\"`)
+ escaper = strings.NewReplacer("\\", `\\`, "\n", `\n`)
+ quotedEscaper = strings.NewReplacer("\\", `\\`, "\n", `\n`, "\"", `\"`)
)
-// escapeString replaces '\' by '\\', new line character by '\n', and - if
-// includeDoubleQuote is true - '"' by '\"'.
-func escapeString(v string, includeDoubleQuote bool) string {
+func writeEscapedString(w enhancedWriter, v string, includeDoubleQuote bool) (int, error) {
if includeDoubleQuote {
- return escapeWithDoubleQuote.Replace(v)
+ return quotedEscaper.WriteString(w, v)
+ }
+ return escaper.WriteString(w, v)
+}
+
+// writeFloat is equivalent to fmt.Fprint with a float64 argument but hardcodes
+// a few common cases for increased efficiency. For non-hardcoded cases, it uses
+// strconv.AppendFloat to avoid allocations, similar to writeInt.
+func writeFloat(w enhancedWriter, f float64) (int, error) {
+ switch {
+ case f == 1:
+ return 1, w.WriteByte('1')
+ case f == 0:
+ return 1, w.WriteByte('0')
+ case f == -1:
+ return w.WriteString("-1")
+ case math.IsNaN(f):
+ return w.WriteString("NaN")
+ case math.IsInf(f, +1):
+ return w.WriteString("+Inf")
+ case math.IsInf(f, -1):
+ return w.WriteString("-Inf")
+ default:
+ bp := numBufPool.Get().(*[]byte)
+ *bp = strconv.AppendFloat((*bp)[:0], f, 'g', -1, 64)
+ written, err := w.Write(*bp)
+ numBufPool.Put(bp)
+ return written, err
}
+}
- return escape.Replace(v)
+// writeInt is equivalent to fmt.Fprint with an int64 argument but uses
+// strconv.AppendInt with a byte slice taken from a sync.Pool to avoid
+// allocations.
+func writeInt(w enhancedWriter, i int64) (int, error) {
+ bp := numBufPool.Get().(*[]byte)
+ *bp = strconv.AppendInt((*bp)[:0], i, 10)
+ written, err := w.Write(*bp)
+ numBufPool.Put(bp)
+ return written, err
}
diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go
index b86290af..342e5940 100644
--- a/vendor/github.com/prometheus/common/expfmt/text_parse.go
+++ b/vendor/github.com/prometheus/common/expfmt/text_parse.go
@@ -325,7 +325,7 @@ func (p *TextParser) startLabelValue() stateFn {
// - Other labels have to be added to currentLabels for signature calculation.
if p.currentMF.GetType() == dto.MetricType_SUMMARY {
if p.currentLabelPair.GetName() == model.QuantileLabel {
- if p.currentQuantile, p.err = strconv.ParseFloat(p.currentLabelPair.GetValue(), 64); p.err != nil {
+ if p.currentQuantile, p.err = parseFloat(p.currentLabelPair.GetValue()); p.err != nil {
// Create a more helpful error message.
p.parseError(fmt.Sprintf("expected float as value for 'quantile' label, got %q", p.currentLabelPair.GetValue()))
return nil
@@ -337,7 +337,7 @@ func (p *TextParser) startLabelValue() stateFn {
// Similar special treatment of histograms.
if p.currentMF.GetType() == dto.MetricType_HISTOGRAM {
if p.currentLabelPair.GetName() == model.BucketLabel {
- if p.currentBucket, p.err = strconv.ParseFloat(p.currentLabelPair.GetValue(), 64); p.err != nil {
+ if p.currentBucket, p.err = parseFloat(p.currentLabelPair.GetValue()); p.err != nil {
// Create a more helpful error message.
p.parseError(fmt.Sprintf("expected float as value for 'le' label, got %q", p.currentLabelPair.GetValue()))
return nil
@@ -359,7 +359,7 @@ func (p *TextParser) startLabelValue() stateFn {
}
return p.readingValue
default:
- p.parseError(fmt.Sprintf("unexpected end of label value %q", p.currentLabelPair.Value))
+ p.parseError(fmt.Sprintf("unexpected end of label value %q", p.currentLabelPair.GetValue()))
return nil
}
}
@@ -392,7 +392,7 @@ func (p *TextParser) readingValue() stateFn {
if p.readTokenUntilWhitespace(); p.err != nil {
return nil // Unexpected end of input.
}
- value, err := strconv.ParseFloat(p.currentToken.String(), 64)
+ value, err := parseFloat(p.currentToken.String())
if err != nil {
// Create a more helpful error message.
p.parseError(fmt.Sprintf("expected float as value, got %q", p.currentToken.String()))
@@ -755,3 +755,10 @@ func histogramMetricName(name string) string {
return name
}
}
+
+func parseFloat(s string) (float64, error) {
+ if strings.ContainsAny(s, "pP_") {
+ return 0, fmt.Errorf("unsupported character in float")
+ }
+ return strconv.ParseFloat(s, 64)
+}
diff --git a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go
index 648b38cb..26e92288 100644
--- a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go
+++ b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go
@@ -1,12 +1,12 @@
/*
+Copyright (c) 2011, Open Knowledge Foundation Ltd.
+All rights reserved.
+
HTTP Content-Type Autonegotiation.
The functions in this package implement the behaviour specified in
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
-Copyright (c) 2011, Open Knowledge Foundation Ltd.
-All rights reserved.
-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
diff --git a/vendor/github.com/prometheus/common/model/metric.go b/vendor/github.com/prometheus/common/model/metric.go
index f7250909..00804b7f 100644
--- a/vendor/github.com/prometheus/common/model/metric.go
+++ b/vendor/github.com/prometheus/common/model/metric.go
@@ -21,7 +21,6 @@ import (
)
var (
- separator = []byte{0}
// MetricNameRE is a regular expression matching valid metric
// names. Note that the IsValidMetricName function performs the same
// check but faster than a match with this regular expression.
diff --git a/vendor/github.com/prometheus/common/model/time.go b/vendor/github.com/prometheus/common/model/time.go
index 74ed5a9f..490a0240 100644
--- a/vendor/github.com/prometheus/common/model/time.go
+++ b/vendor/github.com/prometheus/common/model/time.go
@@ -43,7 +43,7 @@ const (
// (1970-01-01 00:00 UTC) excluding leap seconds.
type Time int64
-// Interval describes and interval between two timestamps.
+// Interval describes an interval between two timestamps.
type Interval struct {
Start, End Time
}
@@ -150,7 +150,13 @@ func (t *Time) UnmarshalJSON(b []byte) error {
return err
}
- *t = Time(v + va)
+ // If the value was something like -0.1 the negative is lost in the
+ // parsing because of the leading zero, this ensures that we capture it.
+ if len(p[0]) > 0 && p[0][0] == '-' && v+va > 0 {
+ *t = Time(v+va) * -1
+ } else {
+ *t = Time(v + va)
+ }
default:
return fmt.Errorf("invalid time %q", string(b))
@@ -180,6 +186,10 @@ var durationRE = regexp.MustCompile("^([0-9]+)(y|w|d|h|m|s|ms)$")
// ParseDuration parses a string into a time.Duration, assuming that a year
// always has 365d, a week always has 7d, and a day always has 24h.
func ParseDuration(durationStr string) (Duration, error) {
+ // Allow 0 without a unit.
+ if durationStr == "0" {
+ return 0, nil
+ }
matches := durationRE.FindStringSubmatch(durationStr)
if len(matches) != 3 {
return 0, fmt.Errorf("not a valid duration string: %q", durationStr)
diff --git a/vendor/github.com/prometheus/procfs/buddyinfo.go b/vendor/github.com/prometheus/procfs/buddyinfo.go
index d3a82680..10bd067a 100644
--- a/vendor/github.com/prometheus/procfs/buddyinfo.go
+++ b/vendor/github.com/prometheus/procfs/buddyinfo.go
@@ -31,19 +31,9 @@ type BuddyInfo struct {
Sizes []float64
}
-// NewBuddyInfo reads the buddyinfo statistics.
-func NewBuddyInfo() ([]BuddyInfo, error) {
- fs, err := NewFS(DefaultMountPoint)
- if err != nil {
- return nil, err
- }
-
- return fs.NewBuddyInfo()
-}
-
-// NewBuddyInfo reads the buddyinfo statistics from the specified `proc` filesystem.
-func (fs FS) NewBuddyInfo() ([]BuddyInfo, error) {
- file, err := os.Open(fs.Path("buddyinfo"))
+// BuddyInfo reads the buddyinfo statistics from the specified `proc` filesystem.
+func (fs FS) BuddyInfo() ([]BuddyInfo, error) {
+ file, err := os.Open(fs.proc.Path("buddyinfo"))
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/prometheus/procfs/fs.go b/vendor/github.com/prometheus/procfs/fs.go
index b6c6b2ce..0102ab0f 100644
--- a/vendor/github.com/prometheus/procfs/fs.go
+++ b/vendor/github.com/prometheus/procfs/fs.go
@@ -14,69 +14,30 @@
package procfs
import (
- "fmt"
- "os"
- "path"
-
- "github.com/prometheus/procfs/nfs"
- "github.com/prometheus/procfs/xfs"
+ "github.com/prometheus/procfs/internal/fs"
)
-// FS represents the pseudo-filesystem proc, which provides an interface to
+// FS represents the pseudo-filesystem sys, which provides an interface to
// kernel data structures.
-type FS string
-
-// DefaultMountPoint is the common mount point of the proc filesystem.
-const DefaultMountPoint = "/proc"
-
-// NewFS returns a new FS mounted under the given mountPoint. It will error
-// if the mount point can't be read.
-func NewFS(mountPoint string) (FS, error) {
- info, err := os.Stat(mountPoint)
- if err != nil {
- return "", fmt.Errorf("could not read %s: %s", mountPoint, err)
- }
- if !info.IsDir() {
- return "", fmt.Errorf("mount point %s is not a directory", mountPoint)
- }
-
- return FS(mountPoint), nil
-}
-
-// Path returns the path of the given subsystem relative to the procfs root.
-func (fs FS) Path(p ...string) string {
- return path.Join(append([]string{string(fs)}, p...)...)
+type FS struct {
+ proc fs.FS
}
-// XFSStats retrieves XFS filesystem runtime statistics.
-func (fs FS) XFSStats() (*xfs.Stats, error) {
- f, err := os.Open(fs.Path("fs/xfs/stat"))
- if err != nil {
- return nil, err
- }
- defer f.Close()
-
- return xfs.ParseStats(f)
-}
-
-// NFSClientRPCStats retrieves NFS client RPC statistics.
-func (fs FS) NFSClientRPCStats() (*nfs.ClientRPCStats, error) {
- f, err := os.Open(fs.Path("net/rpc/nfs"))
- if err != nil {
- return nil, err
- }
- defer f.Close()
+// DefaultMountPoint is the common mount point of the proc filesystem.
+const DefaultMountPoint = fs.DefaultProcMountPoint
- return nfs.ParseClientRPCStats(f)
+// NewDefaultFS returns a new proc FS mounted under the default proc mountPoint.
+// It will error if the mount point directory can't be read or is a file.
+func NewDefaultFS() (FS, error) {
+ return NewFS(DefaultMountPoint)
}
-// NFSdServerRPCStats retrieves NFS daemon RPC statistics.
-func (fs FS) NFSdServerRPCStats() (*nfs.ServerRPCStats, error) {
- f, err := os.Open(fs.Path("net/rpc/nfsd"))
+// NewFS returns a new proc FS mounted under the given proc mountPoint. It will error
+// if the mount point directory can't be read or is a file.
+func NewFS(mountPoint string) (FS, error) {
+ fs, err := fs.NewFS(mountPoint)
if err != nil {
- return nil, err
+ return FS{}, err
}
- defer f.Close()
-
- return nfs.ParseServerRPCStats(f)
+ return FS{fs}, nil
}
diff --git a/vendor/github.com/prometheus/procfs/internal/util/parse.go b/vendor/github.com/prometheus/procfs/internal/util/parse.go
index 1ad21c91..22cb07a6 100644
--- a/vendor/github.com/prometheus/procfs/internal/util/parse.go
+++ b/vendor/github.com/prometheus/procfs/internal/util/parse.go
@@ -13,7 +13,11 @@
package util
-import "strconv"
+import (
+ "io/ioutil"
+ "strconv"
+ "strings"
+)
// ParseUint32s parses a slice of strings into a slice of uint32s.
func ParseUint32s(ss []string) ([]uint32, error) {
@@ -44,3 +48,50 @@ func ParseUint64s(ss []string) ([]uint64, error) {
return us, nil
}
+
+// ParsePInt64s parses a slice of strings into a slice of int64 pointers.
+func ParsePInt64s(ss []string) ([]*int64, error) {
+ us := make([]*int64, 0, len(ss))
+ for _, s := range ss {
+ u, err := strconv.ParseInt(s, 10, 64)
+ if err != nil {
+ return nil, err
+ }
+
+ us = append(us, &u)
+ }
+
+ return us, nil
+}
+
+// ReadUintFromFile reads a file and attempts to parse a uint64 from it.
+func ReadUintFromFile(path string) (uint64, error) {
+ data, err := ioutil.ReadFile(path)
+ if err != nil {
+ return 0, err
+ }
+ return strconv.ParseUint(strings.TrimSpace(string(data)), 10, 64)
+}
+
+// ReadIntFromFile reads a file and attempts to parse a int64 from it.
+func ReadIntFromFile(path string) (int64, error) {
+ data, err := ioutil.ReadFile(path)
+ if err != nil {
+ return 0, err
+ }
+ return strconv.ParseInt(strings.TrimSpace(string(data)), 10, 64)
+}
+
+// ParseBool parses a string into a boolean pointer.
+func ParseBool(b string) *bool {
+ var truth bool
+ switch b {
+ case "enabled":
+ truth = true
+ case "disabled":
+ truth = false
+ default:
+ return nil
+ }
+ return &truth
+}
diff --git a/vendor/github.com/prometheus/procfs/ipvs.go b/vendor/github.com/prometheus/procfs/ipvs.go
index e36d4a3b..89e44774 100644
--- a/vendor/github.com/prometheus/procfs/ipvs.go
+++ b/vendor/github.com/prometheus/procfs/ipvs.go
@@ -15,6 +15,7 @@ package procfs
import (
"bufio"
+ "bytes"
"encoding/hex"
"errors"
"fmt"
@@ -24,6 +25,8 @@ import (
"os"
"strconv"
"strings"
+
+ "github.com/prometheus/procfs/internal/util"
)
// IPVSStats holds IPVS statistics, as exposed by the kernel in `/proc/net/ip_vs_stats`.
@@ -62,29 +65,18 @@ type IPVSBackendStatus struct {
Weight uint64
}
-// NewIPVSStats reads the IPVS statistics.
-func NewIPVSStats() (IPVSStats, error) {
- fs, err := NewFS(DefaultMountPoint)
+// IPVSStats reads the IPVS statistics from the specified `proc` filesystem.
+func (fs FS) IPVSStats() (IPVSStats, error) {
+ data, err := util.ReadFileNoStat(fs.proc.Path("net/ip_vs_stats"))
if err != nil {
return IPVSStats{}, err
}
- return fs.NewIPVSStats()
-}
-
-// NewIPVSStats reads the IPVS statistics from the specified `proc` filesystem.
-func (fs FS) NewIPVSStats() (IPVSStats, error) {
- file, err := os.Open(fs.Path("net/ip_vs_stats"))
- if err != nil {
- return IPVSStats{}, err
- }
- defer file.Close()
-
- return parseIPVSStats(file)
+ return parseIPVSStats(bytes.NewReader(data))
}
// parseIPVSStats performs the actual parsing of `ip_vs_stats`.
-func parseIPVSStats(file io.Reader) (IPVSStats, error) {
+func parseIPVSStats(r io.Reader) (IPVSStats, error) {
var (
statContent []byte
statLines []string
@@ -92,7 +84,7 @@ func parseIPVSStats(file io.Reader) (IPVSStats, error) {
stats IPVSStats
)
- statContent, err := ioutil.ReadAll(file)
+ statContent, err := ioutil.ReadAll(r)
if err != nil {
return IPVSStats{}, err
}
@@ -131,19 +123,9 @@ func parseIPVSStats(file io.Reader) (IPVSStats, error) {
return stats, nil
}
-// NewIPVSBackendStatus reads and returns the status of all (virtual,real) server pairs.
-func NewIPVSBackendStatus() ([]IPVSBackendStatus, error) {
- fs, err := NewFS(DefaultMountPoint)
- if err != nil {
- return []IPVSBackendStatus{}, err
- }
-
- return fs.NewIPVSBackendStatus()
-}
-
-// NewIPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem.
-func (fs FS) NewIPVSBackendStatus() ([]IPVSBackendStatus, error) {
- file, err := os.Open(fs.Path("net/ip_vs"))
+// IPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem.
+func (fs FS) IPVSBackendStatus() ([]IPVSBackendStatus, error) {
+ file, err := os.Open(fs.proc.Path("net/ip_vs"))
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/prometheus/procfs/mdstat.go b/vendor/github.com/prometheus/procfs/mdstat.go
index 9dc19583..3e9362a9 100644
--- a/vendor/github.com/prometheus/procfs/mdstat.go
+++ b/vendor/github.com/prometheus/procfs/mdstat.go
@@ -22,8 +22,8 @@ import (
)
var (
- statuslineRE = regexp.MustCompile(`(\d+) blocks .*\[(\d+)/(\d+)\] \[[U_]+\]`)
- buildlineRE = regexp.MustCompile(`\((\d+)/\d+\)`)
+ statusLineRE = regexp.MustCompile(`(\d+) blocks .*\[(\d+)/(\d+)\] \[[U_]+\]`)
+ recoveryLineRE = regexp.MustCompile(`\((\d+)/\d+\)`)
)
// MDStat holds info parsed from /proc/mdstat.
@@ -34,117 +34,160 @@ type MDStat struct {
ActivityState string
// Number of active disks.
DisksActive int64
- // Total number of disks the device consists of.
+ // Total number of disks the device requires.
DisksTotal int64
+ // Number of failed disks.
+ DisksFailed int64
+ // Spare disks in the device.
+ DisksSpare int64
// Number of blocks the device holds.
BlocksTotal int64
// Number of blocks on the device that are in sync.
BlocksSynced int64
}
-// ParseMDStat parses an mdstat-file and returns a struct with the relevant infos.
-func (fs FS) ParseMDStat() (mdstates []MDStat, err error) {
- mdStatusFilePath := fs.Path("mdstat")
- content, err := ioutil.ReadFile(mdStatusFilePath)
+// MDStat parses an mdstat-file (/proc/mdstat) and returns a slice of
+// structs containing the relevant info. More information available here:
+// https://raid.wiki.kernel.org/index.php/Mdstat
+func (fs FS) MDStat() ([]MDStat, error) {
+ data, err := ioutil.ReadFile(fs.proc.Path("mdstat"))
if err != nil {
- return []MDStat{}, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err)
+ return nil, err
}
+ mdstat, err := parseMDStat(data)
+ if err != nil {
+ return nil, fmt.Errorf("error parsing mdstat %s: %s", fs.proc.Path("mdstat"), err)
+ }
+ return mdstat, nil
+}
- mdStates := []MDStat{}
- lines := strings.Split(string(content), "\n")
- for i, l := range lines {
- if l == "" {
- continue
- }
- if l[0] == ' ' {
- continue
- }
- if strings.HasPrefix(l, "Personalities") || strings.HasPrefix(l, "unused") {
+// parseMDStat parses data from mdstat file (/proc/mdstat) and returns a slice of
+// structs containing the relevant info.
+func parseMDStat(mdStatData []byte) ([]MDStat, error) {
+ mdStats := []MDStat{}
+ lines := strings.Split(string(mdStatData), "\n")
+
+ for i, line := range lines {
+ if strings.TrimSpace(line) == "" || line[0] == ' ' ||
+ strings.HasPrefix(line, "Personalities") ||
+ strings.HasPrefix(line, "unused") {
continue
}
- mainLine := strings.Split(l, " ")
- if len(mainLine) < 3 {
- return mdStates, fmt.Errorf("error parsing mdline: %s", l)
+ deviceFields := strings.Fields(line)
+ if len(deviceFields) < 3 {
+ return nil, fmt.Errorf("not enough fields in mdline (expected at least 3): %s", line)
}
- mdName := mainLine[0]
- activityState := mainLine[2]
+ mdName := deviceFields[0] // mdx
+ state := deviceFields[2] // active or inactive
if len(lines) <= i+3 {
- return mdStates, fmt.Errorf(
- "error parsing %s: too few lines for md device %s",
- mdStatusFilePath,
+ return nil, fmt.Errorf(
+ "error parsing %s: too few lines for md device",
mdName,
)
}
- active, total, size, err := evalStatusline(lines[i+1])
+ // Failed disks have the suffix (F) & Spare disks have the suffix (S).
+ fail := int64(strings.Count(line, "(F)"))
+ spare := int64(strings.Count(line, "(S)"))
+ active, total, size, err := evalStatusLine(lines[i], lines[i+1])
+
if err != nil {
- return mdStates, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err)
+ return nil, fmt.Errorf("error parsing md device lines: %s", err)
}
- // j is the line number of the syncing-line.
- j := i + 2
+ syncLineIdx := i + 2
if strings.Contains(lines[i+2], "bitmap") { // skip bitmap line
- j = i + 3
+ syncLineIdx++
}
// If device is syncing at the moment, get the number of currently
// synced bytes, otherwise that number equals the size of the device.
syncedBlocks := size
- if strings.Contains(lines[j], "recovery") || strings.Contains(lines[j], "resync") {
- syncedBlocks, err = evalBuildline(lines[j])
- if err != nil {
- return mdStates, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err)
+ recovering := strings.Contains(lines[syncLineIdx], "recovery")
+ resyncing := strings.Contains(lines[syncLineIdx], "resync")
+
+ // Append recovery and resyncing state info.
+ if recovering || resyncing {
+ if recovering {
+ state = "recovering"
+ } else {
+ state = "resyncing"
+ }
+
+ // Handle case when resync=PENDING or resync=DELAYED.
+ if strings.Contains(lines[syncLineIdx], "PENDING") ||
+ strings.Contains(lines[syncLineIdx], "DELAYED") {
+ syncedBlocks = 0
+ } else {
+ syncedBlocks, err = evalRecoveryLine(lines[syncLineIdx])
+ if err != nil {
+ return nil, fmt.Errorf("error parsing sync line in md device %s: %s", mdName, err)
+ }
}
}
- mdStates = append(mdStates, MDStat{
+ mdStats = append(mdStats, MDStat{
Name: mdName,
- ActivityState: activityState,
+ ActivityState: state,
DisksActive: active,
+ DisksFailed: fail,
+ DisksSpare: spare,
DisksTotal: total,
BlocksTotal: size,
BlocksSynced: syncedBlocks,
})
}
- return mdStates, nil
+ return mdStats, nil
}
-func evalStatusline(statusline string) (active, total, size int64, err error) {
- matches := statuslineRE.FindStringSubmatch(statusline)
- if len(matches) != 4 {
- return 0, 0, 0, fmt.Errorf("unexpected statusline: %s", statusline)
- }
+func evalStatusLine(deviceLine, statusLine string) (active, total, size int64, err error) {
- size, err = strconv.ParseInt(matches[1], 10, 64)
+ sizeStr := strings.Fields(statusLine)[0]
+ size, err = strconv.ParseInt(sizeStr, 10, 64)
if err != nil {
- return 0, 0, 0, fmt.Errorf("unexpected statusline %s: %s", statusline, err)
+ return 0, 0, 0, fmt.Errorf("unexpected statusLine %s: %s", statusLine, err)
+ }
+
+ if strings.Contains(deviceLine, "raid0") || strings.Contains(deviceLine, "linear") {
+ // In the device deviceLine, only disks have a number associated with them in [].
+ total = int64(strings.Count(deviceLine, "["))
+ return total, total, size, nil
+ }
+
+ if strings.Contains(deviceLine, "inactive") {
+ return 0, 0, size, nil
+ }
+
+ matches := statusLineRE.FindStringSubmatch(statusLine)
+ if len(matches) != 4 {
+ return 0, 0, 0, fmt.Errorf("couldn't find all the substring matches: %s", statusLine)
}
total, err = strconv.ParseInt(matches[2], 10, 64)
if err != nil {
- return 0, 0, 0, fmt.Errorf("unexpected statusline %s: %s", statusline, err)
+ return 0, 0, 0, fmt.Errorf("unexpected statusLine %s: %s", statusLine, err)
}
active, err = strconv.ParseInt(matches[3], 10, 64)
if err != nil {
- return 0, 0, 0, fmt.Errorf("unexpected statusline %s: %s", statusline, err)
+ return 0, 0, 0, fmt.Errorf("unexpected statusLine %s: %s", statusLine, err)
}
return active, total, size, nil
}
-func evalBuildline(buildline string) (syncedBlocks int64, err error) {
- matches := buildlineRE.FindStringSubmatch(buildline)
+func evalRecoveryLine(recoveryLine string) (syncedBlocks int64, err error) {
+ matches := recoveryLineRE.FindStringSubmatch(recoveryLine)
if len(matches) != 2 {
- return 0, fmt.Errorf("unexpected buildline: %s", buildline)
+ return 0, fmt.Errorf("unexpected recoveryLine: %s", recoveryLine)
}
syncedBlocks, err = strconv.ParseInt(matches[1], 10, 64)
if err != nil {
- return 0, fmt.Errorf("%s in buildline: %s", err, buildline)
+ return 0, fmt.Errorf("%s in recoveryLine: %s", err, recoveryLine)
}
return syncedBlocks, nil
diff --git a/vendor/github.com/prometheus/procfs/mountstats.go b/vendor/github.com/prometheus/procfs/mountstats.go
index e95ddbc6..861ced9d 100644
--- a/vendor/github.com/prometheus/procfs/mountstats.go
+++ b/vendor/github.com/prometheus/procfs/mountstats.go
@@ -39,8 +39,11 @@ const (
statVersion10 = "1.0"
statVersion11 = "1.1"
- fieldTransport10Len = 10
- fieldTransport11Len = 13
+ fieldTransport10TCPLen = 10
+ fieldTransport10UDPLen = 7
+
+ fieldTransport11TCPLen = 13
+ fieldTransport11UDPLen = 10
)
// A Mount is a device mount parsed from /proc/[pid]/mountstats.
@@ -66,6 +69,8 @@ type MountStats interface {
type MountStatsNFS struct {
// The version of statistics provided.
StatVersion string
+ // The mount options of the NFS mount.
+ Opts map[string]string
// The age of the NFS mount.
Age time.Duration
// Statistics related to byte counters for various operations.
@@ -176,16 +181,20 @@ type NFSOperationStats struct {
// Number of bytes received for this operation, including RPC headers and payload.
BytesReceived uint64
// Duration all requests spent queued for transmission before they were sent.
- CumulativeQueueTime time.Duration
+ CumulativeQueueMilliseconds uint64
// Duration it took to get a reply back after the request was transmitted.
- CumulativeTotalResponseTime time.Duration
+ CumulativeTotalResponseMilliseconds uint64
// Duration from when a request was enqueued to when it was completely handled.
- CumulativeTotalRequestTime time.Duration
+ CumulativeTotalRequestMilliseconds uint64
+ // The count of operations that complete with tk_status < 0. These statuses usually indicate error conditions.
+ Errors uint64
}
// A NFSTransportStats contains statistics for the NFS mount RPC requests and
// responses.
type NFSTransportStats struct {
+ // The transport protocol used for the NFS mount.
+ Protocol string
// The local port used for the NFS mount.
Port uint64
// Number of times the client has had to establish a connection from scratch
@@ -197,7 +206,7 @@ type NFSTransportStats struct {
// spent waiting for connections to the server to be established.
ConnectIdleTime uint64
// Duration since the NFS mount last saw any RPC traffic.
- IdleTime time.Duration
+ IdleTimeSeconds uint64
// Number of RPC requests for this mount sent to the NFS server.
Sends uint64
// Number of RPC responses for this mount received from the NFS server.
@@ -312,6 +321,7 @@ func parseMount(ss []string) (*Mount, error) {
func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, error) {
// Field indicators for parsing specific types of data
const (
+ fieldOpts = "opts:"
fieldAge = "age:"
fieldBytes = "bytes:"
fieldEvents = "events:"
@@ -333,6 +343,18 @@ func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, e
}
switch ss[0] {
+ case fieldOpts:
+ if stats.Opts == nil {
+ stats.Opts = map[string]string{}
+ }
+ for _, opt := range strings.Split(ss[1], ",") {
+ split := strings.Split(opt, "=")
+ if len(split) == 2 {
+ stats.Opts[split[0]] = split[1]
+ } else {
+ stats.Opts[opt] = ""
+ }
+ }
case fieldAge:
// Age integer is in seconds
d, err := time.ParseDuration(ss[1] + "s")
@@ -360,7 +382,7 @@ func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, e
return nil, fmt.Errorf("not enough information for NFS transport stats: %v", ss)
}
- tstats, err := parseNFSTransportStats(ss[2:], statVersion)
+ tstats, err := parseNFSTransportStats(ss[1:], statVersion)
if err != nil {
return nil, err
}
@@ -474,8 +496,8 @@ func parseNFSEventsStats(ss []string) (*NFSEventsStats, error) {
// line is reached.
func parseNFSOperationStats(s *bufio.Scanner) ([]NFSOperationStats, error) {
const (
- // Number of expected fields in each per-operation statistics set
- numFields = 9
+ // Minimum number of expected fields in each per-operation statistics set
+ minFields = 9
)
var ops []NFSOperationStats
@@ -488,12 +510,12 @@ func parseNFSOperationStats(s *bufio.Scanner) ([]NFSOperationStats, error) {
break
}
- if len(ss) != numFields {
+ if len(ss) < minFields {
return nil, fmt.Errorf("invalid NFS per-operations stats: %v", ss)
}
// Skip string operation name for integers
- ns := make([]uint64, 0, numFields-1)
+ ns := make([]uint64, 0, minFields-1)
for _, st := range ss[1:] {
n, err := strconv.ParseUint(st, 10, 64)
if err != nil {
@@ -503,17 +525,23 @@ func parseNFSOperationStats(s *bufio.Scanner) ([]NFSOperationStats, error) {
ns = append(ns, n)
}
- ops = append(ops, NFSOperationStats{
- Operation: strings.TrimSuffix(ss[0], ":"),
- Requests: ns[0],
- Transmissions: ns[1],
- MajorTimeouts: ns[2],
- BytesSent: ns[3],
- BytesReceived: ns[4],
- CumulativeQueueTime: time.Duration(ns[5]) * time.Millisecond,
- CumulativeTotalResponseTime: time.Duration(ns[6]) * time.Millisecond,
- CumulativeTotalRequestTime: time.Duration(ns[7]) * time.Millisecond,
- })
+ opStats := NFSOperationStats{
+ Operation: strings.TrimSuffix(ss[0], ":"),
+ Requests: ns[0],
+ Transmissions: ns[1],
+ MajorTimeouts: ns[2],
+ BytesSent: ns[3],
+ BytesReceived: ns[4],
+ CumulativeQueueMilliseconds: ns[5],
+ CumulativeTotalResponseMilliseconds: ns[6],
+ CumulativeTotalRequestMilliseconds: ns[7],
+ }
+
+ if len(ns) > 8 {
+ opStats.Errors = ns[8]
+ }
+
+ ops = append(ops, opStats)
}
return ops, s.Err()
@@ -522,13 +550,33 @@ func parseNFSOperationStats(s *bufio.Scanner) ([]NFSOperationStats, error) {
// parseNFSTransportStats parses a NFSTransportStats line using an input set of
// integer fields matched to a specific stats version.
func parseNFSTransportStats(ss []string, statVersion string) (*NFSTransportStats, error) {
+ // Extract the protocol field. It is the only string value in the line
+ protocol := ss[0]
+ ss = ss[1:]
+
switch statVersion {
case statVersion10:
- if len(ss) != fieldTransport10Len {
+ var expectedLength int
+ if protocol == "tcp" {
+ expectedLength = fieldTransport10TCPLen
+ } else if protocol == "udp" {
+ expectedLength = fieldTransport10UDPLen
+ } else {
+ return nil, fmt.Errorf("invalid NFS protocol \"%s\" in stats 1.0 statement: %v", protocol, ss)
+ }
+ if len(ss) != expectedLength {
return nil, fmt.Errorf("invalid NFS transport stats 1.0 statement: %v", ss)
}
case statVersion11:
- if len(ss) != fieldTransport11Len {
+ var expectedLength int
+ if protocol == "tcp" {
+ expectedLength = fieldTransport11TCPLen
+ } else if protocol == "udp" {
+ expectedLength = fieldTransport11UDPLen
+ } else {
+ return nil, fmt.Errorf("invalid NFS protocol \"%s\" in stats 1.1 statement: %v", protocol, ss)
+ }
+ if len(ss) != expectedLength {
return nil, fmt.Errorf("invalid NFS transport stats 1.1 statement: %v", ss)
}
default:
@@ -536,12 +584,13 @@ func parseNFSTransportStats(ss []string, statVersion string) (*NFSTransportStats
}
// Allocate enough for v1.1 stats since zero value for v1.1 stats will be okay
- // in a v1.0 response.
+ // in a v1.0 response. Since the stat length is bigger for TCP stats, we use
+ // the TCP length here.
//
// Note: slice length must be set to length of v1.1 stats to avoid a panic when
// only v1.0 stats are present.
// See: https://github.com/prometheus/node_exporter/issues/571.
- ns := make([]uint64, fieldTransport11Len)
+ ns := make([]uint64, fieldTransport11TCPLen)
for i, s := range ss {
n, err := strconv.ParseUint(s, 10, 64)
if err != nil {
@@ -551,12 +600,23 @@ func parseNFSTransportStats(ss []string, statVersion string) (*NFSTransportStats
ns[i] = n
}
+ // The fields differ depending on the transport protocol (TCP or UDP)
+ // From https://utcc.utoronto.ca/%7Ecks/space/blog/linux/NFSMountstatsXprt
+ //
+ // For the udp RPC transport there is no connection count, connect idle time,
+ // or idle time (fields #3, #4, and #5); all other fields are the same. So
+ // we set them to 0 here.
+ if protocol == "udp" {
+ ns = append(ns[:2], append(make([]uint64, 3), ns[2:]...)...)
+ }
+
return &NFSTransportStats{
+ Protocol: protocol,
Port: ns[0],
Bind: ns[1],
Connect: ns[2],
ConnectIdleTime: ns[3],
- IdleTime: time.Duration(ns[4]) * time.Second,
+ IdleTimeSeconds: ns[4],
Sends: ns[5],
Receives: ns[6],
BadTransactionIDs: ns[7],
diff --git a/vendor/github.com/prometheus/procfs/net_dev.go b/vendor/github.com/prometheus/procfs/net_dev.go
index 3f252337..47a710be 100644
--- a/vendor/github.com/prometheus/procfs/net_dev.go
+++ b/vendor/github.com/prometheus/procfs/net_dev.go
@@ -47,23 +47,13 @@ type NetDevLine struct {
// are interface names.
type NetDev map[string]NetDevLine
-// NewNetDev returns kernel/system statistics read from /proc/net/dev.
-func NewNetDev() (NetDev, error) {
- fs, err := NewFS(DefaultMountPoint)
- if err != nil {
- return nil, err
- }
-
- return fs.NewNetDev()
+// NetDev returns kernel/system statistics read from /proc/net/dev.
+func (fs FS) NetDev() (NetDev, error) {
+ return newNetDev(fs.proc.Path("net/dev"))
}
-// NewNetDev returns kernel/system statistics read from /proc/net/dev.
-func (fs FS) NewNetDev() (NetDev, error) {
- return newNetDev(fs.Path("net/dev"))
-}
-
-// NewNetDev returns kernel/system statistics read from /proc/[pid]/net/dev.
-func (p Proc) NewNetDev() (NetDev, error) {
+// NetDev returns kernel/system statistics read from /proc/[pid]/net/dev.
+func (p Proc) NetDev() (NetDev, error) {
return newNetDev(p.path("net/dev"))
}
@@ -75,7 +65,7 @@ func newNetDev(file string) (NetDev, error) {
}
defer f.Close()
- nd := NetDev{}
+ netDev := NetDev{}
s := bufio.NewScanner(f)
for n := 0; s.Scan(); n++ {
// Skip the 2 header lines.
@@ -83,20 +73,20 @@ func newNetDev(file string) (NetDev, error) {
continue
}
- line, err := nd.parseLine(s.Text())
+ line, err := netDev.parseLine(s.Text())
if err != nil {
- return nd, err
+ return netDev, err
}
- nd[line.Name] = *line
+ netDev[line.Name] = *line
}
- return nd, s.Err()
+ return netDev, s.Err()
}
// parseLine parses a single line from the /proc/net/dev file. Header lines
// must be filtered prior to calling this method.
-func (nd NetDev) parseLine(rawLine string) (*NetDevLine, error) {
+func (netDev NetDev) parseLine(rawLine string) (*NetDevLine, error) {
parts := strings.SplitN(rawLine, ":", 2)
if len(parts) != 2 {
return nil, errors.New("invalid net/dev line, missing colon")
@@ -185,15 +175,14 @@ func (nd NetDev) parseLine(rawLine string) (*NetDevLine, error) {
// Total aggregates the values across interfaces and returns a new NetDevLine.
// The Name field will be a sorted comma separated list of interface names.
-func (nd NetDev) Total() NetDevLine {
+func (netDev NetDev) Total() NetDevLine {
total := NetDevLine{}
- names := make([]string, 0, len(nd))
- for _, ifc := range nd {
+ names := make([]string, 0, len(netDev))
+ for _, ifc := range netDev {
names = append(names, ifc.Name)
total.RxBytes += ifc.RxBytes
total.RxPackets += ifc.RxPackets
- total.RxPackets += ifc.RxPackets
total.RxErrors += ifc.RxErrors
total.RxDropped += ifc.RxDropped
total.RxFIFO += ifc.RxFIFO
diff --git a/vendor/github.com/prometheus/procfs/nfs/nfs.go b/vendor/github.com/prometheus/procfs/nfs/nfs.go
deleted file mode 100644
index 651bf681..00000000
--- a/vendor/github.com/prometheus/procfs/nfs/nfs.go
+++ /dev/null
@@ -1,263 +0,0 @@
-// Copyright 2018 The Prometheus Authors
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Package nfs implements parsing of /proc/net/rpc/nfsd.
-// Fields are documented in https://www.svennd.be/nfsd-stats-explained-procnetrpcnfsd/
-package nfs
-
-// ReplyCache models the "rc" line.
-type ReplyCache struct {
- Hits uint64
- Misses uint64
- NoCache uint64
-}
-
-// FileHandles models the "fh" line.
-type FileHandles struct {
- Stale uint64
- TotalLookups uint64
- AnonLookups uint64
- DirNoCache uint64
- NoDirNoCache uint64
-}
-
-// InputOutput models the "io" line.
-type InputOutput struct {
- Read uint64
- Write uint64
-}
-
-// Threads models the "th" line.
-type Threads struct {
- Threads uint64
- FullCnt uint64
-}
-
-// ReadAheadCache models the "ra" line.
-type ReadAheadCache struct {
- CacheSize uint64
- CacheHistogram []uint64
- NotFound uint64
-}
-
-// Network models the "net" line.
-type Network struct {
- NetCount uint64
- UDPCount uint64
- TCPCount uint64
- TCPConnect uint64
-}
-
-// ClientRPC models the nfs "rpc" line.
-type ClientRPC struct {
- RPCCount uint64
- Retransmissions uint64
- AuthRefreshes uint64
-}
-
-// ServerRPC models the nfsd "rpc" line.
-type ServerRPC struct {
- RPCCount uint64
- BadCnt uint64
- BadFmt uint64
- BadAuth uint64
- BadcInt uint64
-}
-
-// V2Stats models the "proc2" line.
-type V2Stats struct {
- Null uint64
- GetAttr uint64
- SetAttr uint64
- Root uint64
- Lookup uint64
- ReadLink uint64
- Read uint64
- WrCache uint64
- Write uint64
- Create uint64
- Remove uint64
- Rename uint64
- Link uint64
- SymLink uint64
- MkDir uint64
- RmDir uint64
- ReadDir uint64
- FsStat uint64
-}
-
-// V3Stats models the "proc3" line.
-type V3Stats struct {
- Null uint64
- GetAttr uint64
- SetAttr uint64
- Lookup uint64
- Access uint64
- ReadLink uint64
- Read uint64
- Write uint64
- Create uint64
- MkDir uint64
- SymLink uint64
- MkNod uint64
- Remove uint64
- RmDir uint64
- Rename uint64
- Link uint64
- ReadDir uint64
- ReadDirPlus uint64
- FsStat uint64
- FsInfo uint64
- PathConf uint64
- Commit uint64
-}
-
-// ClientV4Stats models the nfs "proc4" line.
-type ClientV4Stats struct {
- Null uint64
- Read uint64
- Write uint64
- Commit uint64
- Open uint64
- OpenConfirm uint64
- OpenNoattr uint64
- OpenDowngrade uint64
- Close uint64
- Setattr uint64
- FsInfo uint64
- Renew uint64
- SetClientID uint64
- SetClientIDConfirm uint64
- Lock uint64
- Lockt uint64
- Locku uint64
- Access uint64
- Getattr uint64
- Lookup uint64
- LookupRoot uint64
- Remove uint64
- Rename uint64
- Link uint64
- Symlink uint64
- Create uint64
- Pathconf uint64
- StatFs uint64
- ReadLink uint64
- ReadDir uint64
- ServerCaps uint64
- DelegReturn uint64
- GetACL uint64
- SetACL uint64
- FsLocations uint64
- ReleaseLockowner uint64
- Secinfo uint64
- FsidPresent uint64
- ExchangeID uint64
- CreateSession uint64
- DestroySession uint64
- Sequence uint64
- GetLeaseTime uint64
- ReclaimComplete uint64
- LayoutGet uint64
- GetDeviceInfo uint64
- LayoutCommit uint64
- LayoutReturn uint64
- SecinfoNoName uint64
- TestStateID uint64
- FreeStateID uint64
- GetDeviceList uint64
- BindConnToSession uint64
- DestroyClientID uint64
- Seek uint64
- Allocate uint64
- DeAllocate uint64
- LayoutStats uint64
- Clone uint64
-}
-
-// ServerV4Stats models the nfsd "proc4" line.
-type ServerV4Stats struct {
- Null uint64
- Compound uint64
-}
-
-// V4Ops models the "proc4ops" line: NFSv4 operations
-// Variable list, see:
-// v4.0 https://tools.ietf.org/html/rfc3010 (38 operations)
-// v4.1 https://tools.ietf.org/html/rfc5661 (58 operations)
-// v4.2 https://tools.ietf.org/html/draft-ietf-nfsv4-minorversion2-41 (71 operations)
-type V4Ops struct {
- //Values uint64 // Variable depending on v4.x sub-version. TODO: Will this always at least include the fields in this struct?
- Op0Unused uint64
- Op1Unused uint64
- Op2Future uint64
- Access uint64
- Close uint64
- Commit uint64
- Create uint64
- DelegPurge uint64
- DelegReturn uint64
- GetAttr uint64
- GetFH uint64
- Link uint64
- Lock uint64
- Lockt uint64
- Locku uint64
- Lookup uint64
- LookupRoot uint64
- Nverify uint64
- Open uint64
- OpenAttr uint64
- OpenConfirm uint64
- OpenDgrd uint64
- PutFH uint64
- PutPubFH uint64
- PutRootFH uint64
- Read uint64
- ReadDir uint64
- ReadLink uint64
- Remove uint64
- Rename uint64
- Renew uint64
- RestoreFH uint64
- SaveFH uint64
- SecInfo uint64
- SetAttr uint64
- Verify uint64
- Write uint64
- RelLockOwner uint64
-}
-
-// ClientRPCStats models all stats from /proc/net/rpc/nfs.
-type ClientRPCStats struct {
- Network Network
- ClientRPC ClientRPC
- V2Stats V2Stats
- V3Stats V3Stats
- ClientV4Stats ClientV4Stats
-}
-
-// ServerRPCStats models all stats from /proc/net/rpc/nfsd.
-type ServerRPCStats struct {
- ReplyCache ReplyCache
- FileHandles FileHandles
- InputOutput InputOutput
- Threads Threads
- ReadAheadCache ReadAheadCache
- Network Network
- ServerRPC ServerRPC
- V2Stats V2Stats
- V3Stats V3Stats
- ServerV4Stats ServerV4Stats
- V4Ops V4Ops
-}
diff --git a/vendor/github.com/prometheus/procfs/nfs/parse.go b/vendor/github.com/prometheus/procfs/nfs/parse.go
deleted file mode 100644
index 95a83cc5..00000000
--- a/vendor/github.com/prometheus/procfs/nfs/parse.go
+++ /dev/null
@@ -1,317 +0,0 @@
-// Copyright 2018 The Prometheus Authors
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package nfs
-
-import (
- "fmt"
-)
-
-func parseReplyCache(v []uint64) (ReplyCache, error) {
- if len(v) != 3 {
- return ReplyCache{}, fmt.Errorf("invalid ReplyCache line %q", v)
- }
-
- return ReplyCache{
- Hits: v[0],
- Misses: v[1],
- NoCache: v[2],
- }, nil
-}
-
-func parseFileHandles(v []uint64) (FileHandles, error) {
- if len(v) != 5 {
- return FileHandles{}, fmt.Errorf("invalid FileHandles, line %q", v)
- }
-
- return FileHandles{
- Stale: v[0],
- TotalLookups: v[1],
- AnonLookups: v[2],
- DirNoCache: v[3],
- NoDirNoCache: v[4],
- }, nil
-}
-
-func parseInputOutput(v []uint64) (InputOutput, error) {
- if len(v) != 2 {
- return InputOutput{}, fmt.Errorf("invalid InputOutput line %q", v)
- }
-
- return InputOutput{
- Read: v[0],
- Write: v[1],
- }, nil
-}
-
-func parseThreads(v []uint64) (Threads, error) {
- if len(v) != 2 {
- return Threads{}, fmt.Errorf("invalid Threads line %q", v)
- }
-
- return Threads{
- Threads: v[0],
- FullCnt: v[1],
- }, nil
-}
-
-func parseReadAheadCache(v []uint64) (ReadAheadCache, error) {
- if len(v) != 12 {
- return ReadAheadCache{}, fmt.Errorf("invalid ReadAheadCache line %q", v)
- }
-
- return ReadAheadCache{
- CacheSize: v[0],
- CacheHistogram: v[1:11],
- NotFound: v[11],
- }, nil
-}
-
-func parseNetwork(v []uint64) (Network, error) {
- if len(v) != 4 {
- return Network{}, fmt.Errorf("invalid Network line %q", v)
- }
-
- return Network{
- NetCount: v[0],
- UDPCount: v[1],
- TCPCount: v[2],
- TCPConnect: v[3],
- }, nil
-}
-
-func parseServerRPC(v []uint64) (ServerRPC, error) {
- if len(v) != 5 {
- return ServerRPC{}, fmt.Errorf("invalid RPC line %q", v)
- }
-
- return ServerRPC{
- RPCCount: v[0],
- BadCnt: v[1],
- BadFmt: v[2],
- BadAuth: v[3],
- BadcInt: v[4],
- }, nil
-}
-
-func parseClientRPC(v []uint64) (ClientRPC, error) {
- if len(v) != 3 {
- return ClientRPC{}, fmt.Errorf("invalid RPC line %q", v)
- }
-
- return ClientRPC{
- RPCCount: v[0],
- Retransmissions: v[1],
- AuthRefreshes: v[2],
- }, nil
-}
-
-func parseV2Stats(v []uint64) (V2Stats, error) {
- values := int(v[0])
- if len(v[1:]) != values || values != 18 {
- return V2Stats{}, fmt.Errorf("invalid V2Stats line %q", v)
- }
-
- return V2Stats{
- Null: v[1],
- GetAttr: v[2],
- SetAttr: v[3],
- Root: v[4],
- Lookup: v[5],
- ReadLink: v[6],
- Read: v[7],
- WrCache: v[8],
- Write: v[9],
- Create: v[10],
- Remove: v[11],
- Rename: v[12],
- Link: v[13],
- SymLink: v[14],
- MkDir: v[15],
- RmDir: v[16],
- ReadDir: v[17],
- FsStat: v[18],
- }, nil
-}
-
-func parseV3Stats(v []uint64) (V3Stats, error) {
- values := int(v[0])
- if len(v[1:]) != values || values != 22 {
- return V3Stats{}, fmt.Errorf("invalid V3Stats line %q", v)
- }
-
- return V3Stats{
- Null: v[1],
- GetAttr: v[2],
- SetAttr: v[3],
- Lookup: v[4],
- Access: v[5],
- ReadLink: v[6],
- Read: v[7],
- Write: v[8],
- Create: v[9],
- MkDir: v[10],
- SymLink: v[11],
- MkNod: v[12],
- Remove: v[13],
- RmDir: v[14],
- Rename: v[15],
- Link: v[16],
- ReadDir: v[17],
- ReadDirPlus: v[18],
- FsStat: v[19],
- FsInfo: v[20],
- PathConf: v[21],
- Commit: v[22],
- }, nil
-}
-
-func parseClientV4Stats(v []uint64) (ClientV4Stats, error) {
- values := int(v[0])
- if len(v[1:]) != values {
- return ClientV4Stats{}, fmt.Errorf("invalid ClientV4Stats line %q", v)
- }
-
- // This function currently supports mapping 59 NFS v4 client stats. Older
- // kernels may emit fewer stats, so we must detect this and pad out the
- // values to match the expected slice size.
- if values < 59 {
- newValues := make([]uint64, 60)
- copy(newValues, v)
- v = newValues
- }
-
- return ClientV4Stats{
- Null: v[1],
- Read: v[2],
- Write: v[3],
- Commit: v[4],
- Open: v[5],
- OpenConfirm: v[6],
- OpenNoattr: v[7],
- OpenDowngrade: v[8],
- Close: v[9],
- Setattr: v[10],
- FsInfo: v[11],
- Renew: v[12],
- SetClientID: v[13],
- SetClientIDConfirm: v[14],
- Lock: v[15],
- Lockt: v[16],
- Locku: v[17],
- Access: v[18],
- Getattr: v[19],
- Lookup: v[20],
- LookupRoot: v[21],
- Remove: v[22],
- Rename: v[23],
- Link: v[24],
- Symlink: v[25],
- Create: v[26],
- Pathconf: v[27],
- StatFs: v[28],
- ReadLink: v[29],
- ReadDir: v[30],
- ServerCaps: v[31],
- DelegReturn: v[32],
- GetACL: v[33],
- SetACL: v[34],
- FsLocations: v[35],
- ReleaseLockowner: v[36],
- Secinfo: v[37],
- FsidPresent: v[38],
- ExchangeID: v[39],
- CreateSession: v[40],
- DestroySession: v[41],
- Sequence: v[42],
- GetLeaseTime: v[43],
- ReclaimComplete: v[44],
- LayoutGet: v[45],
- GetDeviceInfo: v[46],
- LayoutCommit: v[47],
- LayoutReturn: v[48],
- SecinfoNoName: v[49],
- TestStateID: v[50],
- FreeStateID: v[51],
- GetDeviceList: v[52],
- BindConnToSession: v[53],
- DestroyClientID: v[54],
- Seek: v[55],
- Allocate: v[56],
- DeAllocate: v[57],
- LayoutStats: v[58],
- Clone: v[59],
- }, nil
-}
-
-func parseServerV4Stats(v []uint64) (ServerV4Stats, error) {
- values := int(v[0])
- if len(v[1:]) != values || values != 2 {
- return ServerV4Stats{}, fmt.Errorf("invalid V4Stats line %q", v)
- }
-
- return ServerV4Stats{
- Null: v[1],
- Compound: v[2],
- }, nil
-}
-
-func parseV4Ops(v []uint64) (V4Ops, error) {
- values := int(v[0])
- if len(v[1:]) != values || values < 39 {
- return V4Ops{}, fmt.Errorf("invalid V4Ops line %q", v)
- }
-
- stats := V4Ops{
- Op0Unused: v[1],
- Op1Unused: v[2],
- Op2Future: v[3],
- Access: v[4],
- Close: v[5],
- Commit: v[6],
- Create: v[7],
- DelegPurge: v[8],
- DelegReturn: v[9],
- GetAttr: v[10],
- GetFH: v[11],
- Link: v[12],
- Lock: v[13],
- Lockt: v[14],
- Locku: v[15],
- Lookup: v[16],
- LookupRoot: v[17],
- Nverify: v[18],
- Open: v[19],
- OpenAttr: v[20],
- OpenConfirm: v[21],
- OpenDgrd: v[22],
- PutFH: v[23],
- PutPubFH: v[24],
- PutRootFH: v[25],
- Read: v[26],
- ReadDir: v[27],
- ReadLink: v[28],
- Remove: v[29],
- Rename: v[30],
- Renew: v[31],
- RestoreFH: v[32],
- SaveFH: v[33],
- SecInfo: v[34],
- SetAttr: v[35],
- Verify: v[36],
- Write: v[37],
- RelLockOwner: v[38],
- }
-
- return stats, nil
-}
diff --git a/vendor/github.com/prometheus/procfs/nfs/parse_nfs.go b/vendor/github.com/prometheus/procfs/nfs/parse_nfs.go
deleted file mode 100644
index c0d3a5ad..00000000
--- a/vendor/github.com/prometheus/procfs/nfs/parse_nfs.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2018 The Prometheus Authors
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package nfs
-
-import (
- "bufio"
- "fmt"
- "io"
- "strings"
-
- "github.com/prometheus/procfs/internal/util"
-)
-
-// ParseClientRPCStats returns stats read from /proc/net/rpc/nfs
-func ParseClientRPCStats(r io.Reader) (*ClientRPCStats, error) {
- stats := &ClientRPCStats{}
-
- scanner := bufio.NewScanner(r)
- for scanner.Scan() {
- line := scanner.Text()
- parts := strings.Fields(scanner.Text())
- // require at least
- if len(parts) < 2 {
- return nil, fmt.Errorf("invalid NFS metric line %q", line)
- }
-
- values, err := util.ParseUint64s(parts[1:])
- if err != nil {
- return nil, fmt.Errorf("error parsing NFS metric line: %s", err)
- }
-
- switch metricLine := parts[0]; metricLine {
- case "net":
- stats.Network, err = parseNetwork(values)
- case "rpc":
- stats.ClientRPC, err = parseClientRPC(values)
- case "proc2":
- stats.V2Stats, err = parseV2Stats(values)
- case "proc3":
- stats.V3Stats, err = parseV3Stats(values)
- case "proc4":
- stats.ClientV4Stats, err = parseClientV4Stats(values)
- default:
- return nil, fmt.Errorf("unknown NFS metric line %q", metricLine)
- }
- if err != nil {
- return nil, fmt.Errorf("errors parsing NFS metric line: %s", err)
- }
- }
-
- if err := scanner.Err(); err != nil {
- return nil, fmt.Errorf("error scanning NFS file: %s", err)
- }
-
- return stats, nil
-}
diff --git a/vendor/github.com/prometheus/procfs/nfs/parse_nfsd.go b/vendor/github.com/prometheus/procfs/nfs/parse_nfsd.go
deleted file mode 100644
index 57bb4a35..00000000
--- a/vendor/github.com/prometheus/procfs/nfs/parse_nfsd.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2018 The Prometheus Authors
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package nfs
-
-import (
- "bufio"
- "fmt"
- "io"
- "strings"
-
- "github.com/prometheus/procfs/internal/util"
-)
-
-// ParseServerRPCStats returns stats read from /proc/net/rpc/nfsd
-func ParseServerRPCStats(r io.Reader) (*ServerRPCStats, error) {
- stats := &ServerRPCStats{}
-
- scanner := bufio.NewScanner(r)
- for scanner.Scan() {
- line := scanner.Text()
- parts := strings.Fields(scanner.Text())
- // require at least
- if len(parts) < 2 {
- return nil, fmt.Errorf("invalid NFSd metric line %q", line)
- }
- label := parts[0]
-
- var values []uint64
- var err error
- if label == "th" {
- if len(parts) < 3 {
- return nil, fmt.Errorf("invalid NFSd th metric line %q", line)
- }
- values, err = util.ParseUint64s(parts[1:3])
- } else {
- values, err = util.ParseUint64s(parts[1:])
- }
- if err != nil {
- return nil, fmt.Errorf("error parsing NFSd metric line: %s", err)
- }
-
- switch metricLine := parts[0]; metricLine {
- case "rc":
- stats.ReplyCache, err = parseReplyCache(values)
- case "fh":
- stats.FileHandles, err = parseFileHandles(values)
- case "io":
- stats.InputOutput, err = parseInputOutput(values)
- case "th":
- stats.Threads, err = parseThreads(values)
- case "ra":
- stats.ReadAheadCache, err = parseReadAheadCache(values)
- case "net":
- stats.Network, err = parseNetwork(values)
- case "rpc":
- stats.ServerRPC, err = parseServerRPC(values)
- case "proc2":
- stats.V2Stats, err = parseV2Stats(values)
- case "proc3":
- stats.V3Stats, err = parseV3Stats(values)
- case "proc4":
- stats.ServerV4Stats, err = parseServerV4Stats(values)
- case "proc4ops":
- stats.V4Ops, err = parseV4Ops(values)
- default:
- return nil, fmt.Errorf("unknown NFSd metric line %q", metricLine)
- }
- if err != nil {
- return nil, fmt.Errorf("errors parsing NFSd metric line: %s", err)
- }
- }
-
- if err := scanner.Err(); err != nil {
- return nil, fmt.Errorf("error scanning NFSd file: %s", err)
- }
-
- return stats, nil
-}
diff --git a/vendor/github.com/prometheus/procfs/proc.go b/vendor/github.com/prometheus/procfs/proc.go
index 7cf5b8ac..9f97b6e5 100644
--- a/vendor/github.com/prometheus/procfs/proc.go
+++ b/vendor/github.com/prometheus/procfs/proc.go
@@ -20,6 +20,9 @@ import (
"os"
"strconv"
"strings"
+
+ "github.com/prometheus/procfs/internal/fs"
+ "github.com/prometheus/procfs/internal/util"
)
// Proc provides information about a running process.
@@ -27,7 +30,7 @@ type Proc struct {
// The process ID.
PID int
- fs FS
+ fs fs.FS
}
// Procs represents a list of Proc structs.
@@ -52,7 +55,7 @@ func NewProc(pid int) (Proc, error) {
if err != nil {
return Proc{}, err
}
- return fs.NewProc(pid)
+ return fs.Proc(pid)
}
// AllProcs returns a list of all currently available processes under /proc.
@@ -66,28 +69,35 @@ func AllProcs() (Procs, error) {
// Self returns a process for the current process.
func (fs FS) Self() (Proc, error) {
- p, err := os.Readlink(fs.Path("self"))
+ p, err := os.Readlink(fs.proc.Path("self"))
if err != nil {
return Proc{}, err
}
- pid, err := strconv.Atoi(strings.Replace(p, string(fs), "", -1))
+ pid, err := strconv.Atoi(strings.Replace(p, string(fs.proc), "", -1))
if err != nil {
return Proc{}, err
}
- return fs.NewProc(pid)
+ return fs.Proc(pid)
}
// NewProc returns a process for the given pid.
+//
+// Deprecated: use fs.Proc() instead
func (fs FS) NewProc(pid int) (Proc, error) {
- if _, err := os.Stat(fs.Path(strconv.Itoa(pid))); err != nil {
+ return fs.Proc(pid)
+}
+
+// Proc returns a process for the given pid.
+func (fs FS) Proc(pid int) (Proc, error) {
+ if _, err := os.Stat(fs.proc.Path(strconv.Itoa(pid))); err != nil {
return Proc{}, err
}
- return Proc{PID: pid, fs: fs}, nil
+ return Proc{PID: pid, fs: fs.proc}, nil
}
// AllProcs returns a list of all currently available processes.
func (fs FS) AllProcs() (Procs, error) {
- d, err := os.Open(fs.Path())
+ d, err := os.Open(fs.proc.Path())
if err != nil {
return Procs{}, err
}
@@ -104,7 +114,7 @@ func (fs FS) AllProcs() (Procs, error) {
if err != nil {
continue
}
- p = append(p, Proc{PID: int(pid), fs: fs})
+ p = append(p, Proc{PID: int(pid), fs: fs.proc})
}
return p, nil
@@ -112,13 +122,7 @@ func (fs FS) AllProcs() (Procs, error) {
// CmdLine returns the command line of a process.
func (p Proc) CmdLine() ([]string, error) {
- f, err := os.Open(p.path("cmdline"))
- if err != nil {
- return nil, err
- }
- defer f.Close()
-
- data, err := ioutil.ReadAll(f)
+ data, err := util.ReadFileNoStat(p.path("cmdline"))
if err != nil {
return nil, err
}
@@ -130,9 +134,9 @@ func (p Proc) CmdLine() ([]string, error) {
return strings.Split(string(bytes.TrimRight(data, string("\x00"))), string(byte(0))), nil
}
-// Comm returns the command name of a process.
-func (p Proc) Comm() (string, error) {
- f, err := os.Open(p.path("comm"))
+// Wchan returns the wchan (wait channel) of a process.
+func (p Proc) Wchan() (string, error) {
+ f, err := os.Open(p.path("wchan"))
if err != nil {
return "", err
}
@@ -143,6 +147,21 @@ func (p Proc) Comm() (string, error) {
return "", err
}
+ wchan := string(data)
+ if wchan == "" || wchan == "0" {
+ return "", nil
+ }
+
+ return wchan, nil
+}
+
+// Comm returns the command name of a process.
+func (p Proc) Comm() (string, error) {
+ data, err := util.ReadFileNoStat(p.path("comm"))
+ if err != nil {
+ return "", err
+ }
+
return strings.TrimSpace(string(data)), nil
}
@@ -156,6 +175,26 @@ func (p Proc) Executable() (string, error) {
return exe, err
}
+// Cwd returns the absolute path to the current working directory of the process.
+func (p Proc) Cwd() (string, error) {
+ wd, err := os.Readlink(p.path("cwd"))
+ if os.IsNotExist(err) {
+ return "", nil
+ }
+
+ return wd, err
+}
+
+// RootDir returns the absolute path to the process's root directory (as set by chroot)
+func (p Proc) RootDir() (string, error) {
+ rdir, err := os.Readlink(p.path("root"))
+ if os.IsNotExist(err) {
+ return "", nil
+ }
+
+ return rdir, err
+}
+
// FileDescriptors returns the currently open file descriptors of a process.
func (p Proc) FileDescriptors() ([]uintptr, error) {
names, err := p.fileDescriptors()
@@ -218,6 +257,18 @@ func (p Proc) MountStats() ([]*Mount, error) {
return parseMountStats(f)
}
+// MountInfo retrieves mount information for mount points in a
+// process's namespace.
+// It supplies information missing in `/proc/self/mounts` and
+// fixes various other problems with that file too.
+func (p Proc) MountInfo() ([]*MountInfo, error) {
+ data, err := util.ReadFileNoStat(p.path("mountinfo"))
+ if err != nil {
+ return nil, err
+ }
+ return parseMountInfo(data)
+}
+
func (p Proc) fileDescriptors() ([]string, error) {
d, err := os.Open(p.path("fd"))
if err != nil {
@@ -236,3 +287,33 @@ func (p Proc) fileDescriptors() ([]string, error) {
func (p Proc) path(pa ...string) string {
return p.fs.Path(append([]string{strconv.Itoa(p.PID)}, pa...)...)
}
+
+// FileDescriptorsInfo retrieves information about all file descriptors of
+// the process.
+func (p Proc) FileDescriptorsInfo() (ProcFDInfos, error) {
+ names, err := p.fileDescriptors()
+ if err != nil {
+ return nil, err
+ }
+
+ var fdinfos ProcFDInfos
+
+ for _, n := range names {
+ fdinfo, err := p.FDInfo(n)
+ if err != nil {
+ continue
+ }
+ fdinfos = append(fdinfos, *fdinfo)
+ }
+
+ return fdinfos, nil
+}
+
+// Schedstat returns task scheduling information for the process.
+func (p Proc) Schedstat() (ProcSchedstat, error) {
+ contents, err := ioutil.ReadFile(p.path("schedstat"))
+ if err != nil {
+ return ProcSchedstat{}, err
+ }
+ return parseProcSchedstat(string(contents))
+}
diff --git a/vendor/github.com/prometheus/procfs/proc_io.go b/vendor/github.com/prometheus/procfs/proc_io.go
index 0251c83b..776f3497 100644
--- a/vendor/github.com/prometheus/procfs/proc_io.go
+++ b/vendor/github.com/prometheus/procfs/proc_io.go
@@ -15,8 +15,8 @@ package procfs
import (
"fmt"
- "io/ioutil"
- "os"
+
+ "github.com/prometheus/procfs/internal/util"
)
// ProcIO models the content of /proc//io.
@@ -39,17 +39,11 @@ type ProcIO struct {
CancelledWriteBytes int64
}
-// NewIO creates a new ProcIO instance from a given Proc instance.
-func (p Proc) NewIO() (ProcIO, error) {
+// IO creates a new ProcIO instance from a given Proc instance.
+func (p Proc) IO() (ProcIO, error) {
pio := ProcIO{}
- f, err := os.Open(p.path("io"))
- if err != nil {
- return pio, err
- }
- defer f.Close()
-
- data, err := ioutil.ReadAll(f)
+ data, err := util.ReadFileNoStat(p.path("io"))
if err != nil {
return pio, err
}
diff --git a/vendor/github.com/prometheus/procfs/proc_limits.go b/vendor/github.com/prometheus/procfs/proc_limits.go
index f04ba6fd..91ee24df 100644
--- a/vendor/github.com/prometheus/procfs/proc_limits.go
+++ b/vendor/github.com/prometheus/procfs/proc_limits.go
@@ -78,7 +78,14 @@ var (
)
// NewLimits returns the current soft limits of the process.
+//
+// Deprecated: use p.Limits() instead
func (p Proc) NewLimits() (ProcLimits, error) {
+ return p.Limits()
+}
+
+// Limits returns the current soft limits of the process.
+func (p Proc) Limits() (ProcLimits, error) {
f, err := os.Open(p.path("limits"))
if err != nil {
return ProcLimits{}, err
diff --git a/vendor/github.com/prometheus/procfs/proc_ns.go b/vendor/github.com/prometheus/procfs/proc_ns.go
index d06c26eb..c66740ff 100644
--- a/vendor/github.com/prometheus/procfs/proc_ns.go
+++ b/vendor/github.com/prometheus/procfs/proc_ns.go
@@ -29,9 +29,9 @@ type Namespace struct {
// Namespaces contains all of the namespaces that the process is contained in.
type Namespaces map[string]Namespace
-// NewNamespaces reads from /proc/[pid/ns/* to get the namespaces of which the
+// Namespaces reads from /proc//ns/* to get the namespaces of which the
// process is a member.
-func (p Proc) NewNamespaces() (Namespaces, error) {
+func (p Proc) Namespaces() (Namespaces, error) {
d, err := os.Open(p.path("ns"))
if err != nil {
return nil, err
diff --git a/vendor/github.com/prometheus/procfs/proc_stat.go b/vendor/github.com/prometheus/procfs/proc_stat.go
index 3cf2a9f1..4517d2e9 100644
--- a/vendor/github.com/prometheus/procfs/proc_stat.go
+++ b/vendor/github.com/prometheus/procfs/proc_stat.go
@@ -16,8 +16,10 @@ package procfs
import (
"bytes"
"fmt"
- "io/ioutil"
"os"
+
+ "github.com/prometheus/procfs/internal/fs"
+ "github.com/prometheus/procfs/internal/util"
)
// Originally, this USER_HZ value was dynamically retrieved via a sysconf call
@@ -95,22 +97,23 @@ type ProcStat struct {
// in clock ticks.
Starttime uint64
// Virtual memory size in bytes.
- VSize int
+ VSize uint
// Resident set size in pages.
RSS int
- fs FS
+ proc fs.FS
}
// NewStat returns the current status information of the process.
+//
+// Deprecated: use p.Stat() instead
func (p Proc) NewStat() (ProcStat, error) {
- f, err := os.Open(p.path("stat"))
- if err != nil {
- return ProcStat{}, err
- }
- defer f.Close()
+ return p.Stat()
+}
- data, err := ioutil.ReadAll(f)
+// Stat returns the current status information of the process.
+func (p Proc) Stat() (ProcStat, error) {
+ data, err := util.ReadFileNoStat(p.path("stat"))
if err != nil {
return ProcStat{}, err
}
@@ -118,7 +121,7 @@ func (p Proc) NewStat() (ProcStat, error) {
var (
ignore int
- s = ProcStat{PID: p.PID, fs: p.fs}
+ s = ProcStat{PID: p.PID, proc: p.fs}
l = bytes.Index(data, []byte("("))
r = bytes.LastIndex(data, []byte(")"))
)
@@ -164,7 +167,7 @@ func (p Proc) NewStat() (ProcStat, error) {
}
// VirtualMemory returns the virtual memory size in bytes.
-func (s ProcStat) VirtualMemory() int {
+func (s ProcStat) VirtualMemory() uint {
return s.VSize
}
@@ -175,7 +178,8 @@ func (s ProcStat) ResidentMemory() int {
// StartTime returns the unix timestamp of the process in seconds.
func (s ProcStat) StartTime() (float64, error) {
- stat, err := s.fs.NewStat()
+ fs := FS{proc: s.proc}
+ stat, err := fs.Stat()
if err != nil {
return 0, err
}
diff --git a/vendor/github.com/prometheus/procfs/stat.go b/vendor/github.com/prometheus/procfs/stat.go
index 61eb6b0e..b2a6fc99 100644
--- a/vendor/github.com/prometheus/procfs/stat.go
+++ b/vendor/github.com/prometheus/procfs/stat.go
@@ -15,11 +15,14 @@ package procfs
import (
"bufio"
+ "bytes"
"fmt"
"io"
- "os"
"strconv"
"strings"
+
+ "github.com/prometheus/procfs/internal/fs"
+ "github.com/prometheus/procfs/internal/util"
)
// CPUStat shows how much time the cpu spend in various stages.
@@ -78,16 +81,6 @@ type Stat struct {
SoftIRQ SoftIRQStat
}
-// NewStat returns kernel/system statistics read from /proc/stat.
-func NewStat() (Stat, error) {
- fs, err := NewFS(DefaultMountPoint)
- if err != nil {
- return Stat{}, err
- }
-
- return fs.NewStat()
-}
-
// Parse a cpu statistics line and returns the CPUStat struct plus the cpu id (or -1 for the overall sum).
func parseCPUStat(line string) (CPUStat, int64, error) {
cpuStat := CPUStat{}
@@ -149,19 +142,38 @@ func parseSoftIRQStat(line string) (SoftIRQStat, uint64, error) {
return softIRQStat, total, nil
}
-// NewStat returns an information about current kernel/system statistics.
+// NewStat returns information about current cpu/process statistics.
+// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt
+//
+// Deprecated: use fs.Stat() instead
+func NewStat() (Stat, error) {
+ fs, err := NewFS(fs.DefaultProcMountPoint)
+ if err != nil {
+ return Stat{}, err
+ }
+ return fs.Stat()
+}
+
+// NewStat returns information about current cpu/process statistics.
+// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt
+//
+// Deprecated: use fs.Stat() instead
func (fs FS) NewStat() (Stat, error) {
- // See https://www.kernel.org/doc/Documentation/filesystems/proc.txt
+ return fs.Stat()
+}
- f, err := os.Open(fs.Path("stat"))
+// Stat returns information about current cpu/process statistics.
+// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt
+func (fs FS) Stat() (Stat, error) {
+ fileName := fs.proc.Path("stat")
+ data, err := util.ReadFileNoStat(fileName)
if err != nil {
return Stat{}, err
}
- defer f.Close()
stat := Stat{}
- scanner := bufio.NewScanner(f)
+ scanner := bufio.NewScanner(bytes.NewReader(data))
for scanner.Scan() {
line := scanner.Text()
parts := strings.Fields(scanner.Text())
@@ -225,7 +237,7 @@ func (fs FS) NewStat() (Stat, error) {
}
if err := scanner.Err(); err != nil {
- return Stat{}, fmt.Errorf("couldn't parse %s: %s", f.Name(), err)
+ return Stat{}, fmt.Errorf("couldn't parse %s: %s", fileName, err)
}
return stat, nil
diff --git a/vendor/github.com/prometheus/procfs/xfrm.go b/vendor/github.com/prometheus/procfs/xfrm.go
index ffe9df50..30aa417d 100644
--- a/vendor/github.com/prometheus/procfs/xfrm.go
+++ b/vendor/github.com/prometheus/procfs/xfrm.go
@@ -97,7 +97,7 @@ func NewXfrmStat() (XfrmStat, error) {
// NewXfrmStat reads the xfrm_stat statistics from the 'proc' filesystem.
func (fs FS) NewXfrmStat() (XfrmStat, error) {
- file, err := os.Open(fs.Path("net/xfrm_stat"))
+ file, err := os.Open(fs.proc.Path("net/xfrm_stat"))
if err != nil {
return XfrmStat{}, err
}
@@ -113,7 +113,7 @@ func (fs FS) NewXfrmStat() (XfrmStat, error) {
if len(fields) != 2 {
return XfrmStat{}, fmt.Errorf(
- "couldnt parse %s line %s", file.Name(), s.Text())
+ "couldn't parse %s line %s", file.Name(), s.Text())
}
name := fields[0]
diff --git a/vendor/github.com/prometheus/procfs/xfs/parse.go b/vendor/github.com/prometheus/procfs/xfs/parse.go
deleted file mode 100644
index 2bc0ef34..00000000
--- a/vendor/github.com/prometheus/procfs/xfs/parse.go
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package xfs
-
-import (
- "bufio"
- "fmt"
- "io"
- "strings"
-
- "github.com/prometheus/procfs/internal/util"
-)
-
-// ParseStats parses a Stats from an input io.Reader, using the format
-// found in /proc/fs/xfs/stat.
-func ParseStats(r io.Reader) (*Stats, error) {
- const (
- // Fields parsed into stats structures.
- fieldExtentAlloc = "extent_alloc"
- fieldAbt = "abt"
- fieldBlkMap = "blk_map"
- fieldBmbt = "bmbt"
- fieldDir = "dir"
- fieldTrans = "trans"
- fieldIg = "ig"
- fieldLog = "log"
- fieldRw = "rw"
- fieldAttr = "attr"
- fieldIcluster = "icluster"
- fieldVnodes = "vnodes"
- fieldBuf = "buf"
- fieldXpc = "xpc"
-
- // Unimplemented at this time due to lack of documentation.
- fieldPushAil = "push_ail"
- fieldXstrat = "xstrat"
- fieldAbtb2 = "abtb2"
- fieldAbtc2 = "abtc2"
- fieldBmbt2 = "bmbt2"
- fieldIbt2 = "ibt2"
- fieldFibt2 = "fibt2"
- fieldQm = "qm"
- fieldDebug = "debug"
- )
-
- var xfss Stats
-
- s := bufio.NewScanner(r)
- for s.Scan() {
- // Expect at least a string label and a single integer value, ex:
- // - abt 0
- // - rw 1 2
- ss := strings.Fields(string(s.Bytes()))
- if len(ss) < 2 {
- continue
- }
- label := ss[0]
-
- // Extended precision counters are uint64 values.
- if label == fieldXpc {
- us, err := util.ParseUint64s(ss[1:])
- if err != nil {
- return nil, err
- }
-
- xfss.ExtendedPrecision, err = extendedPrecisionStats(us)
- if err != nil {
- return nil, err
- }
-
- continue
- }
-
- // All other counters are uint32 values.
- us, err := util.ParseUint32s(ss[1:])
- if err != nil {
- return nil, err
- }
-
- switch label {
- case fieldExtentAlloc:
- xfss.ExtentAllocation, err = extentAllocationStats(us)
- case fieldAbt:
- xfss.AllocationBTree, err = btreeStats(us)
- case fieldBlkMap:
- xfss.BlockMapping, err = blockMappingStats(us)
- case fieldBmbt:
- xfss.BlockMapBTree, err = btreeStats(us)
- case fieldDir:
- xfss.DirectoryOperation, err = directoryOperationStats(us)
- case fieldTrans:
- xfss.Transaction, err = transactionStats(us)
- case fieldIg:
- xfss.InodeOperation, err = inodeOperationStats(us)
- case fieldLog:
- xfss.LogOperation, err = logOperationStats(us)
- case fieldRw:
- xfss.ReadWrite, err = readWriteStats(us)
- case fieldAttr:
- xfss.AttributeOperation, err = attributeOperationStats(us)
- case fieldIcluster:
- xfss.InodeClustering, err = inodeClusteringStats(us)
- case fieldVnodes:
- xfss.Vnode, err = vnodeStats(us)
- case fieldBuf:
- xfss.Buffer, err = bufferStats(us)
- }
- if err != nil {
- return nil, err
- }
- }
-
- return &xfss, s.Err()
-}
-
-// extentAllocationStats builds an ExtentAllocationStats from a slice of uint32s.
-func extentAllocationStats(us []uint32) (ExtentAllocationStats, error) {
- if l := len(us); l != 4 {
- return ExtentAllocationStats{}, fmt.Errorf("incorrect number of values for XFS extent allocation stats: %d", l)
- }
-
- return ExtentAllocationStats{
- ExtentsAllocated: us[0],
- BlocksAllocated: us[1],
- ExtentsFreed: us[2],
- BlocksFreed: us[3],
- }, nil
-}
-
-// btreeStats builds a BTreeStats from a slice of uint32s.
-func btreeStats(us []uint32) (BTreeStats, error) {
- if l := len(us); l != 4 {
- return BTreeStats{}, fmt.Errorf("incorrect number of values for XFS btree stats: %d", l)
- }
-
- return BTreeStats{
- Lookups: us[0],
- Compares: us[1],
- RecordsInserted: us[2],
- RecordsDeleted: us[3],
- }, nil
-}
-
-// BlockMappingStat builds a BlockMappingStats from a slice of uint32s.
-func blockMappingStats(us []uint32) (BlockMappingStats, error) {
- if l := len(us); l != 7 {
- return BlockMappingStats{}, fmt.Errorf("incorrect number of values for XFS block mapping stats: %d", l)
- }
-
- return BlockMappingStats{
- Reads: us[0],
- Writes: us[1],
- Unmaps: us[2],
- ExtentListInsertions: us[3],
- ExtentListDeletions: us[4],
- ExtentListLookups: us[5],
- ExtentListCompares: us[6],
- }, nil
-}
-
-// DirectoryOperationStats builds a DirectoryOperationStats from a slice of uint32s.
-func directoryOperationStats(us []uint32) (DirectoryOperationStats, error) {
- if l := len(us); l != 4 {
- return DirectoryOperationStats{}, fmt.Errorf("incorrect number of values for XFS directory operation stats: %d", l)
- }
-
- return DirectoryOperationStats{
- Lookups: us[0],
- Creates: us[1],
- Removes: us[2],
- Getdents: us[3],
- }, nil
-}
-
-// TransactionStats builds a TransactionStats from a slice of uint32s.
-func transactionStats(us []uint32) (TransactionStats, error) {
- if l := len(us); l != 3 {
- return TransactionStats{}, fmt.Errorf("incorrect number of values for XFS transaction stats: %d", l)
- }
-
- return TransactionStats{
- Sync: us[0],
- Async: us[1],
- Empty: us[2],
- }, nil
-}
-
-// InodeOperationStats builds an InodeOperationStats from a slice of uint32s.
-func inodeOperationStats(us []uint32) (InodeOperationStats, error) {
- if l := len(us); l != 7 {
- return InodeOperationStats{}, fmt.Errorf("incorrect number of values for XFS inode operation stats: %d", l)
- }
-
- return InodeOperationStats{
- Attempts: us[0],
- Found: us[1],
- Recycle: us[2],
- Missed: us[3],
- Duplicate: us[4],
- Reclaims: us[5],
- AttributeChange: us[6],
- }, nil
-}
-
-// LogOperationStats builds a LogOperationStats from a slice of uint32s.
-func logOperationStats(us []uint32) (LogOperationStats, error) {
- if l := len(us); l != 5 {
- return LogOperationStats{}, fmt.Errorf("incorrect number of values for XFS log operation stats: %d", l)
- }
-
- return LogOperationStats{
- Writes: us[0],
- Blocks: us[1],
- NoInternalBuffers: us[2],
- Force: us[3],
- ForceSleep: us[4],
- }, nil
-}
-
-// ReadWriteStats builds a ReadWriteStats from a slice of uint32s.
-func readWriteStats(us []uint32) (ReadWriteStats, error) {
- if l := len(us); l != 2 {
- return ReadWriteStats{}, fmt.Errorf("incorrect number of values for XFS read write stats: %d", l)
- }
-
- return ReadWriteStats{
- Read: us[0],
- Write: us[1],
- }, nil
-}
-
-// AttributeOperationStats builds an AttributeOperationStats from a slice of uint32s.
-func attributeOperationStats(us []uint32) (AttributeOperationStats, error) {
- if l := len(us); l != 4 {
- return AttributeOperationStats{}, fmt.Errorf("incorrect number of values for XFS attribute operation stats: %d", l)
- }
-
- return AttributeOperationStats{
- Get: us[0],
- Set: us[1],
- Remove: us[2],
- List: us[3],
- }, nil
-}
-
-// InodeClusteringStats builds an InodeClusteringStats from a slice of uint32s.
-func inodeClusteringStats(us []uint32) (InodeClusteringStats, error) {
- if l := len(us); l != 3 {
- return InodeClusteringStats{}, fmt.Errorf("incorrect number of values for XFS inode clustering stats: %d", l)
- }
-
- return InodeClusteringStats{
- Iflush: us[0],
- Flush: us[1],
- FlushInode: us[2],
- }, nil
-}
-
-// VnodeStats builds a VnodeStats from a slice of uint32s.
-func vnodeStats(us []uint32) (VnodeStats, error) {
- // The attribute "Free" appears to not be available on older XFS
- // stats versions. Therefore, 7 or 8 elements may appear in
- // this slice.
- l := len(us)
- if l != 7 && l != 8 {
- return VnodeStats{}, fmt.Errorf("incorrect number of values for XFS vnode stats: %d", l)
- }
-
- s := VnodeStats{
- Active: us[0],
- Allocate: us[1],
- Get: us[2],
- Hold: us[3],
- Release: us[4],
- Reclaim: us[5],
- Remove: us[6],
- }
-
- // Skip adding free, unless it is present. The zero value will
- // be used in place of an actual count.
- if l == 7 {
- return s, nil
- }
-
- s.Free = us[7]
- return s, nil
-}
-
-// BufferStats builds a BufferStats from a slice of uint32s.
-func bufferStats(us []uint32) (BufferStats, error) {
- if l := len(us); l != 9 {
- return BufferStats{}, fmt.Errorf("incorrect number of values for XFS buffer stats: %d", l)
- }
-
- return BufferStats{
- Get: us[0],
- Create: us[1],
- GetLocked: us[2],
- GetLockedWaited: us[3],
- BusyLocked: us[4],
- MissLocked: us[5],
- PageRetries: us[6],
- PageFound: us[7],
- GetRead: us[8],
- }, nil
-}
-
-// ExtendedPrecisionStats builds an ExtendedPrecisionStats from a slice of uint32s.
-func extendedPrecisionStats(us []uint64) (ExtendedPrecisionStats, error) {
- if l := len(us); l != 3 {
- return ExtendedPrecisionStats{}, fmt.Errorf("incorrect number of values for XFS extended precision stats: %d", l)
- }
-
- return ExtendedPrecisionStats{
- FlushBytes: us[0],
- WriteBytes: us[1],
- ReadBytes: us[2],
- }, nil
-}
diff --git a/vendor/github.com/prometheus/procfs/xfs/xfs.go b/vendor/github.com/prometheus/procfs/xfs/xfs.go
deleted file mode 100644
index d86794b7..00000000
--- a/vendor/github.com/prometheus/procfs/xfs/xfs.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Package xfs provides access to statistics exposed by the XFS filesystem.
-package xfs
-
-// Stats contains XFS filesystem runtime statistics, parsed from
-// /proc/fs/xfs/stat.
-//
-// The names and meanings of each statistic were taken from
-// http://xfs.org/index.php/Runtime_Stats and xfs_stats.h in the Linux
-// kernel source. Most counters are uint32s (same data types used in
-// xfs_stats.h), but some of the "extended precision stats" are uint64s.
-type Stats struct {
- // The name of the filesystem used to source these statistics.
- // If empty, this indicates aggregated statistics for all XFS
- // filesystems on the host.
- Name string
-
- ExtentAllocation ExtentAllocationStats
- AllocationBTree BTreeStats
- BlockMapping BlockMappingStats
- BlockMapBTree BTreeStats
- DirectoryOperation DirectoryOperationStats
- Transaction TransactionStats
- InodeOperation InodeOperationStats
- LogOperation LogOperationStats
- ReadWrite ReadWriteStats
- AttributeOperation AttributeOperationStats
- InodeClustering InodeClusteringStats
- Vnode VnodeStats
- Buffer BufferStats
- ExtendedPrecision ExtendedPrecisionStats
-}
-
-// ExtentAllocationStats contains statistics regarding XFS extent allocations.
-type ExtentAllocationStats struct {
- ExtentsAllocated uint32
- BlocksAllocated uint32
- ExtentsFreed uint32
- BlocksFreed uint32
-}
-
-// BTreeStats contains statistics regarding an XFS internal B-tree.
-type BTreeStats struct {
- Lookups uint32
- Compares uint32
- RecordsInserted uint32
- RecordsDeleted uint32
-}
-
-// BlockMappingStats contains statistics regarding XFS block maps.
-type BlockMappingStats struct {
- Reads uint32
- Writes uint32
- Unmaps uint32
- ExtentListInsertions uint32
- ExtentListDeletions uint32
- ExtentListLookups uint32
- ExtentListCompares uint32
-}
-
-// DirectoryOperationStats contains statistics regarding XFS directory entries.
-type DirectoryOperationStats struct {
- Lookups uint32
- Creates uint32
- Removes uint32
- Getdents uint32
-}
-
-// TransactionStats contains statistics regarding XFS metadata transactions.
-type TransactionStats struct {
- Sync uint32
- Async uint32
- Empty uint32
-}
-
-// InodeOperationStats contains statistics regarding XFS inode operations.
-type InodeOperationStats struct {
- Attempts uint32
- Found uint32
- Recycle uint32
- Missed uint32
- Duplicate uint32
- Reclaims uint32
- AttributeChange uint32
-}
-
-// LogOperationStats contains statistics regarding the XFS log buffer.
-type LogOperationStats struct {
- Writes uint32
- Blocks uint32
- NoInternalBuffers uint32
- Force uint32
- ForceSleep uint32
-}
-
-// ReadWriteStats contains statistics regarding the number of read and write
-// system calls for XFS filesystems.
-type ReadWriteStats struct {
- Read uint32
- Write uint32
-}
-
-// AttributeOperationStats contains statistics regarding manipulation of
-// XFS extended file attributes.
-type AttributeOperationStats struct {
- Get uint32
- Set uint32
- Remove uint32
- List uint32
-}
-
-// InodeClusteringStats contains statistics regarding XFS inode clustering
-// operations.
-type InodeClusteringStats struct {
- Iflush uint32
- Flush uint32
- FlushInode uint32
-}
-
-// VnodeStats contains statistics regarding XFS vnode operations.
-type VnodeStats struct {
- Active uint32
- Allocate uint32
- Get uint32
- Hold uint32
- Release uint32
- Reclaim uint32
- Remove uint32
- Free uint32
-}
-
-// BufferStats contains statistics regarding XFS read/write I/O buffers.
-type BufferStats struct {
- Get uint32
- Create uint32
- GetLocked uint32
- GetLockedWaited uint32
- BusyLocked uint32
- MissLocked uint32
- PageRetries uint32
- PageFound uint32
- GetRead uint32
-}
-
-// ExtendedPrecisionStats contains high precision counters used to track the
-// total number of bytes read, written, or flushed, during XFS operations.
-type ExtendedPrecisionStats struct {
- FlushBytes uint64
- WriteBytes uint64
- ReadBytes uint64
-}
diff --git a/vendor/github.com/stretchr/testify/LICENSE b/vendor/github.com/stretchr/testify/LICENSE
index 473b670a..4b0421cf 100644
--- a/vendor/github.com/stretchr/testify/LICENSE
+++ b/vendor/github.com/stretchr/testify/LICENSE
@@ -1,22 +1,21 @@
-Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell
+MIT License
-Please consider promoting this project if you find it useful.
+Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors.
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of the Software,
-and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
-OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
-OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go b/vendor/github.com/stretchr/testify/assert/assertion_format.go
index aa1c2b95..49370eb1 100644
--- a/vendor/github.com/stretchr/testify/assert/assertion_format.go
+++ b/vendor/github.com/stretchr/testify/assert/assertion_format.go
@@ -32,7 +32,8 @@ func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args
return Contains(t, s, contains, append([]interface{}{msg}, args...)...)
}
-// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
+// DirExistsf checks whether a directory exists in the given path. It also fails
+// if the path is a file rather a directory or there is an error checking whether it exists.
func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -92,7 +93,7 @@ func EqualErrorf(t TestingT, theError error, errString string, msg string, args
// EqualValuesf asserts that two objects are equal or convertable to the same types
// and equal.
//
-// assert.EqualValuesf(t, uint32(123, "error message %s", "formatted"), int32(123))
+// assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted")
func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -113,9 +114,20 @@ func Errorf(t TestingT, err error, msg string, args ...interface{}) bool {
return Error(t, err, append([]interface{}{msg}, args...)...)
}
+// Eventuallyf asserts that given condition will be met in waitFor time,
+// periodically checking target function each tick.
+//
+// assert.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted")
+func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return Eventually(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...)
+}
+
// Exactlyf asserts that two objects are equal in value and type.
//
-// assert.Exactlyf(t, int32(123, "error message %s", "formatted"), int64(123))
+// assert.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted")
func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -149,7 +161,8 @@ func Falsef(t TestingT, value bool, msg string, args ...interface{}) bool {
return False(t, value, append([]interface{}{msg}, args...)...)
}
-// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
+// FileExistsf checks whether a file exists in the given path. It also fails if
+// the path points to a directory or there is an error when trying to check the file.
func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -157,6 +170,31 @@ func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool
return FileExists(t, path, append([]interface{}{msg}, args...)...)
}
+// Greaterf asserts that the first element is greater than the second
+//
+// assert.Greaterf(t, 2, 1, "error message %s", "formatted")
+// assert.Greaterf(t, float64(2), float64(1), "error message %s", "formatted")
+// assert.Greaterf(t, "b", "a", "error message %s", "formatted")
+func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return Greater(t, e1, e2, append([]interface{}{msg}, args...)...)
+}
+
+// GreaterOrEqualf asserts that the first element is greater than or equal to the second
+//
+// assert.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted")
+// assert.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted")
+// assert.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted")
+// assert.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted")
+func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return GreaterOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...)
+}
+
// HTTPBodyContainsf asserts that a specified handler returns a
// body that contains a string.
//
@@ -187,7 +225,7 @@ func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, u
//
// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
+// Returns whether the assertion was successful (true) or not (false).
func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -199,7 +237,7 @@ func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string,
//
// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
+// Returns whether the assertion was successful (true) or not (false).
func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -207,6 +245,18 @@ func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url stri
return HTTPRedirect(t, handler, method, url, values, append([]interface{}{msg}, args...)...)
}
+// HTTPStatusCodef asserts that a specified handler returns a specified status code.
+//
+// assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted")
+//
+// Returns whether the assertion was successful (true) or not (false).
+func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return HTTPStatusCode(t, handler, method, url, values, statuscode, append([]interface{}{msg}, args...)...)
+}
+
// HTTPSuccessf asserts that a specified handler returns a success status code.
//
// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted")
@@ -221,7 +271,7 @@ func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url strin
// Implementsf asserts that an object is implemented by the specified interface.
//
-// assert.Implementsf(t, (*MyInterface, "error message %s", "formatted")(nil), new(MyObject))
+// assert.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted")
func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -231,7 +281,7 @@ func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, ms
// InDeltaf asserts that the two numerals are within delta of each other.
//
-// assert.InDeltaf(t, math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01)
+// assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -300,6 +350,42 @@ func Lenf(t TestingT, object interface{}, length int, msg string, args ...interf
return Len(t, object, length, append([]interface{}{msg}, args...)...)
}
+// Lessf asserts that the first element is less than the second
+//
+// assert.Lessf(t, 1, 2, "error message %s", "formatted")
+// assert.Lessf(t, float64(1), float64(2), "error message %s", "formatted")
+// assert.Lessf(t, "a", "b", "error message %s", "formatted")
+func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return Less(t, e1, e2, append([]interface{}{msg}, args...)...)
+}
+
+// LessOrEqualf asserts that the first element is less than or equal to the second
+//
+// assert.LessOrEqualf(t, 1, 2, "error message %s", "formatted")
+// assert.LessOrEqualf(t, 2, 2, "error message %s", "formatted")
+// assert.LessOrEqualf(t, "a", "b", "error message %s", "formatted")
+// assert.LessOrEqualf(t, "b", "b", "error message %s", "formatted")
+func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return LessOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...)
+}
+
+// Neverf asserts that the given condition doesn't satisfy in waitFor time,
+// periodically checking the target function each tick.
+//
+// assert.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted")
+func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return Never(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...)
+}
+
// Nilf asserts that the specified object is nil.
//
// assert.Nilf(t, err, "error message %s", "formatted")
@@ -310,6 +396,15 @@ func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool
return Nil(t, object, append([]interface{}{msg}, args...)...)
}
+// NoDirExistsf checks whether a directory does not exist in the given path.
+// It fails if the path points to an existing _directory_ only.
+func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return NoDirExists(t, path, append([]interface{}{msg}, args...)...)
+}
+
// NoErrorf asserts that a function returned no error (i.e. `nil`).
//
// actualObj, err := SomeFunction()
@@ -323,6 +418,15 @@ func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool {
return NoError(t, err, append([]interface{}{msg}, args...)...)
}
+// NoFileExistsf checks whether a file does not exist in a given path. It fails
+// if the path points to an existing _file_ only.
+func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return NoFileExists(t, path, append([]interface{}{msg}, args...)...)
+}
+
// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the
// specified substring or element.
//
@@ -362,6 +466,16 @@ func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string,
return NotEqual(t, expected, actual, append([]interface{}{msg}, args...)...)
}
+// NotEqualValuesf asserts that two objects are not equal even when converted to the same type
+//
+// assert.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted")
+func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return NotEqualValues(t, expected, actual, append([]interface{}{msg}, args...)...)
+}
+
// NotNilf asserts that the specified object is not nil.
//
// assert.NotNilf(t, err, "error message %s", "formatted")
@@ -384,7 +498,7 @@ func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bo
// NotRegexpf asserts that a specified regexp does not match a string.
//
-// assert.NotRegexpf(t, regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting")
+// assert.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted")
// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted")
func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
@@ -393,6 +507,19 @@ func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ..
return NotRegexp(t, rx, str, append([]interface{}{msg}, args...)...)
}
+// NotSamef asserts that two pointers do not reference the same object.
+//
+// assert.NotSamef(t, ptr1, ptr2, "error message %s", "formatted")
+//
+// Both arguments must be pointer variables. Pointer variable sameness is
+// determined based on the equality of both type and value.
+func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return NotSame(t, expected, actual, append([]interface{}{msg}, args...)...)
+}
+
// NotSubsetf asserts that the specified list(array, slice...) contains not all
// elements given in the specified subset(array, slice...).
//
@@ -422,6 +549,18 @@ func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool
return Panics(t, f, append([]interface{}{msg}, args...)...)
}
+// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc
+// panics, and that the recovered panic value is an error that satisfies the
+// EqualError comparison.
+//
+// assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
+func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return PanicsWithError(t, errString, f, append([]interface{}{msg}, args...)...)
+}
+
// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that
// the recovered panic value equals the expected panic value.
//
@@ -435,7 +574,7 @@ func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg str
// Regexpf asserts that a specified regexp matches a string.
//
-// assert.Regexpf(t, regexp.MustCompile("start", "error message %s", "formatted"), "it's starting")
+// assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted")
// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted")
func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
@@ -444,6 +583,19 @@ func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...in
return Regexp(t, rx, str, append([]interface{}{msg}, args...)...)
}
+// Samef asserts that two pointers reference the same object.
+//
+// assert.Samef(t, ptr1, ptr2, "error message %s", "formatted")
+//
+// Both arguments must be pointer variables. Pointer variable sameness is
+// determined based on the equality of both type and value.
+func Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return Same(t, expected, actual, append([]interface{}{msg}, args...)...)
+}
+
// Subsetf asserts that the specified list(array, slice...) contains all
// elements given in the specified subset(array, slice...).
//
@@ -475,6 +627,14 @@ func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta tim
return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...)
}
+// YAMLEqf asserts that two YAML strings are equivalent.
+func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return YAMLEq(t, expected, actual, append([]interface{}{msg}, args...)...)
+}
+
// Zerof asserts that i is the zero value for its type.
func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/vendor/github.com/stretchr/testify/assert/assertion_forward.go
index de39f794..9db88942 100644
--- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go
+++ b/vendor/github.com/stretchr/testify/assert/assertion_forward.go
@@ -53,7 +53,8 @@ func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string,
return Containsf(a.t, s, contains, msg, args...)
}
-// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
+// DirExists checks whether a directory exists in the given path. It also fails
+// if the path is a file rather a directory or there is an error checking whether it exists.
func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -61,7 +62,8 @@ func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool {
return DirExists(a.t, path, msgAndArgs...)
}
-// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
+// DirExistsf checks whether a directory exists in the given path. It also fails
+// if the path is a file rather a directory or there is an error checking whether it exists.
func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -167,7 +169,7 @@ func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAn
// EqualValuesf asserts that two objects are equal or convertable to the same types
// and equal.
//
-// a.EqualValuesf(uint32(123, "error message %s", "formatted"), int32(123))
+// a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted")
func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -215,6 +217,28 @@ func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool {
return Errorf(a.t, err, msg, args...)
}
+// Eventually asserts that given condition will be met in waitFor time,
+// periodically checking target function each tick.
+//
+// a.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond)
+func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return Eventually(a.t, condition, waitFor, tick, msgAndArgs...)
+}
+
+// Eventuallyf asserts that given condition will be met in waitFor time,
+// periodically checking target function each tick.
+//
+// a.Eventuallyf(func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted")
+func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return Eventuallyf(a.t, condition, waitFor, tick, msg, args...)
+}
+
// Exactly asserts that two objects are equal in value and type.
//
// a.Exactly(int32(123), int64(123))
@@ -227,7 +251,7 @@ func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArg
// Exactlyf asserts that two objects are equal in value and type.
//
-// a.Exactlyf(int32(123, "error message %s", "formatted"), int64(123))
+// a.Exactlyf(int32(123), int64(123), "error message %s", "formatted")
func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -287,7 +311,8 @@ func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool {
return Falsef(a.t, value, msg, args...)
}
-// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
+// FileExists checks whether a file exists in the given path. It also fails if
+// the path points to a directory or there is an error when trying to check the file.
func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -295,7 +320,8 @@ func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool {
return FileExists(a.t, path, msgAndArgs...)
}
-// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
+// FileExistsf checks whether a file exists in the given path. It also fails if
+// the path points to a directory or there is an error when trying to check the file.
func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -303,6 +329,56 @@ func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) b
return FileExistsf(a.t, path, msg, args...)
}
+// Greater asserts that the first element is greater than the second
+//
+// a.Greater(2, 1)
+// a.Greater(float64(2), float64(1))
+// a.Greater("b", "a")
+func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return Greater(a.t, e1, e2, msgAndArgs...)
+}
+
+// GreaterOrEqual asserts that the first element is greater than or equal to the second
+//
+// a.GreaterOrEqual(2, 1)
+// a.GreaterOrEqual(2, 2)
+// a.GreaterOrEqual("b", "a")
+// a.GreaterOrEqual("b", "b")
+func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return GreaterOrEqual(a.t, e1, e2, msgAndArgs...)
+}
+
+// GreaterOrEqualf asserts that the first element is greater than or equal to the second
+//
+// a.GreaterOrEqualf(2, 1, "error message %s", "formatted")
+// a.GreaterOrEqualf(2, 2, "error message %s", "formatted")
+// a.GreaterOrEqualf("b", "a", "error message %s", "formatted")
+// a.GreaterOrEqualf("b", "b", "error message %s", "formatted")
+func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return GreaterOrEqualf(a.t, e1, e2, msg, args...)
+}
+
+// Greaterf asserts that the first element is greater than the second
+//
+// a.Greaterf(2, 1, "error message %s", "formatted")
+// a.Greaterf(float64(2), float64(1), "error message %s", "formatted")
+// a.Greaterf("b", "a", "error message %s", "formatted")
+func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return Greaterf(a.t, e1, e2, msg, args...)
+}
+
// HTTPBodyContains asserts that a specified handler returns a
// body that contains a string.
//
@@ -371,7 +447,7 @@ func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url stri
//
// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
+// Returns whether the assertion was successful (true) or not (false).
func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -395,7 +471,7 @@ func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url s
//
// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
+// Returns whether the assertion was successful (true) or not (false).
func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -403,6 +479,30 @@ func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url
return HTTPRedirectf(a.t, handler, method, url, values, msg, args...)
}
+// HTTPStatusCode asserts that a specified handler returns a specified status code.
+//
+// a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501)
+//
+// Returns whether the assertion was successful (true) or not (false).
+func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return HTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...)
+}
+
+// HTTPStatusCodef asserts that a specified handler returns a specified status code.
+//
+// a.HTTPStatusCodef(myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted")
+//
+// Returns whether the assertion was successful (true) or not (false).
+func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return HTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...)
+}
+
// HTTPSuccess asserts that a specified handler returns a success status code.
//
// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil)
@@ -439,7 +539,7 @@ func (a *Assertions) Implements(interfaceObject interface{}, object interface{},
// Implementsf asserts that an object is implemented by the specified interface.
//
-// a.Implementsf((*MyInterface, "error message %s", "formatted")(nil), new(MyObject))
+// a.Implementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted")
func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -449,7 +549,7 @@ func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}
// InDelta asserts that the two numerals are within delta of each other.
//
-// a.InDelta(math.Pi, (22 / 7.0), 0.01)
+// a.InDelta(math.Pi, 22/7.0, 0.01)
func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -491,7 +591,7 @@ func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, del
// InDeltaf asserts that the two numerals are within delta of each other.
//
-// a.InDeltaf(math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01)
+// a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -589,6 +689,78 @@ func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...in
return Lenf(a.t, object, length, msg, args...)
}
+// Less asserts that the first element is less than the second
+//
+// a.Less(1, 2)
+// a.Less(float64(1), float64(2))
+// a.Less("a", "b")
+func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return Less(a.t, e1, e2, msgAndArgs...)
+}
+
+// LessOrEqual asserts that the first element is less than or equal to the second
+//
+// a.LessOrEqual(1, 2)
+// a.LessOrEqual(2, 2)
+// a.LessOrEqual("a", "b")
+// a.LessOrEqual("b", "b")
+func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return LessOrEqual(a.t, e1, e2, msgAndArgs...)
+}
+
+// LessOrEqualf asserts that the first element is less than or equal to the second
+//
+// a.LessOrEqualf(1, 2, "error message %s", "formatted")
+// a.LessOrEqualf(2, 2, "error message %s", "formatted")
+// a.LessOrEqualf("a", "b", "error message %s", "formatted")
+// a.LessOrEqualf("b", "b", "error message %s", "formatted")
+func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return LessOrEqualf(a.t, e1, e2, msg, args...)
+}
+
+// Lessf asserts that the first element is less than the second
+//
+// a.Lessf(1, 2, "error message %s", "formatted")
+// a.Lessf(float64(1), float64(2), "error message %s", "formatted")
+// a.Lessf("a", "b", "error message %s", "formatted")
+func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return Lessf(a.t, e1, e2, msg, args...)
+}
+
+// Never asserts that the given condition doesn't satisfy in waitFor time,
+// periodically checking the target function each tick.
+//
+// a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond)
+func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return Never(a.t, condition, waitFor, tick, msgAndArgs...)
+}
+
+// Neverf asserts that the given condition doesn't satisfy in waitFor time,
+// periodically checking the target function each tick.
+//
+// a.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted")
+func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return Neverf(a.t, condition, waitFor, tick, msg, args...)
+}
+
// Nil asserts that the specified object is nil.
//
// a.Nil(err)
@@ -609,6 +781,24 @@ func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) b
return Nilf(a.t, object, msg, args...)
}
+// NoDirExists checks whether a directory does not exist in the given path.
+// It fails if the path points to an existing _directory_ only.
+func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return NoDirExists(a.t, path, msgAndArgs...)
+}
+
+// NoDirExistsf checks whether a directory does not exist in the given path.
+// It fails if the path points to an existing _directory_ only.
+func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return NoDirExistsf(a.t, path, msg, args...)
+}
+
// NoError asserts that a function returned no error (i.e. `nil`).
//
// actualObj, err := SomeFunction()
@@ -635,6 +825,24 @@ func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool {
return NoErrorf(a.t, err, msg, args...)
}
+// NoFileExists checks whether a file does not exist in a given path. It fails
+// if the path points to an existing _file_ only.
+func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return NoFileExists(a.t, path, msgAndArgs...)
+}
+
+// NoFileExistsf checks whether a file does not exist in a given path. It fails
+// if the path points to an existing _file_ only.
+func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return NoFileExistsf(a.t, path, msg, args...)
+}
+
// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the
// specified substring or element.
//
@@ -700,6 +908,26 @@ func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndAr
return NotEqual(a.t, expected, actual, msgAndArgs...)
}
+// NotEqualValues asserts that two objects are not equal even when converted to the same type
+//
+// a.NotEqualValues(obj1, obj2)
+func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return NotEqualValues(a.t, expected, actual, msgAndArgs...)
+}
+
+// NotEqualValuesf asserts that two objects are not equal even when converted to the same type
+//
+// a.NotEqualValuesf(obj1, obj2, "error message %s", "formatted")
+func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return NotEqualValuesf(a.t, expected, actual, msg, args...)
+}
+
// NotEqualf asserts that the specified values are NOT equal.
//
// a.NotEqualf(obj1, obj2, "error message %s", "formatted")
@@ -766,7 +994,7 @@ func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...in
// NotRegexpf asserts that a specified regexp does not match a string.
//
-// a.NotRegexpf(regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting")
+// a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted")
// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted")
func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
@@ -775,6 +1003,32 @@ func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, arg
return NotRegexpf(a.t, rx, str, msg, args...)
}
+// NotSame asserts that two pointers do not reference the same object.
+//
+// a.NotSame(ptr1, ptr2)
+//
+// Both arguments must be pointer variables. Pointer variable sameness is
+// determined based on the equality of both type and value.
+func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return NotSame(a.t, expected, actual, msgAndArgs...)
+}
+
+// NotSamef asserts that two pointers do not reference the same object.
+//
+// a.NotSamef(ptr1, ptr2, "error message %s", "formatted")
+//
+// Both arguments must be pointer variables. Pointer variable sameness is
+// determined based on the equality of both type and value.
+func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return NotSamef(a.t, expected, actual, msg, args...)
+}
+
// NotSubset asserts that the specified list(array, slice...) contains not all
// elements given in the specified subset(array, slice...).
//
@@ -823,6 +1077,30 @@ func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool {
return Panics(a.t, f, msgAndArgs...)
}
+// PanicsWithError asserts that the code inside the specified PanicTestFunc
+// panics, and that the recovered panic value is an error that satisfies the
+// EqualError comparison.
+//
+// a.PanicsWithError("crazy error", func(){ GoCrazy() })
+func (a *Assertions) PanicsWithError(errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return PanicsWithError(a.t, errString, f, msgAndArgs...)
+}
+
+// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc
+// panics, and that the recovered panic value is an error that satisfies the
+// EqualError comparison.
+//
+// a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
+func (a *Assertions) PanicsWithErrorf(errString string, f PanicTestFunc, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return PanicsWithErrorf(a.t, errString, f, msg, args...)
+}
+
// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that
// the recovered panic value equals the expected panic value.
//
@@ -868,7 +1146,7 @@ func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...inter
// Regexpf asserts that a specified regexp matches a string.
//
-// a.Regexpf(regexp.MustCompile("start", "error message %s", "formatted"), "it's starting")
+// a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted")
// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted")
func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
@@ -877,6 +1155,32 @@ func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args .
return Regexpf(a.t, rx, str, msg, args...)
}
+// Same asserts that two pointers reference the same object.
+//
+// a.Same(ptr1, ptr2)
+//
+// Both arguments must be pointer variables. Pointer variable sameness is
+// determined based on the equality of both type and value.
+func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return Same(a.t, expected, actual, msgAndArgs...)
+}
+
+// Samef asserts that two pointers reference the same object.
+//
+// a.Samef(ptr1, ptr2, "error message %s", "formatted")
+//
+// Both arguments must be pointer variables. Pointer variable sameness is
+// determined based on the equality of both type and value.
+func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return Samef(a.t, expected, actual, msg, args...)
+}
+
// Subset asserts that the specified list(array, slice...) contains all
// elements given in the specified subset(array, slice...).
//
@@ -939,6 +1243,22 @@ func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta
return WithinDurationf(a.t, expected, actual, delta, msg, args...)
}
+// YAMLEq asserts that two YAML strings are equivalent.
+func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return YAMLEq(a.t, expected, actual, msgAndArgs...)
+}
+
+// YAMLEqf asserts that two YAML strings are equivalent.
+func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return YAMLEqf(a.t, expected, actual, msg, args...)
+}
+
// Zero asserts that i is the zero value for its type.
func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
diff --git a/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/testify/assert/assertions.go
index 5bdec56c..914a10d8 100644
--- a/vendor/github.com/stretchr/testify/assert/assertions.go
+++ b/vendor/github.com/stretchr/testify/assert/assertions.go
@@ -11,6 +11,7 @@ import (
"reflect"
"regexp"
"runtime"
+ "runtime/debug"
"strings"
"time"
"unicode"
@@ -18,9 +19,10 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/pmezard/go-difflib/difflib"
+ yaml "gopkg.in/yaml.v3"
)
-//go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_format.go.tmpl
+//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl"
// TestingT is an interface wrapper around *testing.T
type TestingT interface {
@@ -39,11 +41,11 @@ type ValueAssertionFunc func(TestingT, interface{}, ...interface{}) bool
// for table driven tests.
type BoolAssertionFunc func(TestingT, bool, ...interface{}) bool
-// ValuesAssertionFunc is a common function prototype when validating an error value. Can be useful
+// ErrorAssertionFunc is a common function prototype when validating an error value. Can be useful
// for table driven tests.
type ErrorAssertionFunc func(TestingT, error, ...interface{}) bool
-// Comparison a custom function that returns true on success and false on failure
+// Comparison is a custom function that returns true on success and false on failure
type Comparison func() (success bool)
/*
@@ -102,11 +104,11 @@ the problem actually occurred in calling code.*/
// failed.
func CallerInfo() []string {
- pc := uintptr(0)
- file := ""
- line := 0
- ok := false
- name := ""
+ var pc uintptr
+ var ok bool
+ var file string
+ var line int
+ var name string
callers := []string{}
for i := 0; ; i++ {
@@ -179,7 +181,11 @@ func messageFromMsgAndArgs(msgAndArgs ...interface{}) string {
return ""
}
if len(msgAndArgs) == 1 {
- return msgAndArgs[0].(string)
+ msg := msgAndArgs[0]
+ if msgAsStr, ok := msg.(string); ok {
+ return msgAsStr
+ }
+ return fmt.Sprintf("%+v", msg)
}
if len(msgAndArgs) > 1 {
return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...)
@@ -346,6 +352,75 @@ func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{})
}
+// validateEqualArgs checks whether provided arguments can be safely used in the
+// Equal/NotEqual functions.
+func validateEqualArgs(expected, actual interface{}) error {
+ if expected == nil && actual == nil {
+ return nil
+ }
+
+ if isFunction(expected) || isFunction(actual) {
+ return errors.New("cannot take func type as argument")
+ }
+ return nil
+}
+
+// Same asserts that two pointers reference the same object.
+//
+// assert.Same(t, ptr1, ptr2)
+//
+// Both arguments must be pointer variables. Pointer variable sameness is
+// determined based on the equality of both type and value.
+func Same(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+
+ if !samePointers(expected, actual) {
+ return Fail(t, fmt.Sprintf("Not same: \n"+
+ "expected: %p %#v\n"+
+ "actual : %p %#v", expected, expected, actual, actual), msgAndArgs...)
+ }
+
+ return true
+}
+
+// NotSame asserts that two pointers do not reference the same object.
+//
+// assert.NotSame(t, ptr1, ptr2)
+//
+// Both arguments must be pointer variables. Pointer variable sameness is
+// determined based on the equality of both type and value.
+func NotSame(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+
+ if samePointers(expected, actual) {
+ return Fail(t, fmt.Sprintf(
+ "Expected and actual point to the same object: %p %#v",
+ expected, expected), msgAndArgs...)
+ }
+ return true
+}
+
+// samePointers compares two generic interface objects and returns whether
+// they point to the same object
+func samePointers(first, second interface{}) bool {
+ firstPtr, secondPtr := reflect.ValueOf(first), reflect.ValueOf(second)
+ if firstPtr.Kind() != reflect.Ptr || secondPtr.Kind() != reflect.Ptr {
+ return false
+ }
+
+ firstType, secondType := reflect.TypeOf(first), reflect.TypeOf(second)
+ if firstType != secondType {
+ return false
+ }
+
+ // compare pointer addresses
+ return first == second
+}
+
// formatUnequalValues takes two values of arbitrary types and returns string
// representations appropriate to be presented to the user.
//
@@ -354,12 +429,27 @@ func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{})
// to a type conversion in the Go grammar.
func formatUnequalValues(expected, actual interface{}) (e string, a string) {
if reflect.TypeOf(expected) != reflect.TypeOf(actual) {
- return fmt.Sprintf("%T(%#v)", expected, expected),
- fmt.Sprintf("%T(%#v)", actual, actual)
+ return fmt.Sprintf("%T(%s)", expected, truncatingFormat(expected)),
+ fmt.Sprintf("%T(%s)", actual, truncatingFormat(actual))
+ }
+ switch expected.(type) {
+ case time.Duration:
+ return fmt.Sprintf("%v", expected), fmt.Sprintf("%v", actual)
}
+ return truncatingFormat(expected), truncatingFormat(actual)
+}
- return fmt.Sprintf("%#v", expected),
- fmt.Sprintf("%#v", actual)
+// truncatingFormat formats the data and truncates it if it's too long.
+//
+// This helps keep formatted error messages lines from exceeding the
+// bufio.MaxScanTokenSize max line length that the go testing framework imposes.
+func truncatingFormat(data interface{}) string {
+ value := fmt.Sprintf("%#v", data)
+ max := bufio.MaxScanTokenSize - 100 // Give us some space the type info too if needed.
+ if len(value) > max {
+ value = value[0:max] + "<... truncated>"
+ }
+ return value
}
// EqualValues asserts that two objects are equal or convertable to the same types
@@ -406,15 +496,26 @@ func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}
//
// assert.NotNil(t, err)
func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
- if h, ok := t.(tHelper); ok {
- h.Helper()
- }
if !isNil(object) {
return true
}
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
return Fail(t, "Expected value not to be nil.", msgAndArgs...)
}
+// containsKind checks if a specified kind in the slice of kinds.
+func containsKind(kinds []reflect.Kind, kind reflect.Kind) bool {
+ for i := 0; i < len(kinds); i++ {
+ if kind == kinds[i] {
+ return true
+ }
+ }
+
+ return false
+}
+
// isNil checks if a specified object is nil or not, without Failing.
func isNil(object interface{}) bool {
if object == nil {
@@ -423,7 +524,14 @@ func isNil(object interface{}) bool {
value := reflect.ValueOf(object)
kind := value.Kind()
- if kind >= reflect.Chan && kind <= reflect.Slice && value.IsNil() {
+ isNilableKind := containsKind(
+ []reflect.Kind{
+ reflect.Chan, reflect.Func,
+ reflect.Interface, reflect.Map,
+ reflect.Ptr, reflect.Slice},
+ kind)
+
+ if isNilableKind && value.IsNil() {
return true
}
@@ -434,12 +542,12 @@ func isNil(object interface{}) bool {
//
// assert.Nil(t, err)
func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
- if h, ok := t.(tHelper); ok {
- h.Helper()
- }
if isNil(object) {
return true
}
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
return Fail(t, fmt.Sprintf("Expected nil, but got: %#v", object), msgAndArgs...)
}
@@ -457,14 +565,14 @@ func isEmpty(object interface{}) bool {
// collection types are empty when they have no element
case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
return objValue.Len() == 0
- // pointers are empty if nil or if the value they point to is empty
+ // pointers are empty if nil or if the value they point to is empty
case reflect.Ptr:
if objValue.IsNil() {
return true
}
deref := objValue.Elem().Interface()
return isEmpty(deref)
- // for all other types, compare against the zero value
+ // for all other types, compare against the zero value
default:
zero := reflect.Zero(objValue.Type())
return reflect.DeepEqual(object, zero.Interface())
@@ -476,12 +584,11 @@ func isEmpty(object interface{}) bool {
//
// assert.Empty(t, obj)
func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
- if h, ok := t.(tHelper); ok {
- h.Helper()
- }
-
pass := isEmpty(object)
if !pass {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
Fail(t, fmt.Sprintf("Should be empty, but was %v", object), msgAndArgs...)
}
@@ -496,12 +603,11 @@ func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
// assert.Equal(t, "two", obj[1])
// }
func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
- if h, ok := t.(tHelper); ok {
- h.Helper()
- }
-
pass := !isEmpty(object)
if !pass {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
Fail(t, fmt.Sprintf("Should NOT be empty, but was %v", object), msgAndArgs...)
}
@@ -544,16 +650,10 @@ func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{})
//
// assert.True(t, myBool)
func True(t TestingT, value bool, msgAndArgs ...interface{}) bool {
- if h, ok := t.(tHelper); ok {
- h.Helper()
- }
- if h, ok := t.(interface {
- Helper()
- }); ok {
- h.Helper()
- }
-
- if value != true {
+ if !value {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
return Fail(t, "Should be true", msgAndArgs...)
}
@@ -565,11 +665,10 @@ func True(t TestingT, value bool, msgAndArgs ...interface{}) bool {
//
// assert.False(t, myBool)
func False(t TestingT, value bool, msgAndArgs ...interface{}) bool {
- if h, ok := t.(tHelper); ok {
- h.Helper()
- }
-
- if value != false {
+ if value {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
return Fail(t, "Should be false", msgAndArgs...)
}
@@ -600,6 +699,21 @@ func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{
}
+// NotEqualValues asserts that two objects are not equal even when converted to the same type
+//
+// assert.NotEqualValues(t, obj1, obj2)
+func NotEqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+
+ if ObjectsAreEqualValues(expected, actual) {
+ return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...)
+ }
+
+ return true
+}
+
// containsElement try loop over the list check if the list includes the element.
// return (false, false) if impossible.
// return (true, false) if element was not found.
@@ -607,7 +721,7 @@ func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{
func includeElement(list interface{}, element interface{}) (ok, found bool) {
listValue := reflect.ValueOf(list)
- elementValue := reflect.ValueOf(element)
+ listKind := reflect.TypeOf(list).Kind()
defer func() {
if e := recover(); e != nil {
ok = false
@@ -615,11 +729,12 @@ func includeElement(list interface{}, element interface{}) (ok, found bool) {
}
}()
- if reflect.TypeOf(list).Kind() == reflect.String {
+ if listKind == reflect.String {
+ elementValue := reflect.ValueOf(element)
return true, strings.Contains(listValue.String(), elementValue.String())
}
- if reflect.TypeOf(list).Kind() == reflect.Map {
+ if listKind == reflect.Map {
mapKeys := listValue.MapKeys()
for i := 0; i < len(mapKeys); i++ {
if ObjectsAreEqual(mapKeys[i].Interface(), element) {
@@ -651,10 +766,10 @@ func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bo
ok, found := includeElement(s, contains)
if !ok {
- return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", s), msgAndArgs...)
+ return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", s), msgAndArgs...)
}
if !found {
- return Fail(t, fmt.Sprintf("\"%s\" does not contain \"%s\"", s, contains), msgAndArgs...)
+ return Fail(t, fmt.Sprintf("%#v does not contain %#v", s, contains), msgAndArgs...)
}
return true
@@ -785,27 +900,39 @@ func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface
return true
}
- aKind := reflect.TypeOf(listA).Kind()
- bKind := reflect.TypeOf(listB).Kind()
+ if !isList(t, listA, msgAndArgs...) || !isList(t, listB, msgAndArgs...) {
+ return false
+ }
+
+ extraA, extraB := diffLists(listA, listB)
- if aKind != reflect.Array && aKind != reflect.Slice {
- return Fail(t, fmt.Sprintf("%q has an unsupported type %s", listA, aKind), msgAndArgs...)
+ if len(extraA) == 0 && len(extraB) == 0 {
+ return true
}
- if bKind != reflect.Array && bKind != reflect.Slice {
- return Fail(t, fmt.Sprintf("%q has an unsupported type %s", listB, bKind), msgAndArgs...)
+ return Fail(t, formatListDiff(listA, listB, extraA, extraB), msgAndArgs...)
+}
+
+// isList checks that the provided value is array or slice.
+func isList(t TestingT, list interface{}, msgAndArgs ...interface{}) (ok bool) {
+ kind := reflect.TypeOf(list).Kind()
+ if kind != reflect.Array && kind != reflect.Slice {
+ return Fail(t, fmt.Sprintf("%q has an unsupported type %s, expecting array or slice", list, kind),
+ msgAndArgs...)
}
+ return true
+}
+// diffLists diffs two arrays/slices and returns slices of elements that are only in A and only in B.
+// If some element is present multiple times, each instance is counted separately (e.g. if something is 2x in A and
+// 5x in B, it will be 0x in extraA and 3x in extraB). The order of items in both lists is ignored.
+func diffLists(listA, listB interface{}) (extraA, extraB []interface{}) {
aValue := reflect.ValueOf(listA)
bValue := reflect.ValueOf(listB)
aLen := aValue.Len()
bLen := bValue.Len()
- if aLen != bLen {
- return Fail(t, fmt.Sprintf("lengths don't match: %d != %d", aLen, bLen), msgAndArgs...)
- }
-
// Mark indexes in bValue that we already used
visited := make([]bool, bLen)
for i := 0; i < aLen; i++ {
@@ -822,11 +949,38 @@ func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface
}
}
if !found {
- return Fail(t, fmt.Sprintf("element %s appears more times in %s than in %s", element, aValue, bValue), msgAndArgs...)
+ extraA = append(extraA, element)
}
}
- return true
+ for j := 0; j < bLen; j++ {
+ if visited[j] {
+ continue
+ }
+ extraB = append(extraB, bValue.Index(j).Interface())
+ }
+
+ return
+}
+
+func formatListDiff(listA, listB interface{}, extraA, extraB []interface{}) string {
+ var msg bytes.Buffer
+
+ msg.WriteString("elements differ")
+ if len(extraA) > 0 {
+ msg.WriteString("\n\nextra elements in list A:\n")
+ msg.WriteString(spewConfig.Sdump(extraA))
+ }
+ if len(extraB) > 0 {
+ msg.WriteString("\n\nextra elements in list B:\n")
+ msg.WriteString(spewConfig.Sdump(extraB))
+ }
+ msg.WriteString("\n\nlistA:\n")
+ msg.WriteString(spewConfig.Sdump(listA))
+ msg.WriteString("\n\nlistB:\n")
+ msg.WriteString(spewConfig.Sdump(listB))
+
+ return msg.String()
}
// Condition uses a Comparison to assert a complex condition.
@@ -846,15 +1000,17 @@ func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool {
type PanicTestFunc func()
// didPanic returns true if the function passed to it panics. Otherwise, it returns false.
-func didPanic(f PanicTestFunc) (bool, interface{}) {
+func didPanic(f PanicTestFunc) (bool, interface{}, string) {
didPanic := false
var message interface{}
+ var stack string
func() {
defer func() {
if message = recover(); message != nil {
didPanic = true
+ stack = string(debug.Stack())
}
}()
@@ -863,7 +1019,7 @@ func didPanic(f PanicTestFunc) (bool, interface{}) {
}()
- return didPanic, message
+ return didPanic, message, stack
}
@@ -875,7 +1031,7 @@ func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool {
h.Helper()
}
- if funcDidPanic, panicValue := didPanic(f); !funcDidPanic {
+ if funcDidPanic, panicValue, _ := didPanic(f); !funcDidPanic {
return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...)
}
@@ -891,12 +1047,34 @@ func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndAr
h.Helper()
}
- funcDidPanic, panicValue := didPanic(f)
+ funcDidPanic, panicValue, panickedStack := didPanic(f)
if !funcDidPanic {
return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...)
}
if panicValue != expected {
- return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%#v\n\tPanic value:\t%#v", f, expected, panicValue), msgAndArgs...)
+ return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%#v\n\tPanic value:\t%#v\n\tPanic stack:\t%s", f, expected, panicValue, panickedStack), msgAndArgs...)
+ }
+
+ return true
+}
+
+// PanicsWithError asserts that the code inside the specified PanicTestFunc
+// panics, and that the recovered panic value is an error that satisfies the
+// EqualError comparison.
+//
+// assert.PanicsWithError(t, "crazy error", func(){ GoCrazy() })
+func PanicsWithError(t TestingT, errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+
+ funcDidPanic, panicValue, panickedStack := didPanic(f)
+ if !funcDidPanic {
+ return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...)
+ }
+ panicErr, ok := panicValue.(error)
+ if !ok || panicErr.Error() != errString {
+ return Fail(t, fmt.Sprintf("func %#v should panic with error message:\t%#v\n\tPanic value:\t%#v\n\tPanic stack:\t%s", f, errString, panicValue, panickedStack), msgAndArgs...)
}
return true
@@ -910,8 +1088,8 @@ func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool {
h.Helper()
}
- if funcDidPanic, panicValue := didPanic(f); funcDidPanic {
- return Fail(t, fmt.Sprintf("func %#v should not panic\n\tPanic value:\t%v", f, panicValue), msgAndArgs...)
+ if funcDidPanic, panicValue, panickedStack := didPanic(f); funcDidPanic {
+ return Fail(t, fmt.Sprintf("func %#v should not panic\n\tPanic value:\t%v\n\tPanic stack:\t%s", f, panicValue, panickedStack), msgAndArgs...)
}
return true
@@ -938,6 +1116,8 @@ func toFloat(x interface{}) (float64, bool) {
xok := true
switch xn := x.(type) {
+ case uint:
+ xf = float64(xn)
case uint8:
xf = float64(xn)
case uint16:
@@ -959,7 +1139,7 @@ func toFloat(x interface{}) (float64, bool) {
case float32:
xf = float64(xn)
case float64:
- xf = float64(xn)
+ xf = xn
case time.Duration:
xf = float64(xn)
default:
@@ -971,7 +1151,7 @@ func toFloat(x interface{}) (float64, bool) {
// InDelta asserts that the two numerals are within delta of each other.
//
-// assert.InDelta(t, math.Pi, (22 / 7.0), 0.01)
+// assert.InDelta(t, math.Pi, 22/7.0, 0.01)
func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -1073,6 +1253,9 @@ func calcRelativeError(expected, actual interface{}) (float64, error) {
if !aok {
return 0, fmt.Errorf("expected value %q cannot be converted to float", expected)
}
+ if math.IsNaN(af) {
+ return 0, errors.New("expected value must not be NaN")
+ }
if af == 0 {
return 0, fmt.Errorf("expected value must have a value other than zero to calculate the relative error")
}
@@ -1080,6 +1263,9 @@ func calcRelativeError(expected, actual interface{}) (float64, error) {
if !bok {
return 0, fmt.Errorf("actual value %q cannot be converted to float", actual)
}
+ if math.IsNaN(bf) {
+ return 0, errors.New("actual value must not be NaN")
+ }
return math.Abs(af-bf) / math.Abs(af), nil
}
@@ -1089,6 +1275,9 @@ func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAnd
if h, ok := t.(tHelper); ok {
h.Helper()
}
+ if math.IsNaN(epsilon) {
+ return Fail(t, "epsilon must not be NaN")
+ }
actualEpsilon, err := calcRelativeError(expected, actual)
if err != nil {
return Fail(t, err.Error(), msgAndArgs...)
@@ -1136,10 +1325,10 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
// assert.Equal(t, expectedObj, actualObj)
// }
func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool {
- if h, ok := t.(tHelper); ok {
- h.Helper()
- }
if err != nil {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
return Fail(t, fmt.Sprintf("Received unexpected error:\n%+v", err), msgAndArgs...)
}
@@ -1153,11 +1342,10 @@ func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool {
// assert.Equal(t, expectedError, err)
// }
func Error(t TestingT, err error, msgAndArgs ...interface{}) bool {
- if h, ok := t.(tHelper); ok {
- h.Helper()
- }
-
if err == nil {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
return Fail(t, "An error is expected but got nil.", msgAndArgs...)
}
@@ -1259,7 +1447,8 @@ func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool {
return true
}
-// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
+// FileExists checks whether a file exists in the given path. It also fails if
+// the path points to a directory or there is an error when trying to check the file.
func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -1277,7 +1466,24 @@ func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
return true
}
-// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
+// NoFileExists checks whether a file does not exist in a given path. It fails
+// if the path points to an existing _file_ only.
+func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ info, err := os.Lstat(path)
+ if err != nil {
+ return true
+ }
+ if info.IsDir() {
+ return true
+ }
+ return Fail(t, fmt.Sprintf("file %q exists", path), msgAndArgs...)
+}
+
+// DirExists checks whether a directory exists in the given path. It also fails
+// if the path is a file rather a directory or there is an error checking whether it exists.
func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -1295,6 +1501,25 @@ func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
return true
}
+// NoDirExists checks whether a directory does not exist in the given path.
+// It fails if the path points to an existing _directory_ only.
+func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ info, err := os.Lstat(path)
+ if err != nil {
+ if os.IsNotExist(err) {
+ return true
+ }
+ return true
+ }
+ if !info.IsDir() {
+ return true
+ }
+ return Fail(t, fmt.Sprintf("directory %q exists", path), msgAndArgs...)
+}
+
// JSONEq asserts that two JSON strings are equivalent.
//
// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
@@ -1315,6 +1540,24 @@ func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{
return Equal(t, expectedJSONAsInterface, actualJSONAsInterface, msgAndArgs...)
}
+// YAMLEq asserts that two YAML strings are equivalent.
+func YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ var expectedYAMLAsInterface, actualYAMLAsInterface interface{}
+
+ if err := yaml.Unmarshal([]byte(expected), &expectedYAMLAsInterface); err != nil {
+ return Fail(t, fmt.Sprintf("Expected value ('%s') is not valid yaml.\nYAML parsing error: '%s'", expected, err.Error()), msgAndArgs...)
+ }
+
+ if err := yaml.Unmarshal([]byte(actual), &actualYAMLAsInterface); err != nil {
+ return Fail(t, fmt.Sprintf("Input ('%s') needs to be valid yaml.\nYAML error: '%s'", actual, err.Error()), msgAndArgs...)
+ }
+
+ return Equal(t, expectedYAMLAsInterface, actualYAMLAsInterface, msgAndArgs...)
+}
+
func typeAndKind(v interface{}) (reflect.Type, reflect.Kind) {
t := reflect.TypeOf(v)
k := t.Kind()
@@ -1327,7 +1570,7 @@ func typeAndKind(v interface{}) (reflect.Type, reflect.Kind) {
}
// diff returns a diff of both values as long as both are of the same type and
-// are a struct, map, slice or array. Otherwise it returns an empty string.
+// are a struct, map, slice, array or string. Otherwise it returns an empty string.
func diff(expected interface{}, actual interface{}) string {
if expected == nil || actual == nil {
return ""
@@ -1345,12 +1588,12 @@ func diff(expected interface{}, actual interface{}) string {
}
var e, a string
- if ek != reflect.String {
+ if et != reflect.TypeOf("") {
e = spewConfig.Sdump(expected)
a = spewConfig.Sdump(actual)
} else {
- e = expected.(string)
- a = actual.(string)
+ e = reflect.ValueOf(expected).String()
+ a = reflect.ValueOf(actual).String()
}
diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{
@@ -1366,15 +1609,6 @@ func diff(expected interface{}, actual interface{}) string {
return "\n\nDiff:\n" + diff
}
-// validateEqualArgs checks whether provided arguments can be safely used in the
-// Equal/NotEqual functions.
-func validateEqualArgs(expected, actual interface{}) error {
- if isFunction(expected) || isFunction(actual) {
- return errors.New("cannot take func type as argument")
- }
- return nil
-}
-
func isFunction(arg interface{}) bool {
if arg == nil {
return false
@@ -1387,8 +1621,75 @@ var spewConfig = spew.ConfigState{
DisablePointerAddresses: true,
DisableCapacities: true,
SortKeys: true,
+ DisableMethods: true,
}
type tHelper interface {
Helper()
}
+
+// Eventually asserts that given condition will be met in waitFor time,
+// periodically checking target function each tick.
+//
+// assert.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond)
+func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+
+ ch := make(chan bool, 1)
+
+ timer := time.NewTimer(waitFor)
+ defer timer.Stop()
+
+ ticker := time.NewTicker(tick)
+ defer ticker.Stop()
+
+ for tick := ticker.C; ; {
+ select {
+ case <-timer.C:
+ return Fail(t, "Condition never satisfied", msgAndArgs...)
+ case <-tick:
+ tick = nil
+ go func() { ch <- condition() }()
+ case v := <-ch:
+ if v {
+ return true
+ }
+ tick = ticker.C
+ }
+ }
+}
+
+// Never asserts that the given condition doesn't satisfy in waitFor time,
+// periodically checking the target function each tick.
+//
+// assert.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond)
+func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+
+ ch := make(chan bool, 1)
+
+ timer := time.NewTimer(waitFor)
+ defer timer.Stop()
+
+ ticker := time.NewTicker(tick)
+ defer ticker.Stop()
+
+ for tick := ticker.C; ; {
+ select {
+ case <-timer.C:
+ return true
+ case <-tick:
+ tick = nil
+ go func() { ch <- condition() }()
+ case v := <-ch:
+ if v {
+ return Fail(t, "Condition satisfied", msgAndArgs...)
+ }
+ tick = ticker.C
+ }
+ }
+}
diff --git a/vendor/github.com/stretchr/testify/assert/forward_assertions.go b/vendor/github.com/stretchr/testify/assert/forward_assertions.go
index 9ad56851..df189d23 100644
--- a/vendor/github.com/stretchr/testify/assert/forward_assertions.go
+++ b/vendor/github.com/stretchr/testify/assert/forward_assertions.go
@@ -13,4 +13,4 @@ func New(t TestingT) *Assertions {
}
}
-//go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs
+//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs"
diff --git a/vendor/github.com/stretchr/testify/assert/http_assertions.go b/vendor/github.com/stretchr/testify/assert/http_assertions.go
index df46fa77..4ed341dd 100644
--- a/vendor/github.com/stretchr/testify/assert/http_assertions.go
+++ b/vendor/github.com/stretchr/testify/assert/http_assertions.go
@@ -33,7 +33,6 @@ func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, value
code, err := httpCode(handler, method, url, values)
if err != nil {
Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
- return false
}
isSuccessCode := code >= http.StatusOK && code <= http.StatusPartialContent
@@ -56,7 +55,6 @@ func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, valu
code, err := httpCode(handler, method, url, values)
if err != nil {
Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
- return false
}
isRedirectCode := code >= http.StatusMultipleChoices && code <= http.StatusTemporaryRedirect
@@ -79,7 +77,6 @@ func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values
code, err := httpCode(handler, method, url, values)
if err != nil {
Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
- return false
}
isErrorCode := code >= http.StatusBadRequest
@@ -90,6 +87,28 @@ func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values
return isErrorCode
}
+// HTTPStatusCode asserts that a specified handler returns a specified status code.
+//
+// assert.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501)
+//
+// Returns whether the assertion was successful (true) or not (false).
+func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ code, err := httpCode(handler, method, url, values)
+ if err != nil {
+ Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
+ }
+
+ successful := code == statuscode
+ if !successful {
+ Fail(t, fmt.Sprintf("Expected HTTP status code %d for %q but received %d", statuscode, url+"?"+values.Encode(), code))
+ }
+
+ return successful
+}
+
// HTTPBody is a helper that returns HTTP body of the response. It returns
// empty string if building a new request fails.
func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string {
diff --git a/vendor/golang.org/x/crypto/blowfish/cipher.go b/vendor/golang.org/x/crypto/blowfish/cipher.go
index 2641dadd..213bf204 100644
--- a/vendor/golang.org/x/crypto/blowfish/cipher.go
+++ b/vendor/golang.org/x/crypto/blowfish/cipher.go
@@ -3,6 +3,14 @@
// license that can be found in the LICENSE file.
// Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
+//
+// Blowfish is a legacy cipher and its short block size makes it vulnerable to
+// birthday bound attacks (see https://sweet32.info). It should only be used
+// where compatibility with legacy systems, not security, is the goal.
+//
+// Deprecated: any new system should use AES (from crypto/aes, if necessary in
+// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
+// golang.org/x/crypto/chacha20poly1305).
package blowfish // import "golang.org/x/crypto/blowfish"
// The code is a port of Bruce Schneier's C implementation.
diff --git a/vendor/gopkg.in/mgo.v2/bson/bson.go b/vendor/gopkg.in/mgo.v2/bson/bson.go
index 7fb7f8ca..90ec7e8a 100644
--- a/vendor/gopkg.in/mgo.v2/bson/bson.go
+++ b/vendor/gopkg.in/mgo.v2/bson/bson.go
@@ -35,13 +35,11 @@ package bson
import (
"bytes"
"crypto/md5"
- "crypto/rand"
"encoding/binary"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
- "io"
"os"
"reflect"
"runtime"
@@ -194,12 +192,10 @@ var objectIdCounter uint32 = readRandomUint32()
// readRandomUint32 returns a random objectIdCounter.
func readRandomUint32() uint32 {
- var b [4]byte
- _, err := io.ReadFull(rand.Reader, b[:])
- if err != nil {
- panic(fmt.Errorf("cannot read random object id: %v", err))
- }
- return uint32((uint32(b[0]) << 0) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24))
+ // We've found systems hanging in this function due to lack of entropy.
+ // The randomness of these bytes is just preventing nearby clashes, so
+ // just look at the time.
+ return uint32(time.Now().UnixNano())
}
// machineId stores machine id generated once and used in subsequent calls
@@ -214,10 +210,10 @@ func readMachineId() []byte {
id := sum[:]
hostname, err1 := os.Hostname()
if err1 != nil {
- _, err2 := io.ReadFull(rand.Reader, id)
- if err2 != nil {
- panic(fmt.Errorf("cannot get hostname: %v; %v", err1, err2))
- }
+ n := uint32(time.Now().UnixNano())
+ sum[0] = byte(n >> 0)
+ sum[1] = byte(n >> 8)
+ sum[2] = byte(n >> 16)
return id
}
hw := md5.New()
@@ -279,7 +275,7 @@ var nullBytes = []byte("null")
func (id *ObjectId) UnmarshalJSON(data []byte) error {
if len(data) > 0 && (data[0] == '{' || data[0] == 'O') {
var v struct {
- Id json.RawMessage `json:"$oid"`
+ Id json.RawMessage `json:"$oid"`
Func struct {
Id json.RawMessage
} `json:"$oidFunc"`
diff --git a/vendor/gopkg.in/mgo.v2/doc.go b/vendor/gopkg.in/mgo.v2/doc.go
index 859fd9b8..12c8db55 100644
--- a/vendor/gopkg.in/mgo.v2/doc.go
+++ b/vendor/gopkg.in/mgo.v2/doc.go
@@ -1,9 +1,12 @@
// Package mgo offers a rich MongoDB driver for Go.
//
-// Details about the mgo project (pronounced as "mango") are found
-// in its web page:
+// #########################################################
//
-// http://labix.org/mgo
+// THIS DRIVER IS UNMAINTAINED! See here for details:
+//
+// https://github.com/go-mgo/mgo/blob/v2-unstable/README.md
+//
+// #########################################################
//
// Usage of the driver revolves around the concept of sessions. To
// get started, obtain a session using the Dial function:
diff --git a/vendor/gopkg.in/mgo.v2/gridfs.go b/vendor/gopkg.in/mgo.v2/gridfs.go
index 42147209..2db86062 100644
--- a/vendor/gopkg.in/mgo.v2/gridfs.go
+++ b/vendor/gopkg.in/mgo.v2/gridfs.go
@@ -657,7 +657,7 @@ func (file *GridFile) insertChunk(data []byte) {
// an error, if any.
func (file *GridFile) Seek(offset int64, whence int) (pos int64, err error) {
file.m.Lock()
- debugf("GridFile %p: seeking for %s (whence=%d)", file, offset, whence)
+ debugf("GridFile %p: seeking for %d (whence=%d)", file, offset, whence)
defer file.m.Unlock()
switch whence {
case os.SEEK_SET:
diff --git a/vendor/gopkg.in/mgo.v2/session.go b/vendor/gopkg.in/mgo.v2/session.go
index 3dccf364..1f2209eb 100644
--- a/vendor/gopkg.in/mgo.v2/session.go
+++ b/vendor/gopkg.in/mgo.v2/session.go
@@ -3268,7 +3268,7 @@ func (db *Database) run(socket *mongoSocket, cmd, result interface{}) (err error
if result != nil {
err = bson.Unmarshal(data, result)
if err != nil {
- debugf("Run command unmarshaling failed: %#v", op, err)
+ debugf("Run command unmarshaling: %#v, error: %#v", op, err)
return err
}
if globalDebug && globalLogger != nil {
diff --git a/vendor/gopkg.in/yaml.v2/apic.go b/vendor/gopkg.in/yaml.v2/apic.go
index 1f7e87e6..d2c2308f 100644
--- a/vendor/gopkg.in/yaml.v2/apic.go
+++ b/vendor/gopkg.in/yaml.v2/apic.go
@@ -86,6 +86,7 @@ func yaml_emitter_initialize(emitter *yaml_emitter_t) {
raw_buffer: make([]byte, 0, output_raw_buffer_size),
states: make([]yaml_emitter_state_t, 0, initial_stack_size),
events: make([]yaml_event_t, 0, initial_queue_size),
+ best_width: -1,
}
}
diff --git a/vendor/gopkg.in/yaml.v2/decode.go b/vendor/gopkg.in/yaml.v2/decode.go
index e4e56e28..129bc2a9 100644
--- a/vendor/gopkg.in/yaml.v2/decode.go
+++ b/vendor/gopkg.in/yaml.v2/decode.go
@@ -229,6 +229,10 @@ type decoder struct {
mapType reflect.Type
terrors []string
strict bool
+
+ decodeCount int
+ aliasCount int
+ aliasDepth int
}
var (
@@ -314,7 +318,43 @@ func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect.Value, unm
return out, false, false
}
+const (
+ // 400,000 decode operations is ~500kb of dense object declarations, or
+ // ~5kb of dense object declarations with 10000% alias expansion
+ alias_ratio_range_low = 400000
+
+ // 4,000,000 decode operations is ~5MB of dense object declarations, or
+ // ~4.5MB of dense object declarations with 10% alias expansion
+ alias_ratio_range_high = 4000000
+
+ // alias_ratio_range is the range over which we scale allowed alias ratios
+ alias_ratio_range = float64(alias_ratio_range_high - alias_ratio_range_low)
+)
+
+func allowedAliasRatio(decodeCount int) float64 {
+ switch {
+ case decodeCount <= alias_ratio_range_low:
+ // allow 99% to come from alias expansion for small-to-medium documents
+ return 0.99
+ case decodeCount >= alias_ratio_range_high:
+ // allow 10% to come from alias expansion for very large documents
+ return 0.10
+ default:
+ // scale smoothly from 99% down to 10% over the range.
+ // this maps to 396,000 - 400,000 allowed alias-driven decodes over the range.
+ // 400,000 decode operations is ~100MB of allocations in worst-case scenarios (single-item maps).
+ return 0.99 - 0.89*(float64(decodeCount-alias_ratio_range_low)/alias_ratio_range)
+ }
+}
+
func (d *decoder) unmarshal(n *node, out reflect.Value) (good bool) {
+ d.decodeCount++
+ if d.aliasDepth > 0 {
+ d.aliasCount++
+ }
+ if d.aliasCount > 100 && d.decodeCount > 1000 && float64(d.aliasCount)/float64(d.decodeCount) > allowedAliasRatio(d.decodeCount) {
+ failf("document contains excessive aliasing")
+ }
switch n.kind {
case documentNode:
return d.document(n, out)
@@ -353,7 +393,9 @@ func (d *decoder) alias(n *node, out reflect.Value) (good bool) {
failf("anchor '%s' value contains itself", n.value)
}
d.aliases[n] = true
+ d.aliasDepth++
good = d.unmarshal(n.alias, out)
+ d.aliasDepth--
delete(d.aliases, n)
return good
}
@@ -746,8 +788,7 @@ func (d *decoder) merge(n *node, out reflect.Value) {
case mappingNode:
d.unmarshal(n, out)
case aliasNode:
- an, ok := d.doc.anchors[n.value]
- if ok && an.kind != mappingNode {
+ if n.alias != nil && n.alias.kind != mappingNode {
failWantMap()
}
d.unmarshal(n, out)
@@ -756,8 +797,7 @@ func (d *decoder) merge(n *node, out reflect.Value) {
for i := len(n.children) - 1; i >= 0; i-- {
ni := n.children[i]
if ni.kind == aliasNode {
- an, ok := d.doc.anchors[ni.value]
- if ok && an.kind != mappingNode {
+ if ni.alias != nil && ni.alias.kind != mappingNode {
failWantMap()
}
} else if ni.kind != mappingNode {
diff --git a/vendor/gopkg.in/yaml.v2/encode.go b/vendor/gopkg.in/yaml.v2/encode.go
index a14435e8..0ee738e1 100644
--- a/vendor/gopkg.in/yaml.v2/encode.go
+++ b/vendor/gopkg.in/yaml.v2/encode.go
@@ -13,6 +13,19 @@ import (
"unicode/utf8"
)
+// jsonNumber is the interface of the encoding/json.Number datatype.
+// Repeating the interface here avoids a dependency on encoding/json, and also
+// supports other libraries like jsoniter, which use a similar datatype with
+// the same interface. Detecting this interface is useful when dealing with
+// structures containing json.Number, which is a string under the hood. The
+// encoder should prefer the use of Int64(), Float64() and string(), in that
+// order, when encoding this type.
+type jsonNumber interface {
+ Float64() (float64, error)
+ Int64() (int64, error)
+ String() string
+}
+
type encoder struct {
emitter yaml_emitter_t
event yaml_event_t
@@ -89,6 +102,21 @@ func (e *encoder) marshal(tag string, in reflect.Value) {
}
iface := in.Interface()
switch m := iface.(type) {
+ case jsonNumber:
+ integer, err := m.Int64()
+ if err == nil {
+ // In this case the json.Number is a valid int64
+ in = reflect.ValueOf(integer)
+ break
+ }
+ float, err := m.Float64()
+ if err == nil {
+ // In this case the json.Number is a valid float64
+ in = reflect.ValueOf(float)
+ break
+ }
+ // fallback case - no number could be obtained
+ in = reflect.ValueOf(m.String())
case time.Time, *time.Time:
// Although time.Time implements TextMarshaler,
// we don't want to treat it as a string for YAML
diff --git a/vendor/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go
index 6c151db6..4120e0c9 100644
--- a/vendor/gopkg.in/yaml.v2/resolve.go
+++ b/vendor/gopkg.in/yaml.v2/resolve.go
@@ -81,7 +81,7 @@ func resolvableTag(tag string) bool {
return false
}
-var yamlStyleFloat = regexp.MustCompile(`^[-+]?[0-9]*\.?[0-9]+([eE][-+][0-9]+)?$`)
+var yamlStyleFloat = regexp.MustCompile(`^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$`)
func resolve(tag string, in string) (rtag string, out interface{}) {
if !resolvableTag(tag) {
diff --git a/vendor/gopkg.in/yaml.v2/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go
index 077fd1dd..0b9bb603 100644
--- a/vendor/gopkg.in/yaml.v2/scannerc.go
+++ b/vendor/gopkg.in/yaml.v2/scannerc.go
@@ -626,30 +626,17 @@ func trace(args ...interface{}) func() {
func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool {
// While we need more tokens to fetch, do it.
for {
- // Check if we really need to fetch more tokens.
- need_more_tokens := false
-
- if parser.tokens_head == len(parser.tokens) {
- // Queue is empty.
- need_more_tokens = true
- } else {
- // Check if any potential simple key may occupy the head position.
- if !yaml_parser_stale_simple_keys(parser) {
+ if parser.tokens_head != len(parser.tokens) {
+ // If queue is non-empty, check if any potential simple key may
+ // occupy the head position.
+ head_tok_idx, ok := parser.simple_keys_by_tok[parser.tokens_parsed]
+ if !ok {
+ break
+ } else if valid, ok := yaml_simple_key_is_valid(parser, &parser.simple_keys[head_tok_idx]); !ok {
return false
+ } else if !valid {
+ break
}
-
- for i := range parser.simple_keys {
- simple_key := &parser.simple_keys[i]
- if simple_key.possible && simple_key.token_number == parser.tokens_parsed {
- need_more_tokens = true
- break
- }
- }
- }
-
- // We are finished.
- if !need_more_tokens {
- break
}
// Fetch the next token.
if !yaml_parser_fetch_next_token(parser) {
@@ -678,11 +665,6 @@ func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool {
return false
}
- // Remove obsolete potential simple keys.
- if !yaml_parser_stale_simple_keys(parser) {
- return false
- }
-
// Check the indentation level against the current column.
if !yaml_parser_unroll_indent(parser, parser.mark.column) {
return false
@@ -837,29 +819,30 @@ func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool {
"found character that cannot start any token")
}
-// Check the list of potential simple keys and remove the positions that
-// cannot contain simple keys anymore.
-func yaml_parser_stale_simple_keys(parser *yaml_parser_t) bool {
- // Check for a potential simple key for each flow level.
- for i := range parser.simple_keys {
- simple_key := &parser.simple_keys[i]
-
- // The specification requires that a simple key
- //
- // - is limited to a single line,
- // - is shorter than 1024 characters.
- if simple_key.possible && (simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index) {
-
- // Check if the potential simple key to be removed is required.
- if simple_key.required {
- return yaml_parser_set_scanner_error(parser,
- "while scanning a simple key", simple_key.mark,
- "could not find expected ':'")
- }
- simple_key.possible = false
+func yaml_simple_key_is_valid(parser *yaml_parser_t, simple_key *yaml_simple_key_t) (valid, ok bool) {
+ if !simple_key.possible {
+ return false, true
+ }
+
+ // The 1.2 specification says:
+ //
+ // "If the ? indicator is omitted, parsing needs to see past the
+ // implicit key to recognize it as such. To limit the amount of
+ // lookahead required, the “:” indicator must appear at most 1024
+ // Unicode characters beyond the start of the key. In addition, the key
+ // is restricted to a single line."
+ //
+ if simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index {
+ // Check if the potential simple key to be removed is required.
+ if simple_key.required {
+ return false, yaml_parser_set_scanner_error(parser,
+ "while scanning a simple key", simple_key.mark,
+ "could not find expected ':'")
}
+ simple_key.possible = false
+ return false, true
}
- return true
+ return true, true
}
// Check if a simple key may start at the current position and add it if
@@ -879,13 +862,14 @@ func yaml_parser_save_simple_key(parser *yaml_parser_t) bool {
possible: true,
required: required,
token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head),
+ mark: parser.mark,
}
- simple_key.mark = parser.mark
if !yaml_parser_remove_simple_key(parser) {
return false
}
parser.simple_keys[len(parser.simple_keys)-1] = simple_key
+ parser.simple_keys_by_tok[simple_key.token_number] = len(parser.simple_keys) - 1
}
return true
}
@@ -900,19 +884,33 @@ func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool {
"while scanning a simple key", parser.simple_keys[i].mark,
"could not find expected ':'")
}
+ // Remove the key from the stack.
+ parser.simple_keys[i].possible = false
+ delete(parser.simple_keys_by_tok, parser.simple_keys[i].token_number)
}
- // Remove the key from the stack.
- parser.simple_keys[i].possible = false
return true
}
+// max_flow_level limits the flow_level
+const max_flow_level = 10000
+
// Increase the flow level and resize the simple key list if needed.
func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool {
// Reset the simple key on the next level.
- parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{})
+ parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{
+ possible: false,
+ required: false,
+ token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head),
+ mark: parser.mark,
+ })
// Increase the flow level.
parser.flow_level++
+ if parser.flow_level > max_flow_level {
+ return yaml_parser_set_scanner_error(parser,
+ "while increasing flow level", parser.simple_keys[len(parser.simple_keys)-1].mark,
+ fmt.Sprintf("exceeded max depth of %d", max_flow_level))
+ }
return true
}
@@ -920,11 +918,16 @@ func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool {
func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool {
if parser.flow_level > 0 {
parser.flow_level--
- parser.simple_keys = parser.simple_keys[:len(parser.simple_keys)-1]
+ last := len(parser.simple_keys) - 1
+ delete(parser.simple_keys_by_tok, parser.simple_keys[last].token_number)
+ parser.simple_keys = parser.simple_keys[:last]
}
return true
}
+// max_indents limits the indents stack size
+const max_indents = 10000
+
// Push the current indentation level to the stack and set the new level
// the current column is greater than the indentation level. In this case,
// append or insert the specified token into the token queue.
@@ -939,6 +942,11 @@ func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml
// indentation level.
parser.indents = append(parser.indents, parser.indent)
parser.indent = column
+ if len(parser.indents) > max_indents {
+ return yaml_parser_set_scanner_error(parser,
+ "while increasing indent level", parser.simple_keys[len(parser.simple_keys)-1].mark,
+ fmt.Sprintf("exceeded max depth of %d", max_indents))
+ }
// Create a token and insert it into the queue.
token := yaml_token_t{
@@ -989,6 +997,8 @@ func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool {
// Initialize the simple key stack.
parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{})
+ parser.simple_keys_by_tok = make(map[int]int)
+
// A simple key is allowed at the beginning of the stream.
parser.simple_key_allowed = true
@@ -1270,7 +1280,11 @@ func yaml_parser_fetch_value(parser *yaml_parser_t) bool {
simple_key := &parser.simple_keys[len(parser.simple_keys)-1]
// Have we found a simple key?
- if simple_key.possible {
+ if valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok {
+ return false
+
+ } else if valid {
+
// Create the KEY token and insert it into the queue.
token := yaml_token_t{
typ: yaml_KEY_TOKEN,
@@ -1288,6 +1302,7 @@ func yaml_parser_fetch_value(parser *yaml_parser_t) bool {
// Remove the simple key.
simple_key.possible = false
+ delete(parser.simple_keys_by_tok, simple_key.token_number)
// A simple key cannot follow another simple key.
parser.simple_key_allowed = false
diff --git a/vendor/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go
index de85aa4c..89650e29 100644
--- a/vendor/gopkg.in/yaml.v2/yaml.go
+++ b/vendor/gopkg.in/yaml.v2/yaml.go
@@ -89,7 +89,7 @@ func UnmarshalStrict(in []byte, out interface{}) (err error) {
return unmarshal(in, out, true)
}
-// A Decorder reads and decodes YAML values from an input stream.
+// A Decoder reads and decodes YAML values from an input stream.
type Decoder struct {
strict bool
parser *parser
diff --git a/vendor/gopkg.in/yaml.v2/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go
index e25cee56..f6a9c8e3 100644
--- a/vendor/gopkg.in/yaml.v2/yamlh.go
+++ b/vendor/gopkg.in/yaml.v2/yamlh.go
@@ -579,6 +579,7 @@ type yaml_parser_t struct {
simple_key_allowed bool // May a simple key occur at the current position?
simple_keys []yaml_simple_key_t // The stack of simple keys.
+ simple_keys_by_tok map[int]int // possible simple_key indexes indexed by token_number
// Parser stuff